From f5bea9051b81f3a490c08afdb336c63c9180aae0 Mon Sep 17 00:00:00 2001 From: uHOOCCOOHu Date: Fri, 30 Aug 2019 01:56:00 +0800 Subject: Support resolution of `#[macro_use] extern crate` --- crates/ra_syntax/src/ast/generated.rs | 1 + crates/ra_syntax/src/grammar.ron | 1 + 2 files changed, 2 insertions(+) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 90480b6ca..d161470e7 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -934,6 +934,7 @@ impl AstNode for ExternCrateItem { &self.syntax } } +impl ast::AttrsOwner for ExternCrateItem {} impl ExternCrateItem { pub fn name_ref(&self) -> Option { AstChildren::new(&self.syntax).next() diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index 1836862fe..a07293a46 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron @@ -669,6 +669,7 @@ Grammar( collections: [("use_trees", "UseTree")] ), "ExternCrateItem": ( + traits: ["AttrsOwner"], options: ["NameRef", "Alias"], ), "ArgList": ( -- cgit v1.2.3