diff options
| author | Douglas Campos <qmx@qmx.me> | 2018-08-16 19:14:57 +0000 |
|---|---|---|
| committer | Douglas Campos <qmx@qmx.me> | 2018-08-16 19:23:18 +0000 |
| commit | 231bf229325c0b1382419383489f1cc0f2f08b0d (patch) | |
| tree | 029126139bdc28dae4b17417adfafcf489f0eb1b | |
| parent | 34f6103961d698a473cc9789494c19caece3cc52 (diff) | |
| download | rust-231bf229325c0b1382419383489f1cc0f2f08b0d.tar.gz rust-231bf229325c0b1382419383489f1cc0f2f08b0d.zip | |
check if we're trying to guess for a local module
| -rw-r--r-- | src/librustc_resolve/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index bc4470cfa4a..4e72d532a95 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -4249,7 +4249,8 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> { let mut candidates = Vec::new(); let mut worklist = Vec::new(); let mut seen_modules = FxHashSet(); - worklist.push((start_module, Vec::new(), false)); + let not_local_module = crate_name != keywords::Crate.ident(); + worklist.push((start_module, Vec::new(), not_local_module)); while let Some((in_module, path_segments, |
