Skip to content

Commit 7cfe5de

Browse files
committedOct 23, 2018
Auto merge of #55113 - mockersf:master, r=estebank
#45829 when a renamed import conflict with a previous import Fix the suggestion when a renamed import conflict. It check if the snipped contains `" as "`, and if so uses everything before for the suggestion.
2 parents d570b36 + 8fe6688 commit 7cfe5de

File tree

57 files changed

+485
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+485
-82
lines changed
 

‎src/librustc_resolve/build_reduced_graph.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,10 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
449449
id: item.id,
450450
parent,
451451
imported_module: Cell::new(Some(ModuleOrUniformRoot::Module(module))),
452-
subclass: ImportDirectiveSubclass::ExternCrate(orig_name),
452+
subclass: ImportDirectiveSubclass::ExternCrate {
453+
source: orig_name,
454+
target: ident,
455+
},
453456
root_span: item.span,
454457
span: item.span,
455458
module_path: Vec::new(),

‎src/librustc_resolve/check_unused.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ pub fn check_crate(resolver: &mut Resolver, krate: &ast::Crate) {
144144
}
145145
}
146146
}
147-
ImportDirectiveSubclass::ExternCrate(_) => {
147+
ImportDirectiveSubclass::ExternCrate { .. } => {
148148
resolver.maybe_unused_extern_crates.push((directive.id, directive.span));
149149
}
150150
ImportDirectiveSubclass::MacroUse => {

0 commit comments

Comments
 (0)
Please sign in to comment.