Skip to content

Commit

Permalink
Handle Expr::RawAddr
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 20, 2024
1 parent 221302e commit 1f4d698
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use syn::{
Attribute, Block, Expr, ExprArray, ExprAssign, ExprAsync, ExprAwait, ExprBinary, ExprBlock,
ExprBreak, ExprCall, ExprCast, ExprClosure, ExprConst, ExprContinue, ExprField, ExprForLoop,
ExprGroup, ExprIf, ExprIndex, ExprInfer, ExprLet, ExprLit, ExprLoop, ExprMacro, ExprMatch,
ExprMethodCall, ExprParen, ExprPath, ExprRange, ExprReference, ExprRepeat, ExprReturn,
ExprStruct, ExprTry, ExprTryBlock, ExprTuple, ExprUnary, ExprUnsafe, ExprWhile, ExprYield,
File, Item, ItemMod, Stmt,
ExprMethodCall, ExprParen, ExprPath, ExprRange, ExprRawAddr, ExprReference, ExprRepeat,
ExprReturn, ExprStruct, ExprTry, ExprTryBlock, ExprTuple, ExprUnary, ExprUnsafe, ExprWhile,
ExprYield, File, Item, ItemMod, Stmt,
};

pub fn sanitize(syntax_tree: &mut File) {
Expand Down Expand Up @@ -89,6 +89,7 @@ fn attrs_mut(e: &mut Expr) -> Option<&mut Vec<Attribute>> {
| Expr::Paren(ExprParen { attrs, .. })
| Expr::Path(ExprPath { attrs, .. })
| Expr::Range(ExprRange { attrs, .. })
| Expr::RawAddr(ExprRawAddr { attrs, .. })
| Expr::Reference(ExprReference { attrs, .. })
| Expr::Repeat(ExprRepeat { attrs, .. })
| Expr::Return(ExprReturn { attrs, .. })
Expand Down

0 comments on commit 1f4d698

Please sign in to comment.