]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/zero_sized_map_values.rs
ast/hir: Rename field-related structures
[rust.git] / clippy_lints / src / zero_sized_map_values.rs
index 319b85ac42a805d29336cff18f3196eb3206fa30..adf7077e650fd301e2500b1f21bf1ad92c7583ac 100644 (file)
@@ -3,6 +3,7 @@
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::ty::{Adt, Ty};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
+use rustc_span::sym;
 use rustc_target::abi::LayoutOf as _;
 use rustc_typeck::hir_ty_to_ty;
 
@@ -47,7 +48,7 @@ fn check_ty(&mut self, cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>) {
             if !hir_ty.span.from_expansion();
             if !in_trait_impl(cx, hir_ty.hir_id);
             let ty = ty_from_hir_ty(cx, hir_ty);
-            if is_type_diagnostic_item(cx, ty, sym!(hashmap_type)) || match_type(cx, ty, &paths::BTREEMAP);
+            if is_type_diagnostic_item(cx, ty, sym::hashmap_type) || match_type(cx, ty, &paths::BTREEMAP);
             if let Adt(_, ref substs) = ty.kind();
             let ty = substs.type_at(1);
             // Do this to prevent `layout_of` crashing, being unable to fully normalize `ty`.