rustc_resolve: fix special-case for one-segment import paths.
This commit is contained in:
parent
cd47831bf0
commit
f9b1176eef
17 changed files with 433 additions and 238 deletions
|
@ -101,7 +101,7 @@ impl Path {
|
|||
// or starts with something like `self`/`super`/`$crate`/etc.
|
||||
pub fn make_root(&self) -> Option<PathSegment> {
|
||||
if let Some(ident) = self.segments.get(0).map(|seg| seg.ident) {
|
||||
if ident.is_path_segment_keyword() && ident.name != keywords::Crate.name() {
|
||||
if ident.is_path_segment_keyword() {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue