diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-05-29 17:02:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-29 17:02:59 +0200 |
| commit | 2b08e4d399330473c56c2cb0017e5ec1afc8dbbe (patch) | |
| tree | 76c1bf34b554af5dbe6b3fe65fd1937cbd35bd56 /compiler/rustc_expand/src | |
| parent | 161cf3e25b2af7e3c5cd1cad6d8d5430122a6654 (diff) | |
| parent | 367a877147024987bfec25af513cb1233894135d (diff) | |
| download | rust-2b08e4d399330473c56c2cb0017e5ec1afc8dbbe.tar.gz rust-2b08e4d399330473c56c2cb0017e5ec1afc8dbbe.zip | |
Rollup merge of #141636 - fee1-dead-contrib:push-ntqvvxwuvrvx, r=petrochenkov
avoid some usages of `&mut P<T>` in AST visitors It's a double indirection, and is also complicating our efforts at rust-lang/rust#127615. r? `@ghost`
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/config.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_expand/src/expand.rs | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/config.rs b/compiler/rustc_expand/src/config.rs index 0994813ecb9..c50ab5959e2 100644 --- a/compiler/rustc_expand/src/config.rs +++ b/compiler/rustc_expand/src/config.rs @@ -2,7 +2,6 @@ use std::iter; -use rustc_ast::ptr::P; use rustc_ast::token::{Delimiter, Token, TokenKind}; use rustc_ast::tokenstream::{ AttrTokenStream, AttrTokenTree, LazyAttrTokenStream, Spacing, TokenTree, @@ -433,7 +432,7 @@ impl<'a> StripUnconfigured<'a> { } #[instrument(level = "trace", skip(self))] - pub fn configure_expr(&self, expr: &mut P<ast::Expr>, method_receiver: bool) { + pub fn configure_expr(&self, expr: &mut ast::Expr, method_receiver: bool) { if !method_receiver { for attr in expr.attrs.iter() { self.maybe_emit_expr_attr_err(attr); diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs index e5749ba96a6..d6fef766a07 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -2304,7 +2304,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> { self.flat_map_node(AstNodeWrapper::new(node, OptExprTag)) } - fn visit_block(&mut self, node: &mut P<ast::Block>) { + fn visit_block(&mut self, node: &mut ast::Block) { let orig_dir_ownership = mem::replace( &mut self.cx.current_expansion.dir_ownership, DirOwnership::UnownedViaBlock, |
