]> git.lizzy.rs Git - rust.git/commitdiff
revert back to master state
authorDouglas Campos <qmx@qmx.me>
Thu, 5 Jul 2018 12:59:39 +0000 (12:59 +0000)
committerDouglas Campos <qmx@qmx.me>
Thu, 16 Aug 2018 19:19:19 +0000 (19:19 +0000)
src/librustc_resolve/lib.rs

index 857e913bb3efd38de4865a828484b0a98c5020cf..992ea12ffa2b14c44dde94f4fdfc303ac356d791 100644 (file)
@@ -4488,8 +4488,7 @@ fn report_with_use_injections(&mut self, krate: &Crate) {
         for UseError { mut err, candidates, node_id, better } in self.use_injections.drain(..) {
             let (span, found_use) = UsePlacementFinder::check(krate, node_id);
             if !candidates.is_empty() {
-                let crate_in_paths = self.session.features_untracked().crate_in_paths;
-                show_candidates(&mut err, span, &candidates, better, found_use, crate_in_paths);
+                show_candidates(&mut err, span, &candidates, better, found_use);
             }
             err.emit();
         }
@@ -4703,8 +4702,7 @@ fn show_candidates(err: &mut DiagnosticBuilder,
                    span: Option<Span>,
                    candidates: &[ImportSuggestion],
                    better: bool,
-                   found_use: bool,
-                   crate_in_paths: bool) {
+                   found_use: bool) {
 
     // we want consistent results across executions, but candidates are produced
     // by iterating through a hash map, so make sure they are ordered:
@@ -4728,12 +4726,7 @@ fn show_candidates(err: &mut DiagnosticBuilder,
             } else {
                 "\n"
             };
-            let crate_prefix = if crate_in_paths {
-                "crate::"
-            } else {
-                ""
-            };
-            *candidate = format!("use {}{};\n{}", crate_prefix, candidate, additional_newline);
+            *candidate = format!("use {};\n{}", candidate, additional_newline);
         }
 
         err.span_suggestions(span, &msg, path_strings);