diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-08-09 16:29:22 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-08-14 07:06:50 +0300 |
| commit | f9b1176eefb84686c76dde1b53a47ee0eb765d89 (patch) | |
| tree | 6ca9d6d36cca31c593307028bfcbdf9834402b87 /src/libsyntax | |
| parent | cd47831bf04175aad44d94c580a3d08f432dc23a (diff) | |
| download | rust-f9b1176eefb84686c76dde1b53a47ee0eb765d89.tar.gz rust-f9b1176eefb84686c76dde1b53a47ee0eb765d89.zip | |
rustc_resolve: fix special-case for one-segment import paths.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 6925ed2afb8..b66946affad 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -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; } } |
