mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add AST for extern crate
Also change it to parse the crate name as a NAME_REF, not a NAME.
This commit is contained in:
parent
77a824c6a0
commit
e163c908ac
5 changed files with 16 additions and 6 deletions
|
@ -970,7 +970,15 @@ impl ToOwned for ExternCrateItem {
|
|||
}
|
||||
|
||||
|
||||
impl ExternCrateItem {}
|
||||
impl ExternCrateItem {
|
||||
pub fn name_ref(&self) -> Option<&NameRef> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
|
||||
pub fn alias(&self) -> Option<&Alias> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
}
|
||||
|
||||
// FalseKw
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue