diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-06-06 23:53:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-06 23:53:16 +0200 |
| commit | 93ca0af08ca056e9e38d172e9b224d1e607a8e99 (patch) | |
| tree | 2a42a877715e20a48d65748511b18d23e6b3e8c8 /compiler/rustc_ast/src/ast.rs | |
| parent | 15d9b9619c0db448552b092c5259ea6c18cd32fc (diff) | |
| parent | 991c91fdaa5862835799abfd9c2349e06277097e (diff) | |
| download | rust-93ca0af08ca056e9e38d172e9b224d1e607a8e99.tar.gz rust-93ca0af08ca056e9e38d172e9b224d1e607a8e99.zip | |
Rollup merge of #141603 - nnethercote:reduce-P, r=fee1-dead
Reduce `ast::ptr::P` to a typedef of `Box` As per the MCP at https://github.com/rust-lang/compiler-team/issues/878. r? `@fee1-dead`
Diffstat (limited to 'compiler/rustc_ast/src/ast.rs')
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index c9a8adec31a..cf40c3f7f6f 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -1119,10 +1119,9 @@ impl Stmt { pub fn add_trailing_semicolon(mut self) -> Self { self.kind = match self.kind { StmtKind::Expr(expr) => StmtKind::Semi(expr), - StmtKind::MacCall(mac) => { - StmtKind::MacCall(mac.map(|MacCallStmt { mac, style: _, attrs, tokens }| { - MacCallStmt { mac, style: MacStmtStyle::Semicolon, attrs, tokens } - })) + StmtKind::MacCall(mut mac) => { + mac.style = MacStmtStyle::Semicolon; + StmtKind::MacCall(mac) } kind => kind, }; @@ -1724,7 +1723,7 @@ pub enum ExprKind { /// /// Usually not written directly in user code but /// indirectly via the macro `core::mem::offset_of!(...)`. - OffsetOf(P<Ty>, P<[Ident]>), + OffsetOf(P<Ty>, Vec<Ident>), /// A macro invocation; pre-expansion. MacCall(P<MacCall>), |
