diff options
| author | Douglas Campos <qmx@qmx.me> | 2018-07-05 12:59:39 +0000 |
|---|---|---|
| committer | Douglas Campos <qmx@qmx.me> | 2018-08-16 19:19:19 +0000 |
| commit | af727dfd3f86ab7f907fadccde013bfaa99fc48c (patch) | |
| tree | 11dec4e7148096f58e11d415245e024705601ff4 /src | |
| parent | 7aa5a5b5e8df41fc373858e9f4824e2cc51bc1b2 (diff) | |
| download | rust-af727dfd3f86ab7f907fadccde013bfaa99fc48c.tar.gz rust-af727dfd3f86ab7f907fadccde013bfaa99fc48c.zip | |
revert back to master state
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_resolve/lib.rs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 857e913bb3e..992ea12ffa2 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -4488,8 +4488,7 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> { 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); |
