aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/generated.rs')
-rw-r--r--crates/ra_syntax/src/ast/generated.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 002f453cd..7204ca5b1 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -4135,6 +4135,7 @@ pub enum ModuleItem {
4135 ConstDef(ConstDef), 4135 ConstDef(ConstDef),
4136 StaticDef(StaticDef), 4136 StaticDef(StaticDef),
4137 Module(Module), 4137 Module(Module),
4138 MacroCall(MacroCall),
4138} 4139}
4139impl From<StructDef> for ModuleItem { 4140impl From<StructDef> for ModuleItem {
4140 fn from(node: StructDef) -> ModuleItem { 4141 fn from(node: StructDef) -> ModuleItem {
@@ -4196,6 +4197,11 @@ impl From<Module> for ModuleItem {
4196 ModuleItem::Module(node) 4197 ModuleItem::Module(node)
4197 } 4198 }
4198} 4199}
4200impl From<MacroCall> for ModuleItem {
4201 fn from(node: MacroCall) -> ModuleItem {
4202 ModuleItem::MacroCall(node)
4203 }
4204}
4199impl std::fmt::Display for ModuleItem { 4205impl std::fmt::Display for ModuleItem {
4200 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4206 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4201 std::fmt::Display::fmt(self.syntax(), f) 4207 std::fmt::Display::fmt(self.syntax(), f)
@@ -4205,7 +4211,7 @@ impl AstNode for ModuleItem {
4205 fn can_cast(kind: SyntaxKind) -> bool { 4211 fn can_cast(kind: SyntaxKind) -> bool {
4206 match kind { 4212 match kind {
4207 STRUCT_DEF | UNION_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | IMPL_DEF 4213 STRUCT_DEF | UNION_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | IMPL_DEF
4208 | USE_ITEM | EXTERN_CRATE_ITEM | CONST_DEF | STATIC_DEF | MODULE => true, 4214 | USE_ITEM | EXTERN_CRATE_ITEM | CONST_DEF | STATIC_DEF | MODULE | MACRO_CALL => true,
4209 _ => false, 4215 _ => false,
4210 } 4216 }
4211 } 4217 }
@@ -4223,6 +4229,7 @@ impl AstNode for ModuleItem {
4223 CONST_DEF => ModuleItem::ConstDef(ConstDef { syntax }), 4229 CONST_DEF => ModuleItem::ConstDef(ConstDef { syntax }),
4224 STATIC_DEF => ModuleItem::StaticDef(StaticDef { syntax }), 4230 STATIC_DEF => ModuleItem::StaticDef(StaticDef { syntax }),
4225 MODULE => ModuleItem::Module(Module { syntax }), 4231 MODULE => ModuleItem::Module(Module { syntax }),
4232 MACRO_CALL => ModuleItem::MacroCall(MacroCall { syntax }),
4226 _ => return None, 4233 _ => return None,
4227 }; 4234 };
4228 Some(res) 4235 Some(res)
@@ -4241,6 +4248,7 @@ impl AstNode for ModuleItem {
4241 ModuleItem::ConstDef(it) => &it.syntax, 4248 ModuleItem::ConstDef(it) => &it.syntax,
4242 ModuleItem::StaticDef(it) => &it.syntax, 4249 ModuleItem::StaticDef(it) => &it.syntax,
4243 ModuleItem::Module(it) => &it.syntax, 4250 ModuleItem::Module(it) => &it.syntax,
4251 ModuleItem::MacroCall(it) => &it.syntax,
4244 } 4252 }
4245 } 4253 }
4246} 4254}