This commit is contained in:
Oliver Schneider 2018-03-18 13:26:57 +01:00
parent cb7af65e28
commit 4edd140e57
No known key found for this signature in database
GPG key ID: 1D5CB4FC597C3004

View file

@ -43,7 +43,7 @@ impl EarlyLintPass for UnsafeNameRemoval {
fn check_use_tree(use_tree: &UseTree, cx: &EarlyContext, span: &Span) {
match use_tree.kind {
UseTreeKind::Simple(new_name) => {
UseTreeKind::Simple(Some(new_name)) => {
let old_name = use_tree
.prefix
.segments
@ -52,6 +52,7 @@ fn check_use_tree(use_tree: &UseTree, cx: &EarlyContext, span: &Span) {
.identifier;
unsafe_to_safe_check(old_name, new_name, cx, span);
}
UseTreeKind::Simple(None) |
UseTreeKind::Glob => {},
UseTreeKind::Nested(ref nested_use_tree) => {
for &(ref use_tree, _) in nested_use_tree {