Support resolution of #[macro_use] extern crate

This commit is contained in:
uHOOCCOOHu 2019-08-30 01:56:00 +08:00
parent f2a200c1ee
commit f5bea9051b
No known key found for this signature in database
GPG key ID: CED392DE0C483D00
4 changed files with 30 additions and 2 deletions

View file

@ -934,6 +934,7 @@ impl AstNode for ExternCrateItem {
&self.syntax
}
}
impl ast::AttrsOwner for ExternCrateItem {}
impl ExternCrateItem {
pub fn name_ref(&self) -> Option<NameRef> {
AstChildren::new(&self.syntax).next()