diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-03-29 09:20:45 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-04-04 09:44:50 +0000 |
| commit | ec74653652e59fc209506c084357ccee922a2d73 (patch) | |
| tree | aa3b502664d0028db8443f96466d856942bc853a /compiler/rustc_expand/src/build.rs | |
| parent | e3828777a6b669c33fc59f2bddde44e888d304af (diff) | |
| download | rust-ec74653652e59fc209506c084357ccee922a2d73.tar.gz rust-ec74653652e59fc209506c084357ccee922a2d73.zip | |
Split out ast::ItemKind::Const into its own struct
Diffstat (limited to 'compiler/rustc_expand/src/build.rs')
| -rw-r--r-- | compiler/rustc_expand/src/build.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index e184f732090..39fed9fdd0d 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -638,8 +638,13 @@ impl<'a> ExtCtxt<'a> { ty: P<ast::Ty>, expr: P<ast::Expr>, ) -> P<ast::Item> { - let def = ast::Defaultness::Final; - self.item(span, name, AttrVec::new(), ast::ItemKind::Const(def, ty, Some(expr))) + let defaultness = ast::Defaultness::Final; + self.item( + span, + name, + AttrVec::new(), + ast::ItemKind::Const(ast::ConstItem { defaultness, ty, expr: Some(expr) }), + ) } // Builds `#[name]`. |
