diff --git a/clippy_lints/src/unsafe_removed_from_name.rs b/clippy_lints/src/unsafe_removed_from_name.rs index 637df9618..a238a9b92 100644 --- a/clippy_lints/src/unsafe_removed_from_name.rs +++ b/clippy_lints/src/unsafe_removed_from_name.rs @@ -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 {