about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDouglas Campos <qmx@qmx.me>2018-08-16 19:14:57 +0000
committerDouglas Campos <qmx@qmx.me>2018-08-16 19:23:18 +0000
commit231bf229325c0b1382419383489f1cc0f2f08b0d (patch)
tree029126139bdc28dae4b17417adfafcf489f0eb1b
parent34f6103961d698a473cc9789494c19caece3cc52 (diff)
downloadrust-231bf229325c0b1382419383489f1cc0f2f08b0d.tar.gz
rust-231bf229325c0b1382419383489f1cc0f2f08b0d.zip
check if we're trying to guess for a local module
-rw-r--r--src/librustc_resolve/lib.rs3
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,