about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-07 09:18:25 +0000
committerbors <bors@rust-lang.org>2021-10-07 09:18:25 +0000
commitb7f3f7f6082679da2da9a0b3faf1b5adef3afd3b (patch)
treea7a579b3dbe20af2272994c3c6fe7b63d6c8699a
parent01ea06acb730fea7cea41ff3dba414f41449af2f (diff)
parent8f9ef87f75977dd5e29c02289b9b7b09e1a28478 (diff)
downloadrust-b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b.tar.gz
rust-b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b.zip
Auto merge of #7783 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

Finally an easy, conflict free rustup again :tada:

changelog: none
-rw-r--r--clippy_lints/src/booleans.rs4
-rw-r--r--clippy_lints/src/cargo_common_metadata.rs4
-rw-r--r--clippy_lints/src/case_sensitive_file_extension_comparisons.rs2
-rw-r--r--clippy_lints/src/cognitive_complexity.rs2
-rw-r--r--clippy_lints/src/disallowed_method.rs4
-rw-r--r--clippy_lints/src/disallowed_type.rs4
-rw-r--r--clippy_lints/src/doc.rs10
-rw-r--r--clippy_lints/src/fallible_impl_from.rs6
-rw-r--r--clippy_lints/src/feature_name.rs4
-rw-r--r--clippy_lints/src/format.rs4
-rw-r--r--clippy_lints/src/from_over_into.rs2
-rw-r--r--clippy_lints/src/from_str_radix_10.rs2
-rw-r--r--clippy_lints/src/functions/result_unit_err.rs2
-rw-r--r--clippy_lints/src/future_not_send.rs2
-rw-r--r--clippy_lints/src/get_last_with_len.rs2
-rw-r--r--clippy_lints/src/if_let_mutex.rs3
-rw-r--r--clippy_lints/src/implicit_hasher.rs8
-rw-r--r--clippy_lints/src/infinite_iter.rs8
-rw-r--r--clippy_lints/src/inherent_impl.rs4
-rw-r--r--clippy_lints/src/inherent_to_string.rs2
-rw-r--r--clippy_lints/src/len_zero.rs4
-rw-r--r--clippy_lints/src/loops/explicit_iter_loop.rs8
-rw-r--r--clippy_lints/src/loops/for_kv_map.rs2
-rw-r--r--clippy_lints/src/loops/for_loops_over_fallibles.rs4
-rw-r--r--clippy_lints/src/loops/manual_memcpy.rs2
-rw-r--r--clippy_lints/src/loops/needless_collect.rs10
-rw-r--r--clippy_lints/src/loops/same_item_push.rs2
-rw-r--r--clippy_lints/src/macro_use.rs2
-rw-r--r--clippy_lints/src/main_recursion.rs4
-rw-r--r--clippy_lints/src/manual_map.rs4
-rw-r--r--clippy_lints/src/manual_ok_or.rs2
-rw-r--r--clippy_lints/src/manual_unwrap_or.rs4
-rw-r--r--clippy_lints/src/map_clone.rs2
-rw-r--r--clippy_lints/src/map_unit_fn.rs15
-rw-r--r--clippy_lints/src/match_on_vec_items.rs2
-rw-r--r--clippy_lints/src/match_result_ok.rs2
-rw-r--r--clippy_lints/src/matches.rs7
-rw-r--r--clippy_lints/src/methods/bytes_nth.rs2
-rw-r--r--clippy_lints/src/methods/cloned_instead_of_copied.rs2
-rw-r--r--clippy_lints/src/methods/expect_fun_call.rs8
-rw-r--r--clippy_lints/src/methods/expect_used.rs4
-rw-r--r--clippy_lints/src/methods/extend_with_drain.rs4
-rw-r--r--clippy_lints/src/methods/filter_map.rs6
-rw-r--r--clippy_lints/src/methods/flat_map_option.rs2
-rw-r--r--clippy_lints/src/methods/get_unwrap.rs6
-rw-r--r--clippy_lints/src/methods/inefficient_to_string.rs2
-rw-r--r--clippy_lints/src/methods/iter_cloned_collect.rs2
-rw-r--r--clippy_lints/src/methods/iter_count.rs8
-rw-r--r--clippy_lints/src/methods/iter_next_slice.rs2
-rw-r--r--clippy_lints/src/methods/iter_nth.rs4
-rw-r--r--clippy_lints/src/methods/manual_split_once.rs4
-rw-r--r--clippy_lints/src/methods/manual_str_repeat.rs6
-rw-r--r--clippy_lints/src/methods/map_collect_result_unit.rs2
-rw-r--r--clippy_lints/src/methods/map_flatten.rs6
-rw-r--r--clippy_lints/src/methods/map_identity.rs4
-rw-r--r--clippy_lints/src/methods/map_unwrap_or.rs4
-rw-r--r--clippy_lints/src/methods/ok_expect.rs6
-rw-r--r--clippy_lints/src/methods/option_as_ref_deref.rs2
-rw-r--r--clippy_lints/src/methods/option_map_or_none.rs4
-rw-r--r--clippy_lints/src/methods/option_map_unwrap_or.rs2
-rw-r--r--clippy_lints/src/methods/or_fun_call.rs2
-rw-r--r--clippy_lints/src/methods/search_is_some.rs2
-rw-r--r--clippy_lints/src/methods/string_extend_chars.rs4
-rw-r--r--clippy_lints/src/methods/unnecessary_filter_map.rs3
-rw-r--r--clippy_lints/src/methods/unnecessary_lazy_eval.rs4
-rw-r--r--clippy_lints/src/methods/unwrap_or_else_default.rs4
-rw-r--r--clippy_lints/src/methods/unwrap_used.rs4
-rw-r--r--clippy_lints/src/methods/utils.rs2
-rw-r--r--clippy_lints/src/missing_doc.rs5
-rw-r--r--clippy_lints/src/missing_enforced_import_rename.rs4
-rw-r--r--clippy_lints/src/multiple_crate_versions.rs4
-rw-r--r--clippy_lints/src/mut_key.rs10
-rw-r--r--clippy_lints/src/mut_mutex_lock.rs3
-rw-r--r--clippy_lints/src/mutex_atomic.rs3
-rw-r--r--clippy_lints/src/needless_option_as_deref.rs2
-rw-r--r--clippy_lints/src/needless_pass_by_value.rs4
-rw-r--r--clippy_lints/src/non_send_fields_in_send_ty.rs2
-rw-r--r--clippy_lints/src/option_if_let_else.rs2
-rw-r--r--clippy_lints/src/panic_in_result_fn.rs2
-rw-r--r--clippy_lints/src/ptr.rs4
-rw-r--r--clippy_lints/src/question_mark.rs2
-rw-r--r--clippy_lints/src/redundant_clone.rs2
-rw-r--r--clippy_lints/src/ref_option_ref.rs2
-rw-r--r--clippy_lints/src/repeat_once.rs2
-rw-r--r--clippy_lints/src/same_name_method.rs6
-rw-r--r--clippy_lints/src/slow_vector_initialization.rs2
-rw-r--r--clippy_lints/src/strings.rs4
-rw-r--r--clippy_lints/src/swap.rs6
-rw-r--r--clippy_lints/src/transmute/unsound_collection_transmute.rs8
-rw-r--r--clippy_lints/src/try_err.rs8
-rw-r--r--clippy_lints/src/types/box_collection.rs6
-rw-r--r--clippy_lints/src/types/option_option.rs4
-rw-r--r--clippy_lints/src/types/rc_buffer.rs6
-rw-r--r--clippy_lints/src/types/rc_mutex.rs2
-rw-r--r--clippy_lints/src/types/vec_box.rs2
-rw-r--r--clippy_lints/src/unnecessary_sort_by.rs2
-rw-r--r--clippy_lints/src/unnecessary_wraps.rs4
-rw-r--r--clippy_lints/src/unwrap.rs6
-rw-r--r--clippy_lints/src/unwrap_in_result.rs12
-rw-r--r--clippy_lints/src/useless_conversion.rs8
-rw-r--r--clippy_lints/src/utils/internal_lints.rs14
-rw-r--r--clippy_lints/src/vec_init_then_push.rs4
-rw-r--r--clippy_lints/src/wildcard_dependencies.rs4
-rw-r--r--clippy_lints/src/zero_sized_map_values.rs2
-rw-r--r--clippy_utils/src/eager_or_lazy.rs2
-rw-r--r--clippy_utils/src/lib.rs11
-rw-r--r--clippy_utils/src/paths.rs10
-rw-r--r--clippy_utils/src/qualify_min_const_fn.rs2
-rw-r--r--clippy_utils/src/ty.rs12
-rw-r--r--rust-toolchain2
-rw-r--r--tests/ui-internal/match_type_on_diag_item.stderr4
-rw-r--r--tests/ui/crashes/issues_loop_mut_cond.rs1
-rw-r--r--tests/ui/def_id_nocore.rs5
-rw-r--r--tests/ui/def_id_nocore.stderr2
-rw-r--r--tests/ui/infinite_loop.rs2
-rw-r--r--tests/ui/infinite_loop.stderr22
116 files changed, 256 insertions, 254 deletions
diff --git a/clippy_lints/src/booleans.rs b/clippy_lints/src/booleans.rs
index 6f12d34e66b..8282800c819 100644
--- a/clippy_lints/src/booleans.rs
+++ b/clippy_lints/src/booleans.rs
@@ -260,8 +260,8 @@ fn simplify_not(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<String> {
         },
         ExprKind::MethodCall(path, _, args, _) if args.len() == 1 => {
             let type_of_receiver = cx.typeck_results().expr_ty(&args[0]);
-            if !is_type_diagnostic_item(cx, type_of_receiver, sym::option_type)
-                && !is_type_diagnostic_item(cx, type_of_receiver, sym::result_type)
+            if !is_type_diagnostic_item(cx, type_of_receiver, sym::Option)
+                && !is_type_diagnostic_item(cx, type_of_receiver, sym::Result)
             {
                 return None;
             }
diff --git a/clippy_lints/src/cargo_common_metadata.rs b/clippy_lints/src/cargo_common_metadata.rs
index 162911b77d6..ff619c59b6e 100644
--- a/clippy_lints/src/cargo_common_metadata.rs
+++ b/clippy_lints/src/cargo_common_metadata.rs
@@ -1,7 +1,7 @@
 //! lint on missing cargo common metadata
 
 use clippy_utils::{diagnostics::span_lint, is_lint_allowed};
-use rustc_hir::{hir_id::CRATE_HIR_ID, Crate};
+use rustc_hir::hir_id::CRATE_HIR_ID;
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_tool_lint, impl_lint_pass};
 use rustc_span::source_map::DUMMY_SP;
@@ -77,7 +77,7 @@ fn is_empty_vec(value: &[String]) -> bool {
 }
 
 impl LateLintPass<'_> for CargoCommonMetadata {
-    fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'_>) {
         if is_lint_allowed(cx, CARGO_COMMON_METADATA, CRATE_HIR_ID) {
             return;
         }
diff --git a/clippy_lints/src/case_sensitive_file_extension_comparisons.rs b/clippy_lints/src/case_sensitive_file_extension_comparisons.rs
index 86b32475ceb..c876553c165 100644
--- a/clippy_lints/src/case_sensitive_file_extension_comparisons.rs
+++ b/clippy_lints/src/case_sensitive_file_extension_comparisons.rs
@@ -55,7 +55,7 @@ fn check_case_sensitive_file_extension_comparison(ctx: &LateContext<'_>, expr: &
                     return Some(span);
                 },
                 ty::Adt(&ty::AdtDef { did, .. }, _) => {
-                    if ctx.tcx.is_diagnostic_item(sym::string_type, did) {
+                    if ctx.tcx.is_diagnostic_item(sym::String, did) {
                         return Some(span);
                     }
                 },
diff --git a/clippy_lints/src/cognitive_complexity.rs b/clippy_lints/src/cognitive_complexity.rs
index 2203d1c39f1..1ccb8c5d880 100644
--- a/clippy_lints/src/cognitive_complexity.rs
+++ b/clippy_lints/src/cognitive_complexity.rs
@@ -67,7 +67,7 @@ impl CognitiveComplexity {
         helper.visit_expr(expr);
         let CcHelper { cc, returns } = helper;
         let ret_ty = cx.typeck_results().node_type(expr.hir_id);
-        let ret_adjust = if is_type_diagnostic_item(cx, ret_ty, sym::result_type) {
+        let ret_adjust = if is_type_diagnostic_item(cx, ret_ty, sym::Result) {
             returns
         } else {
             #[allow(clippy::integer_division)]
diff --git a/clippy_lints/src/disallowed_method.rs b/clippy_lints/src/disallowed_method.rs
index 1167b26c8f1..22d726cdcb7 100644
--- a/clippy_lints/src/disallowed_method.rs
+++ b/clippy_lints/src/disallowed_method.rs
@@ -1,7 +1,7 @@
 use clippy_utils::diagnostics::span_lint_and_then;
 use clippy_utils::fn_def_id;
 
-use rustc_hir::{def::Res, def_id::DefIdMap, Crate, Expr};
+use rustc_hir::{def::Res, def_id::DefIdMap, Expr};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_tool_lint, impl_lint_pass};
 
@@ -70,7 +70,7 @@ impl DisallowedMethod {
 impl_lint_pass!(DisallowedMethod => [DISALLOWED_METHOD]);
 
 impl<'tcx> LateLintPass<'tcx> for DisallowedMethod {
-    fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'_>) {
         for conf in &self.conf_disallowed {
             let (path, reason) = match conf {
                 conf::DisallowedMethod::Simple(path) => (path, None),
diff --git a/clippy_lints/src/disallowed_type.rs b/clippy_lints/src/disallowed_type.rs
index 6c861fb33a9..87124f093a8 100644
--- a/clippy_lints/src/disallowed_type.rs
+++ b/clippy_lints/src/disallowed_type.rs
@@ -2,7 +2,7 @@ use clippy_utils::diagnostics::span_lint;
 
 use rustc_data_structures::fx::FxHashSet;
 use rustc_hir::{
-    def::Res, def_id::DefId, Crate, Item, ItemKind, PolyTraitRef, PrimTy, TraitBoundModifier, Ty, TyKind, UseKind,
+    def::Res, def_id::DefId, Item, ItemKind, PolyTraitRef, PrimTy, TraitBoundModifier, Ty, TyKind, UseKind,
 };
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_tool_lint, impl_lint_pass};
@@ -75,7 +75,7 @@ impl DisallowedType {
 impl_lint_pass!(DisallowedType => [DISALLOWED_TYPE]);
 
 impl<'tcx> LateLintPass<'tcx> for DisallowedType {
-    fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'_>) {
         for path in &self.disallowed {
             let segs = path.iter().map(ToString::to_string).collect::<Vec<_>>();
             match clippy_utils::path_to_res(cx, &segs.iter().map(String::as_str).collect::<Vec<_>>()) {
diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs
index 75873fd7c1c..9840affbf6f 100644
--- a/clippy_lints/src/doc.rs
+++ b/clippy_lints/src/doc.rs
@@ -212,7 +212,7 @@ impl_lint_pass!(DocMarkdown =>
 );
 
 impl<'tcx> LateLintPass<'tcx> for DocMarkdown {
-    fn check_crate(&mut self, cx: &LateContext<'tcx>, _: &'tcx hir::Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'tcx>) {
         let attrs = cx.tcx.hir().attrs(hir::CRATE_HIR_ID);
         check_attrs(cx, &self.valid_idents, attrs);
     }
@@ -317,7 +317,7 @@ fn lint_for_missing_headers<'tcx>(
     }
     if !headers.errors {
         let hir_id = cx.tcx.hir().local_def_id_to_hir_id(def_id);
-        if is_type_diagnostic_item(cx, return_ty(cx, hir_id), sym::result_type) {
+        if is_type_diagnostic_item(cx, return_ty(cx, hir_id), sym::Result) {
             span_lint(
                 cx,
                 MISSING_ERRORS_DOC,
@@ -335,7 +335,7 @@ fn lint_for_missing_headers<'tcx>(
                 if let ty::Opaque(_, subs) = ret_ty.kind();
                 if let Some(gen) = subs.types().next();
                 if let ty::Generator(_, subs, _) = gen.kind();
-                if is_type_diagnostic_item(cx, subs.as_generator().return_ty(), sym::result_type);
+                if is_type_diagnostic_item(cx, subs.as_generator().return_ty(), sym::Result);
                 then {
                     span_lint(
                         cx,
@@ -782,8 +782,8 @@ impl<'a, 'tcx> Visitor<'tcx> for FindPanicUnwrap<'a, 'tcx> {
         // check for `unwrap`
         if let Some(arglists) = method_chain_args(expr, &["unwrap"]) {
             let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
-            if is_type_diagnostic_item(self.cx, reciever_ty, sym::option_type)
-                || is_type_diagnostic_item(self.cx, reciever_ty, sym::result_type)
+            if is_type_diagnostic_item(self.cx, reciever_ty, sym::Option)
+                || is_type_diagnostic_item(self.cx, reciever_ty, sym::Result)
             {
                 self.panic_span = Some(expr.span);
             }
diff --git a/clippy_lints/src/fallible_impl_from.rs b/clippy_lints/src/fallible_impl_from.rs
index f22f52b949e..70337f5bbeb 100644
--- a/clippy_lints/src/fallible_impl_from.rs
+++ b/clippy_lints/src/fallible_impl_from.rs
@@ -57,7 +57,7 @@ impl<'tcx> LateLintPass<'tcx> for FallibleImplFrom {
         if_chain! {
             if let hir::ItemKind::Impl(impl_) = &item.kind;
             if let Some(impl_trait_ref) = cx.tcx.impl_trait_ref(item.def_id);
-            if cx.tcx.is_diagnostic_item(sym::from_trait, impl_trait_ref.def_id);
+            if cx.tcx.is_diagnostic_item(sym::From, impl_trait_ref.def_id);
             then {
                 lint_impl_body(cx, item.span, impl_.items);
             }
@@ -94,8 +94,8 @@ fn lint_impl_body<'tcx>(cx: &LateContext<'tcx>, impl_span: Span, impl_items: &[h
             // check for `unwrap`
             if let Some(arglists) = method_chain_args(expr, &["unwrap"]) {
                 let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
-                if is_type_diagnostic_item(self.lcx, reciever_ty, sym::option_type)
-                    || is_type_diagnostic_item(self.lcx, reciever_ty, sym::result_type)
+                if is_type_diagnostic_item(self.lcx, reciever_ty, sym::Option)
+                    || is_type_diagnostic_item(self.lcx, reciever_ty, sym::Result)
                 {
                     self.result.push(expr.span);
                 }
diff --git a/clippy_lints/src/feature_name.rs b/clippy_lints/src/feature_name.rs
index eef1407a80c..f534327f7a0 100644
--- a/clippy_lints/src/feature_name.rs
+++ b/clippy_lints/src/feature_name.rs
@@ -1,6 +1,6 @@
 use clippy_utils::diagnostics::span_lint_and_help;
 use clippy_utils::{diagnostics::span_lint, is_lint_allowed};
-use rustc_hir::{Crate, CRATE_HIR_ID};
+use rustc_hir::CRATE_HIR_ID;
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 use rustc_span::source_map::DUMMY_SP;
@@ -110,7 +110,7 @@ fn lint(cx: &LateContext<'_>, feature: &str, substring: &str, is_prefix: bool) {
 }
 
 impl LateLintPass<'_> for FeatureName {
-    fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'_>) {
         if is_lint_allowed(cx, REDUNDANT_FEATURE_NAMES, CRATE_HIR_ID)
             && is_lint_allowed(cx, NEGATIVE_FEATURE_NAMES, CRATE_HIR_ID)
         {
diff --git a/clippy_lints/src/format.rs b/clippy_lints/src/format.rs
index 508cac33848..8df7f91ce59 100644
--- a/clippy_lints/src/format.rs
+++ b/clippy_lints/src/format.rs
@@ -65,7 +65,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessFormat {
             if_chain! {
                 if format_args.format_string_symbols == [kw::Empty];
                 if match cx.typeck_results().expr_ty(value).peel_refs().kind() {
-                    ty::Adt(adt, _) => cx.tcx.is_diagnostic_item(sym::string_type, adt.did),
+                    ty::Adt(adt, _) => cx.tcx.is_diagnostic_item(sym::String, adt.did),
                     ty::Str => true,
                     _ => false,
                 };
@@ -112,7 +112,7 @@ fn is_display_arg(expr: &Expr<'_>) -> bool {
         if let ExprKind::Call(_, [_, fmt]) = expr.kind;
         if let ExprKind::Path(QPath::Resolved(_, path)) = fmt.kind;
         if let [.., t, _] = path.segments;
-        if t.ident.name.as_str() == "Display";
+        if t.ident.name == sym::Display;
         then { true } else { false }
     }
 }
diff --git a/clippy_lints/src/from_over_into.rs b/clippy_lints/src/from_over_into.rs
index 623546cd1de..347c6eb12cb 100644
--- a/clippy_lints/src/from_over_into.rs
+++ b/clippy_lints/src/from_over_into.rs
@@ -61,7 +61,7 @@ impl LateLintPass<'_> for FromOverInto {
         if_chain! {
             if let hir::ItemKind::Impl{ .. } = &item.kind;
             if let Some(impl_trait_ref) = cx.tcx.impl_trait_ref(item.def_id);
-            if cx.tcx.is_diagnostic_item(sym::into_trait, impl_trait_ref.def_id);
+            if cx.tcx.is_diagnostic_item(sym::Into, impl_trait_ref.def_id);
 
             then {
                 span_lint_and_help(
diff --git a/clippy_lints/src/from_str_radix_10.rs b/clippy_lints/src/from_str_radix_10.rs
index cc4bb85c50f..98ce3db025c 100644
--- a/clippy_lints/src/from_str_radix_10.rs
+++ b/clippy_lints/src/from_str_radix_10.rs
@@ -98,5 +98,5 @@ impl LateLintPass<'tcx> for FromStrRadix10 {
 
 /// Checks if a Ty is `String` or `&str`
 fn is_ty_stringish(cx: &LateContext<'_>, ty: Ty<'_>) -> bool {
-    is_type_diagnostic_item(cx, ty, sym::string_type) || is_type_diagnostic_item(cx, ty, sym::str)
+    is_type_diagnostic_item(cx, ty, sym::String) || is_type_diagnostic_item(cx, ty, sym::str)
 }
diff --git a/clippy_lints/src/functions/result_unit_err.rs b/clippy_lints/src/functions/result_unit_err.rs
index 13863ec8381..71f6f87ae60 100644
--- a/clippy_lints/src/functions/result_unit_err.rs
+++ b/clippy_lints/src/functions/result_unit_err.rs
@@ -48,7 +48,7 @@ fn check_result_unit_err(cx: &LateContext<'_>, decl: &hir::FnDecl<'_>, item_span
         if !in_external_macro(cx.sess(), item_span);
         if let hir::FnRetTy::Return(ty) = decl.output;
         let ty = hir_ty_to_ty(cx.tcx, ty);
-        if is_type_diagnostic_item(cx, ty, sym::result_type);
+        if is_type_diagnostic_item(cx, ty, sym::Result);
         if let ty::Adt(_, substs) = ty.kind();
         let err_ty = substs.type_at(1);
         if err_ty.is_unit();
diff --git a/clippy_lints/src/future_not_send.rs b/clippy_lints/src/future_not_send.rs
index 3e35ada7b2a..e18442515b8 100644
--- a/clippy_lints/src/future_not_send.rs
+++ b/clippy_lints/src/future_not_send.rs
@@ -75,7 +75,7 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
                 }
             }
             if is_future {
-                let send_trait = cx.tcx.get_diagnostic_item(sym::send_trait).unwrap();
+                let send_trait = cx.tcx.get_diagnostic_item(sym::Send).unwrap();
                 let span = decl.output.span();
                 let send_result = cx.tcx.infer_ctxt().enter(|infcx| {
                     let cause = traits::ObligationCause::misc(span, hir_id);
diff --git a/clippy_lints/src/get_last_with_len.rs b/clippy_lints/src/get_last_with_len.rs
index ced35030de8..f3929b0f1e6 100644
--- a/clippy_lints/src/get_last_with_len.rs
+++ b/clippy_lints/src/get_last_with_len.rs
@@ -58,7 +58,7 @@ impl<'tcx> LateLintPass<'tcx> for GetLastWithLen {
             // Argument 0 (the struct we're calling the method on) is a vector
             if let Some(struct_calling_on) = args.get(0);
             let struct_ty = cx.typeck_results().expr_ty(struct_calling_on);
-            if is_type_diagnostic_item(cx, struct_ty, sym::vec_type);
+            if is_type_diagnostic_item(cx, struct_ty, sym::Vec);
 
             // Argument to "get" is a subtraction
             if let Some(get_index_arg) = args.get(1);
diff --git a/clippy_lints/src/if_let_mutex.rs b/clippy_lints/src/if_let_mutex.rs
index ef72b88b3c7..a4118bf54b6 100644
--- a/clippy_lints/src/if_let_mutex.rs
+++ b/clippy_lints/src/if_let_mutex.rs
@@ -8,6 +8,7 @@ use rustc_hir::{Expr, ExprKind};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::hir::map::Map;
 use rustc_session::{declare_lint_pass, declare_tool_lint};
+use rustc_span::sym;
 
 declare_clippy_lint! {
     /// ### What it does
@@ -141,7 +142,7 @@ fn is_mutex_lock_call<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Opt
         if let ExprKind::MethodCall(path, _span, [self_arg, ..], _) = &expr.kind;
         if path.ident.as_str() == "lock";
         let ty = cx.typeck_results().expr_ty(self_arg);
-        if is_type_diagnostic_item(cx, ty, sym!(mutex_type));
+        if is_type_diagnostic_item(cx, ty, sym::Mutex);
         then {
             Some(self_arg)
         } else {
diff --git a/clippy_lints/src/implicit_hasher.rs b/clippy_lints/src/implicit_hasher.rs
index 77318e74ca8..81eb51e6f7c 100644
--- a/clippy_lints/src/implicit_hasher.rs
+++ b/clippy_lints/src/implicit_hasher.rs
@@ -233,14 +233,14 @@ impl<'tcx> ImplicitHasherType<'tcx> {
 
             let ty = hir_ty_to_ty(cx.tcx, hir_ty);
 
-            if is_type_diagnostic_item(cx, ty, sym::hashmap_type) && params_len == 2 {
+            if is_type_diagnostic_item(cx, ty, sym::HashMap) && params_len == 2 {
                 Some(ImplicitHasherType::HashMap(
                     hir_ty.span,
                     ty,
                     snippet(cx, params[0].span, "K"),
                     snippet(cx, params[1].span, "V"),
                 ))
-            } else if is_type_diagnostic_item(cx, ty, sym::hashset_type) && params_len == 1 {
+            } else if is_type_diagnostic_item(cx, ty, sym::HashSet) && params_len == 1 {
                 Some(ImplicitHasherType::HashSet(
                     hir_ty.span,
                     ty,
@@ -355,7 +355,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for ImplicitHasherConstructorVisitor<'a, 'b, 't
                     return;
                 }
 
-                if self.cx.tcx.is_diagnostic_item(sym::hashmap_type, ty_did) {
+                if self.cx.tcx.is_diagnostic_item(sym::HashMap, ty_did) {
                     if method.ident.name == sym::new {
                         self.suggestions
                             .insert(e.span, "HashMap::default()".to_string());
@@ -368,7 +368,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for ImplicitHasherConstructorVisitor<'a, 'b, 't
                             ),
                         );
                     }
-                } else if self.cx.tcx.is_diagnostic_item(sym::hashset_type, ty_did) {
+                } else if self.cx.tcx.is_diagnostic_item(sym::HashSet, ty_did) {
                     if method.ident.name == sym::new {
                         self.suggestions
                             .insert(e.span, "HashSet::default()".to_string());
diff --git a/clippy_lints/src/infinite_iter.rs b/clippy_lints/src/infinite_iter.rs
index 58646385def..68c1fa35fcc 100644
--- a/clippy_lints/src/infinite_iter.rs
+++ b/clippy_lints/src/infinite_iter.rs
@@ -210,11 +210,11 @@ const INFINITE_COLLECTORS: &[Symbol] = &[
     sym::BinaryHeap,
     sym::BTreeMap,
     sym::BTreeSet,
-    sym::hashmap_type,
-    sym::hashset_type,
+    sym::HashMap,
+    sym::HashSet,
     sym::LinkedList,
-    sym::vec_type,
-    sym::vecdeque_type,
+    sym::Vec,
+    sym::VecDeque,
 ];
 
 fn complete_infinite_iter(cx: &LateContext<'_>, expr: &Expr<'_>) -> Finiteness {
diff --git a/clippy_lints/src/inherent_impl.rs b/clippy_lints/src/inherent_impl.rs
index d87055c842c..0d23bec27a3 100644
--- a/clippy_lints/src/inherent_impl.rs
+++ b/clippy_lints/src/inherent_impl.rs
@@ -3,7 +3,7 @@
 use clippy_utils::diagnostics::span_lint_and_note;
 use clippy_utils::{in_macro, is_lint_allowed};
 use rustc_data_structures::fx::FxHashMap;
-use rustc_hir::{def_id::LocalDefId, Crate, Item, ItemKind, Node};
+use rustc_hir::{def_id::LocalDefId, Item, ItemKind, Node};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 use rustc_span::Span;
@@ -44,7 +44,7 @@ declare_clippy_lint! {
 declare_lint_pass!(MultipleInherentImpl => [MULTIPLE_INHERENT_IMPL]);
 
 impl<'tcx> LateLintPass<'tcx> for MultipleInherentImpl {
-    fn check_crate_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Crate<'_>) {
+    fn check_crate_post(&mut self, cx: &LateContext<'tcx>) {
         // Map from a type to it's first impl block. Needed to distinguish generic arguments.
         // e.g. `Foo<Bar>` and `Foo<Baz>`
         let mut type_map = FxHashMap::default();
diff --git a/clippy_lints/src/inherent_to_string.rs b/clippy_lints/src/inherent_to_string.rs
index b62fad4bd39..3c40ca50a09 100644
--- a/clippy_lints/src/inherent_to_string.rs
+++ b/clippy_lints/src/inherent_to_string.rs
@@ -111,7 +111,7 @@ impl<'tcx> LateLintPass<'tcx> for InherentToString {
             if impl_item.generics.params.is_empty();
 
             // Check if return type is String
-            if is_type_diagnostic_item(cx, return_ty(cx, impl_item.hir_id()), sym::string_type);
+            if is_type_diagnostic_item(cx, return_ty(cx, impl_item.hir_id()), sym::String);
 
             // Filters instances of to_string which are required by a trait
             if trait_ref_of_method(cx, impl_item.hir_id()).is_none();
diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs
index 1811f739421..f336fb9d42f 100644
--- a/clippy_lints/src/len_zero.rs
+++ b/clippy_lints/src/len_zero.rs
@@ -245,10 +245,10 @@ enum LenOutput<'tcx> {
 fn parse_len_output(cx: &LateContext<'_>, sig: FnSig<'tcx>) -> Option<LenOutput<'tcx>> {
     match *sig.output().kind() {
         ty::Int(_) | ty::Uint(_) => Some(LenOutput::Integral),
-        ty::Adt(adt, subs) if cx.tcx.is_diagnostic_item(sym::option_type, adt.did) => {
+        ty::Adt(adt, subs) if cx.tcx.is_diagnostic_item(sym::Option, adt.did) => {
             subs.type_at(0).is_integral().then(|| LenOutput::Option(adt.did))
         },
-        ty::Adt(adt, subs) if cx.tcx.is_diagnostic_item(sym::result_type, adt.did) => subs
+        ty::Adt(adt, subs) if cx.tcx.is_diagnostic_item(sym::Result, adt.did) => subs
             .type_at(0)
             .is_integral()
             .then(|| LenOutput::Result(adt.did, subs.type_at(1))),
diff --git a/clippy_lints/src/loops/explicit_iter_loop.rs b/clippy_lints/src/loops/explicit_iter_loop.rs
index 50bc096ba22..5ac69d106ce 100644
--- a/clippy_lints/src/loops/explicit_iter_loop.rs
+++ b/clippy_lints/src/loops/explicit_iter_loop.rs
@@ -54,11 +54,11 @@ fn is_ref_iterable_type(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
     // will allow further borrows afterwards
     let ty = cx.typeck_results().expr_ty(e);
     is_iterable_array(ty, cx) ||
-    is_type_diagnostic_item(cx, ty, sym::vec_type) ||
+    is_type_diagnostic_item(cx, ty, sym::Vec) ||
     is_type_diagnostic_item(cx, ty, sym::LinkedList) ||
-    is_type_diagnostic_item(cx, ty, sym::hashmap_type) ||
-    is_type_diagnostic_item(cx, ty, sym::hashset_type) ||
-    is_type_diagnostic_item(cx, ty, sym::vecdeque_type) ||
+    is_type_diagnostic_item(cx, ty, sym::HashMap) ||
+    is_type_diagnostic_item(cx, ty, sym::HashSet) ||
+    is_type_diagnostic_item(cx, ty, sym::VecDeque) ||
     is_type_diagnostic_item(cx, ty, sym::BinaryHeap) ||
     is_type_diagnostic_item(cx, ty, sym::BTreeMap) ||
     is_type_diagnostic_item(cx, ty, sym::BTreeSet)
diff --git a/clippy_lints/src/loops/for_kv_map.rs b/clippy_lints/src/loops/for_kv_map.rs
index dd60e460d21..bee0e1d7683 100644
--- a/clippy_lints/src/loops/for_kv_map.rs
+++ b/clippy_lints/src/loops/for_kv_map.rs
@@ -33,7 +33,7 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>, arg: &'tcx
                 _ => arg,
             };
 
-            if is_type_diagnostic_item(cx, ty, sym::hashmap_type) || is_type_diagnostic_item(cx, ty, sym::BTreeMap) {
+            if is_type_diagnostic_item(cx, ty, sym::HashMap) || is_type_diagnostic_item(cx, ty, sym::BTreeMap) {
                 span_lint_and_then(
                     cx,
                     FOR_KV_MAP,
diff --git a/clippy_lints/src/loops/for_loops_over_fallibles.rs b/clippy_lints/src/loops/for_loops_over_fallibles.rs
index d49b0517dcf..90530ebf003 100644
--- a/clippy_lints/src/loops/for_loops_over_fallibles.rs
+++ b/clippy_lints/src/loops/for_loops_over_fallibles.rs
@@ -9,7 +9,7 @@ use rustc_span::symbol::sym;
 /// Checks for `for` loops over `Option`s and `Result`s.
 pub(super) fn check(cx: &LateContext<'_>, pat: &Pat<'_>, arg: &Expr<'_>) {
     let ty = cx.typeck_results().expr_ty(arg);
-    if is_type_diagnostic_item(cx, ty, sym::option_type) {
+    if is_type_diagnostic_item(cx, ty, sym::Option) {
         span_lint_and_help(
             cx,
             FOR_LOOPS_OVER_FALLIBLES,
@@ -26,7 +26,7 @@ pub(super) fn check(cx: &LateContext<'_>, pat: &Pat<'_>, arg: &Expr<'_>) {
                 snippet(cx, arg.span, "_")
             ),
         );
-    } else if is_type_diagnostic_item(cx, ty, sym::result_type) {
+    } else if is_type_diagnostic_item(cx, ty, sym::Result) {
         span_lint_and_help(
             cx,
             FOR_LOOPS_OVER_FALLIBLES,
diff --git a/clippy_lints/src/loops/manual_memcpy.rs b/clippy_lints/src/loops/manual_memcpy.rs
index df848e68802..6bdc560efd7 100644
--- a/clippy_lints/src/loops/manual_memcpy.rs
+++ b/clippy_lints/src/loops/manual_memcpy.rs
@@ -329,7 +329,7 @@ fn is_slice_like<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'_>) -> bool {
         _ => false,
     };
 
-    is_slice || is_type_diagnostic_item(cx, ty, sym::vec_type) || is_type_diagnostic_item(cx, ty, sym::vecdeque_type)
+    is_slice || is_type_diagnostic_item(cx, ty, sym::Vec) || is_type_diagnostic_item(cx, ty, sym::VecDeque)
 }
 
 fn fetch_cloned_expr<'tcx>(expr: &'tcx Expr<'tcx>) -> &'tcx Expr<'tcx> {
diff --git a/clippy_lints/src/loops/needless_collect.rs b/clippy_lints/src/loops/needless_collect.rs
index f90ed7397e1..e87f4b66912 100644
--- a/clippy_lints/src/loops/needless_collect.rs
+++ b/clippy_lints/src/loops/needless_collect.rs
@@ -29,8 +29,8 @@ fn check_needless_collect_direct_usage<'tcx>(expr: &'tcx Expr<'_>, cx: &LateCont
             let mut applicability = Applicability::MaybeIncorrect;
             let is_empty_sugg = "next().is_none()".to_string();
             let method_name = &*method.ident.name.as_str();
-            let sugg = if is_type_diagnostic_item(cx, ty, sym::vec_type) ||
-                        is_type_diagnostic_item(cx, ty, sym::vecdeque_type) ||
+            let sugg = if is_type_diagnostic_item(cx, ty, sym::Vec) ||
+                        is_type_diagnostic_item(cx, ty, sym::VecDeque) ||
                         is_type_diagnostic_item(cx, ty, sym::LinkedList) ||
                         is_type_diagnostic_item(cx, ty, sym::BinaryHeap) {
                 match method_name {
@@ -47,7 +47,7 @@ fn check_needless_collect_direct_usage<'tcx>(expr: &'tcx Expr<'_>, cx: &LateCont
                 }
             }
             else if is_type_diagnostic_item(cx, ty, sym::BTreeMap) ||
-                is_type_diagnostic_item(cx, ty, sym::hashmap_type) {
+                is_type_diagnostic_item(cx, ty, sym::HashMap) {
                 match method_name {
                     "is_empty" => is_empty_sugg,
                     _ => return,
@@ -79,8 +79,8 @@ fn check_needless_collect_indirect_usage<'tcx>(expr: &'tcx Expr<'_>, cx: &LateCo
                 if let ExprKind::MethodCall(method_name, collect_span, &[ref iter_source], ..) = init_expr.kind;
                 if method_name.ident.name == sym!(collect) && is_trait_method(cx, init_expr, sym::Iterator);
                 let ty = cx.typeck_results().expr_ty(init_expr);
-                if is_type_diagnostic_item(cx, ty, sym::vec_type) ||
-                    is_type_diagnostic_item(cx, ty, sym::vecdeque_type) ||
+                if is_type_diagnostic_item(cx, ty, sym::Vec) ||
+                    is_type_diagnostic_item(cx, ty, sym::VecDeque) ||
                     is_type_diagnostic_item(cx, ty, sym::BinaryHeap) ||
                     is_type_diagnostic_item(cx, ty, sym::LinkedList);
                 if let Some(iter_calls) = detect_iter_and_into_iters(block, id);
diff --git a/clippy_lints/src/loops/same_item_push.rs b/clippy_lints/src/loops/same_item_push.rs
index 545498a1047..2eb247de9f4 100644
--- a/clippy_lints/src/loops/same_item_push.rs
+++ b/clippy_lints/src/loops/same_item_push.rs
@@ -192,7 +192,7 @@ fn get_vec_push<'tcx>(cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) -> Option<(&
             if let Some(self_expr) = args.get(0);
             if let Some(pushed_item) = args.get(1);
             // Check that the method being called is push() on a Vec
-            if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(self_expr), sym::vec_type);
+            if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(self_expr), sym::Vec);
             if path.ident.name.as_str() == "push";
             then {
                 return Some((self_expr, pushed_item))
diff --git a/clippy_lints/src/macro_use.rs b/clippy_lints/src/macro_use.rs
index 0e682c5cded..99ac4680720 100644
--- a/clippy_lints/src/macro_use.rs
+++ b/clippy_lints/src/macro_use.rs
@@ -136,7 +136,7 @@ impl<'tcx> LateLintPass<'tcx> for MacroUseImports {
         }
     }
     #[allow(clippy::too_many_lines)]
-    fn check_crate_post(&mut self, cx: &LateContext<'_>, _krate: &hir::Crate<'_>) {
+    fn check_crate_post(&mut self, cx: &LateContext<'_>) {
         let mut used = FxHashMap::default();
         let mut check_dup = vec![];
         for (import, span) in &self.imports {
diff --git a/clippy_lints/src/main_recursion.rs b/clippy_lints/src/main_recursion.rs
index 776e4b3fe76..23b3ba2296e 100644
--- a/clippy_lints/src/main_recursion.rs
+++ b/clippy_lints/src/main_recursion.rs
@@ -2,7 +2,7 @@ use clippy_utils::diagnostics::span_lint_and_help;
 use clippy_utils::source::snippet;
 use clippy_utils::{is_entrypoint_fn, is_no_std_crate};
 use if_chain::if_chain;
-use rustc_hir::{Crate, Expr, ExprKind, QPath};
+use rustc_hir::{Expr, ExprKind, QPath};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_tool_lint, impl_lint_pass};
 
@@ -33,7 +33,7 @@ pub struct MainRecursion {
 impl_lint_pass!(MainRecursion => [MAIN_RECURSION]);
 
 impl LateLintPass<'_> for MainRecursion {
-    fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'_>) {
         self.has_no_std_attr = is_no_std_crate(cx);
     }
 
diff --git a/clippy_lints/src/manual_map.rs b/clippy_lints/src/manual_map.rs
index b5f573cb104..96df3d0a490 100644
--- a/clippy_lints/src/manual_map.rs
+++ b/clippy_lints/src/manual_map.rs
@@ -61,8 +61,8 @@ impl LateLintPass<'_> for ManualMap {
 
         let (scrutinee_ty, ty_ref_count, ty_mutability) =
             peel_mid_ty_refs_is_mutable(cx.typeck_results().expr_ty(scrutinee));
-        if !(is_type_diagnostic_item(cx, scrutinee_ty, sym::option_type)
-            && is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::option_type))
+        if !(is_type_diagnostic_item(cx, scrutinee_ty, sym::Option)
+            && is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::Option))
         {
             return;
         }
diff --git a/clippy_lints/src/manual_ok_or.rs b/clippy_lints/src/manual_ok_or.rs
index b2f287af697..cf641d0ce86 100644
--- a/clippy_lints/src/manual_ok_or.rs
+++ b/clippy_lints/src/manual_ok_or.rs
@@ -51,7 +51,7 @@ impl LateLintPass<'_> for ManualOkOr {
             if args.len() == 3;
             let method_receiver = &args[0];
             let ty = cx.typeck_results().expr_ty(method_receiver);
-            if is_type_diagnostic_item(cx, ty, sym::option_type);
+            if is_type_diagnostic_item(cx, ty, sym::Option);
             let or_expr = &args[1];
             if is_ok_wrapping(cx, &args[2]);
             if let ExprKind::Call(Expr { kind: ExprKind::Path(err_path), .. }, &[ref err_arg]) = or_expr.kind;
diff --git a/clippy_lints/src/manual_unwrap_or.rs b/clippy_lints/src/manual_unwrap_or.rs
index 426789742d5..2ae9cb4f9c1 100644
--- a/clippy_lints/src/manual_unwrap_or.rs
+++ b/clippy_lints/src/manual_unwrap_or.rs
@@ -82,9 +82,9 @@ fn lint_manual_unwrap_or<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) {
     if_chain! {
         if let ExprKind::Match(scrutinee, match_arms, _) = expr.kind;
         let ty = cx.typeck_results().expr_ty(scrutinee);
-        if let Some(ty_name) = if is_type_diagnostic_item(cx, ty, sym::option_type) {
+        if let Some(ty_name) = if is_type_diagnostic_item(cx, ty, sym::Option) {
             Some("Option")
-        } else if is_type_diagnostic_item(cx, ty, sym::result_type) {
+        } else if is_type_diagnostic_item(cx, ty, sym::Result) {
             Some("Result")
         } else {
             None
diff --git a/clippy_lints/src/map_clone.rs b/clippy_lints/src/map_clone.rs
index 394606200bb..7db5c7e52ea 100644
--- a/clippy_lints/src/map_clone.rs
+++ b/clippy_lints/src/map_clone.rs
@@ -55,7 +55,7 @@ impl<'tcx> LateLintPass<'tcx> for MapClone {
             if args.len() == 2;
             if method.ident.name == sym::map;
             let ty = cx.typeck_results().expr_ty(&args[0]);
-            if is_type_diagnostic_item(cx, ty, sym::option_type) || is_trait_method(cx, e, sym::Iterator);
+            if is_type_diagnostic_item(cx, ty, sym::Option) || is_trait_method(cx, e, sym::Iterator);
             if let hir::ExprKind::Closure(_, _, body_id, _, _) = args[1].kind;
             then {
                 let closure_body = cx.tcx.hir().body(body_id);
diff --git a/clippy_lints/src/map_unit_fn.rs b/clippy_lints/src/map_unit_fn.rs
index fd40590d077..40de9ffcd4e 100644
--- a/clippy_lints/src/map_unit_fn.rs
+++ b/clippy_lints/src/map_unit_fn.rs
@@ -205,14 +205,13 @@ fn suggestion_msg(function_type: &str, map_type: &str) -> String {
 fn lint_map_unit_fn(cx: &LateContext<'_>, stmt: &hir::Stmt<'_>, expr: &hir::Expr<'_>, map_args: &[hir::Expr<'_>]) {
     let var_arg = &map_args[0];
 
-    let (map_type, variant, lint) =
-        if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(var_arg), sym::option_type) {
-            ("Option", "Some", OPTION_MAP_UNIT_FN)
-        } else if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(var_arg), sym::result_type) {
-            ("Result", "Ok", RESULT_MAP_UNIT_FN)
-        } else {
-            return;
-        };
+    let (map_type, variant, lint) = if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(var_arg), sym::Option) {
+        ("Option", "Some", OPTION_MAP_UNIT_FN)
+    } else if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(var_arg), sym::Result) {
+        ("Result", "Ok", RESULT_MAP_UNIT_FN)
+    } else {
+        return;
+    };
     let fn_arg = &map_args[1];
 
     if is_unit_function(cx, fn_arg) {
diff --git a/clippy_lints/src/match_on_vec_items.rs b/clippy_lints/src/match_on_vec_items.rs
index e66a35452f0..552c9a58897 100644
--- a/clippy_lints/src/match_on_vec_items.rs
+++ b/clippy_lints/src/match_on_vec_items.rs
@@ -93,7 +93,7 @@ fn is_vec_indexing<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Opti
 fn is_vector(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
     let ty = cx.typeck_results().expr_ty(expr);
     let ty = ty.peel_refs();
-    is_type_diagnostic_item(cx, ty, sym::vec_type)
+    is_type_diagnostic_item(cx, ty, sym::Vec)
 }
 
 fn is_full_range(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
diff --git a/clippy_lints/src/match_result_ok.rs b/clippy_lints/src/match_result_ok.rs
index c7de06f0815..3db1f0421ea 100644
--- a/clippy_lints/src/match_result_ok.rs
+++ b/clippy_lints/src/match_result_ok.rs
@@ -60,7 +60,7 @@ impl<'tcx> LateLintPass<'tcx> for MatchResultOk {
             if let ExprKind::MethodCall(_, ok_span, [ref result_types_0, ..], _) = let_expr.kind; //check is expr.ok() has type Result<T,E>.ok(, _)
             if let PatKind::TupleStruct(QPath::Resolved(_, x), y, _)  = let_pat.kind; //get operation
             if method_chain_args(let_expr, &["ok"]).is_some(); //test to see if using ok() methoduse std::marker::Sized;
-            if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(result_types_0), sym::result_type);
+            if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(result_types_0), sym::Result);
             if rustc_hir_pretty::to_string(rustc_hir_pretty::NO_ANN, |s| s.print_path(x, false)) == "Some";
 
             then {
diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs
index d878fbc35fd..56d4163a6b3 100644
--- a/clippy_lints/src/matches.rs
+++ b/clippy_lints/src/matches.rs
@@ -948,7 +948,7 @@ fn check_overlapping_arms<'tcx>(cx: &LateContext<'tcx>, ex: &'tcx Expr<'_>, arms
 
 fn check_wild_err_arm<'tcx>(cx: &LateContext<'tcx>, ex: &Expr<'tcx>, arms: &[Arm<'tcx>]) {
     let ex_ty = cx.typeck_results().expr_ty(ex).peel_refs();
-    if is_type_diagnostic_item(cx, ex_ty, sym::result_type) {
+    if is_type_diagnostic_item(cx, ex_ty, sym::Result) {
         for arm in arms {
             if let PatKind::TupleStruct(ref path, inner, _) = arm.pat.kind {
                 let path_str = rustc_hir_pretty::to_string(rustc_hir_pretty::NO_ANN, |s| s.print_qpath(path, false));
@@ -1025,8 +1025,7 @@ fn check_wild_enum_match(cx: &LateContext<'_>, ex: &Expr<'_>, arms: &[Arm<'_>])
     let adt_def = match ty.kind() {
         ty::Adt(adt_def, _)
             if adt_def.is_enum()
-                && !(is_type_diagnostic_item(cx, ty, sym::option_type)
-                    || is_type_diagnostic_item(cx, ty, sym::result_type)) =>
+                && !(is_type_diagnostic_item(cx, ty, sym::Option) || is_type_diagnostic_item(cx, ty, sym::Result)) =>
         {
             adt_def
         },
@@ -1869,7 +1868,7 @@ mod redundant_pattern_match {
             }
         }
         // Check for std types which implement drop, but only for memory allocation.
-        else if is_type_diagnostic_item(cx, ty, sym::vec_type)
+        else if is_type_diagnostic_item(cx, ty, sym::Vec)
             || is_type_lang_item(cx, ty, LangItem::OwnedBox)
             || is_type_diagnostic_item(cx, ty, sym::Rc)
             || is_type_diagnostic_item(cx, ty, sym::Arc)
diff --git a/clippy_lints/src/methods/bytes_nth.rs b/clippy_lints/src/methods/bytes_nth.rs
index 2ad3e673c57..76eaedea8a0 100644
--- a/clippy_lints/src/methods/bytes_nth.rs
+++ b/clippy_lints/src/methods/bytes_nth.rs
@@ -12,7 +12,7 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, recv: &'tcx E
     let ty = cx.typeck_results().expr_ty(recv).peel_refs();
     let caller_type = if ty.is_str() {
         "str"
-    } else if is_type_diagnostic_item(cx, ty, sym::string_type) {
+    } else if is_type_diagnostic_item(cx, ty, sym::String) {
         "String"
     } else {
         return;
diff --git a/clippy_lints/src/methods/cloned_instead_of_copied.rs b/clippy_lints/src/methods/cloned_instead_of_copied.rs
index f5b4b6bf8ea..6fe69b8f01f 100644
--- a/clippy_lints/src/methods/cloned_instead_of_copied.rs
+++ b/clippy_lints/src/methods/cloned_instead_of_copied.rs
@@ -15,7 +15,7 @@ pub fn check(cx: &LateContext<'_>, expr: &Expr<'_>, recv: &Expr<'_>, span: Span,
     let inner_ty = match recv_ty.kind() {
         // `Option<T>` -> `T`
         ty::Adt(adt, subst)
-            if cx.tcx.is_diagnostic_item(sym::option_type, adt.did) && meets_msrv(msrv, &msrvs::OPTION_COPIED) =>
+            if cx.tcx.is_diagnostic_item(sym::Option, adt.did) && meets_msrv(msrv, &msrvs::OPTION_COPIED) =>
         {
             subst.type_at(0)
         },
diff --git a/clippy_lints/src/methods/expect_fun_call.rs b/clippy_lints/src/methods/expect_fun_call.rs
index f8ee31a00df..0ec9387f9c4 100644
--- a/clippy_lints/src/methods/expect_fun_call.rs
+++ b/clippy_lints/src/methods/expect_fun_call.rs
@@ -28,7 +28,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, method_span: Spa
                         && {
                             let arg_type = cx.typeck_results().expr_ty(&call_args[0]);
                             let base_type = arg_type.peel_refs();
-                            *base_type.kind() == ty::Str || is_type_diagnostic_item(cx, base_type, sym::string_type)
+                            *base_type.kind() == ty::Str || is_type_diagnostic_item(cx, base_type, sym::String)
                         }
                     {
                         &call_args[0]
@@ -46,7 +46,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, method_span: Spa
     // converted to string.
     fn requires_to_string(cx: &LateContext<'_>, arg: &hir::Expr<'_>) -> bool {
         let arg_ty = cx.typeck_results().expr_ty(arg);
-        if is_type_diagnostic_item(cx, arg_ty, sym::string_type) {
+        if is_type_diagnostic_item(cx, arg_ty, sym::String) {
             return false;
         }
         if let ty::Ref(_, ty, ..) = arg_ty.kind() {
@@ -113,9 +113,9 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, method_span: Spa
     }
 
     let receiver_type = cx.typeck_results().expr_ty_adjusted(&args[0]);
-    let closure_args = if is_type_diagnostic_item(cx, receiver_type, sym::option_type) {
+    let closure_args = if is_type_diagnostic_item(cx, receiver_type, sym::Option) {
         "||"
-    } else if is_type_diagnostic_item(cx, receiver_type, sym::result_type) {
+    } else if is_type_diagnostic_item(cx, receiver_type, sym::Result) {
         "|_|"
     } else {
         return;
diff --git a/clippy_lints/src/methods/expect_used.rs b/clippy_lints/src/methods/expect_used.rs
index 63a834fdce0..55be513c5bb 100644
--- a/clippy_lints/src/methods/expect_used.rs
+++ b/clippy_lints/src/methods/expect_used.rs
@@ -10,9 +10,9 @@ use super::EXPECT_USED;
 pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr<'_>) {
     let obj_ty = cx.typeck_results().expr_ty(recv).peel_refs();
 
-    let mess = if is_type_diagnostic_item(cx, obj_ty, sym::option_type) {
+    let mess = if is_type_diagnostic_item(cx, obj_ty, sym::Option) {
         Some((EXPECT_USED, "an Option", "None"))
-    } else if is_type_diagnostic_item(cx, obj_ty, sym::result_type) {
+    } else if is_type_diagnostic_item(cx, obj_ty, sym::Result) {
         Some((EXPECT_USED, "a Result", "Err"))
     } else {
         None
diff --git a/clippy_lints/src/methods/extend_with_drain.rs b/clippy_lints/src/methods/extend_with_drain.rs
index 8829b8c5f4d..687636f8237 100644
--- a/clippy_lints/src/methods/extend_with_drain.rs
+++ b/clippy_lints/src/methods/extend_with_drain.rs
@@ -12,7 +12,7 @@ use super::EXTEND_WITH_DRAIN;
 pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, recv: &Expr<'_>, arg: &Expr<'_>) {
     let ty = cx.typeck_results().expr_ty(recv).peel_refs();
     if_chain! {
-        if is_type_diagnostic_item(cx, ty, sym::vec_type);
+        if is_type_diagnostic_item(cx, ty, sym::Vec);
         //check source object
         if let ExprKind::MethodCall(src_method, _, [drain_vec, drain_arg], _) = &arg.kind;
         if src_method.ident.as_str() == "drain";
@@ -20,7 +20,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, recv: &Expr<'_>, arg:
         //check if actual src type is mutable for code suggestion
         let immutable = src_ty.is_mutable_ptr();
         let src_ty = src_ty.peel_refs();
-        if is_type_diagnostic_item(cx, src_ty, sym::vec_type);
+        if is_type_diagnostic_item(cx, src_ty, sym::Vec);
         //check drain range
         if let src_ty_range = cx.typeck_results().expr_ty(drain_arg).peel_refs();
         if is_type_lang_item(cx, src_ty_range, LangItem::RangeFull);
diff --git a/clippy_lints/src/methods/filter_map.rs b/clippy_lints/src/methods/filter_map.rs
index 35fae450eeb..c96c817bb8b 100644
--- a/clippy_lints/src/methods/filter_map.rs
+++ b/clippy_lints/src/methods/filter_map.rs
@@ -61,7 +61,7 @@ fn lint_filter_some_map_unwrap(
     methods_span: Span,
 ) {
     let iterator = is_trait_method(cx, expr, sym::Iterator);
-    let option = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(filter_recv), sym::option_type);
+    let option = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(filter_recv), sym::Option);
     if (iterator || option) && is_option_filter_map(cx, filter_arg, map_arg) {
         let msg = "`filter` for `Some` followed by `unwrap`";
         let help = "consider using `flatten` instead";
@@ -120,9 +120,9 @@ pub(super) fn check<'tcx>(
             if let PatKind::Binding(_, filter_param_id, _, None) = filter_pat.kind;
             if let ExprKind::MethodCall(path, _, [filter_arg], _) = filter_body.value.kind;
             if let Some(opt_ty) = cx.typeck_results().expr_ty(filter_arg).ty_adt_def();
-            if let Some(is_result) = if cx.tcx.is_diagnostic_item(sym::option_type, opt_ty.did) {
+            if let Some(is_result) = if cx.tcx.is_diagnostic_item(sym::Option, opt_ty.did) {
                 Some(false)
-            } else if cx.tcx.is_diagnostic_item(sym::result_type, opt_ty.did) {
+            } else if cx.tcx.is_diagnostic_item(sym::Result, opt_ty.did) {
                 Some(true)
             } else {
                 None
diff --git a/clippy_lints/src/methods/flat_map_option.rs b/clippy_lints/src/methods/flat_map_option.rs
index 32d40d97bf4..615bde94133 100644
--- a/clippy_lints/src/methods/flat_map_option.rs
+++ b/clippy_lints/src/methods/flat_map_option.rs
@@ -19,7 +19,7 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>, arg
         _ if arg_ty.is_fn() => arg_ty.fn_sig(cx.tcx),
         _ => return,
     };
-    if !is_type_diagnostic_item(cx, sig.output().skip_binder(), sym::option_type) {
+    if !is_type_diagnostic_item(cx, sig.output().skip_binder(), sym::Option) {
         return;
     }
     span_lint_and_sugg(
diff --git a/clippy_lints/src/methods/get_unwrap.rs b/clippy_lints/src/methods/get_unwrap.rs
index 66fb85deae5..18e08d6ee23 100644
--- a/clippy_lints/src/methods/get_unwrap.rs
+++ b/clippy_lints/src/methods/get_unwrap.rs
@@ -27,13 +27,13 @@ pub(super) fn check<'tcx>(
     let caller_type = if derefs_to_slice(cx, recv, expr_ty).is_some() {
         needs_ref = get_args_str.parse::<usize>().is_ok();
         "slice"
-    } else if is_type_diagnostic_item(cx, expr_ty, sym::vec_type) {
+    } else if is_type_diagnostic_item(cx, expr_ty, sym::Vec) {
         needs_ref = get_args_str.parse::<usize>().is_ok();
         "Vec"
-    } else if is_type_diagnostic_item(cx, expr_ty, sym::vecdeque_type) {
+    } else if is_type_diagnostic_item(cx, expr_ty, sym::VecDeque) {
         needs_ref = get_args_str.parse::<usize>().is_ok();
         "VecDeque"
-    } else if !is_mut && is_type_diagnostic_item(cx, expr_ty, sym::hashmap_type) {
+    } else if !is_mut && is_type_diagnostic_item(cx, expr_ty, sym::HashMap) {
         needs_ref = true;
         "HashMap"
     } else if !is_mut && is_type_diagnostic_item(cx, expr_ty, sym::BTreeMap) {
diff --git a/clippy_lints/src/methods/inefficient_to_string.rs b/clippy_lints/src/methods/inefficient_to_string.rs
index 950ec62c9fe..c0f66feb48a 100644
--- a/clippy_lints/src/methods/inefficient_to_string.rs
+++ b/clippy_lints/src/methods/inefficient_to_string.rs
@@ -55,7 +55,7 @@ fn specializes_tostring(cx: &LateContext<'_>, ty: Ty<'_>) -> bool {
         return true;
     }
 
-    if is_type_diagnostic_item(cx, ty, sym::string_type) {
+    if is_type_diagnostic_item(cx, ty, sym::String) {
         return true;
     }
 
diff --git a/clippy_lints/src/methods/iter_cloned_collect.rs b/clippy_lints/src/methods/iter_cloned_collect.rs
index 739f313716e..dd4ef6e4b58 100644
--- a/clippy_lints/src/methods/iter_cloned_collect.rs
+++ b/clippy_lints/src/methods/iter_cloned_collect.rs
@@ -11,7 +11,7 @@ use super::ITER_CLONED_COLLECT;
 
 pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &hir::Expr<'_>, recv: &'tcx hir::Expr<'_>) {
     if_chain! {
-        if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::vec_type);
+        if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::Vec);
         if let Some(slice) = derefs_to_slice(cx, recv, cx.typeck_results().expr_ty(recv));
         if let Some(to_replace) = expr.span.trim_start(slice.span.source_callsite());
 
diff --git a/clippy_lints/src/methods/iter_count.rs b/clippy_lints/src/methods/iter_count.rs
index b69f57f50e0..052be3d8ee7 100644
--- a/clippy_lints/src/methods/iter_count.rs
+++ b/clippy_lints/src/methods/iter_count.rs
@@ -13,13 +13,13 @@ pub(crate) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, recv: &'tcx E
     let ty = cx.typeck_results().expr_ty(recv);
     let caller_type = if derefs_to_slice(cx, recv, ty).is_some() {
         "slice"
-    } else if is_type_diagnostic_item(cx, ty, sym::vec_type) {
+    } else if is_type_diagnostic_item(cx, ty, sym::Vec) {
         "Vec"
-    } else if is_type_diagnostic_item(cx, ty, sym::vecdeque_type) {
+    } else if is_type_diagnostic_item(cx, ty, sym::VecDeque) {
         "VecDeque"
-    } else if is_type_diagnostic_item(cx, ty, sym::hashset_type) {
+    } else if is_type_diagnostic_item(cx, ty, sym::HashSet) {
         "HashSet"
-    } else if is_type_diagnostic_item(cx, ty, sym::hashmap_type) {
+    } else if is_type_diagnostic_item(cx, ty, sym::HashMap) {
         "HashMap"
     } else if is_type_diagnostic_item(cx, ty, sym::BTreeMap) {
         "BTreeMap"
diff --git a/clippy_lints/src/methods/iter_next_slice.rs b/clippy_lints/src/methods/iter_next_slice.rs
index 6954da67e32..d053ff56756 100644
--- a/clippy_lints/src/methods/iter_next_slice.rs
+++ b/clippy_lints/src/methods/iter_next_slice.rs
@@ -64,6 +64,6 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>, cal
 }
 
 fn is_vec_or_array<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) -> bool {
-    is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::vec_type)
+    is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::Vec)
         || matches!(&cx.typeck_results().expr_ty(expr).peel_refs().kind(), ty::Array(_, _))
 }
diff --git a/clippy_lints/src/methods/iter_nth.rs b/clippy_lints/src/methods/iter_nth.rs
index c2232239fe4..80ca4c94219 100644
--- a/clippy_lints/src/methods/iter_nth.rs
+++ b/clippy_lints/src/methods/iter_nth.rs
@@ -19,9 +19,9 @@ pub(super) fn check<'tcx>(
     let mut_str = if is_mut { "_mut" } else { "" };
     let caller_type = if derefs_to_slice(cx, iter_recv, cx.typeck_results().expr_ty(iter_recv)).is_some() {
         "slice"
-    } else if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(iter_recv), sym::vec_type) {
+    } else if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(iter_recv), sym::Vec) {
         "Vec"
-    } else if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(iter_recv), sym::vecdeque_type) {
+    } else if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(iter_recv), sym::VecDeque) {
         "VecDeque"
     } else {
         iter_nth_zero::check(cx, expr, nth_recv, nth_arg);
diff --git a/clippy_lints/src/methods/manual_split_once.rs b/clippy_lints/src/methods/manual_split_once.rs
index 55688677e1d..13eb72251bb 100644
--- a/clippy_lints/src/methods/manual_split_once.rs
+++ b/clippy_lints/src/methods/manual_split_once.rs
@@ -123,7 +123,7 @@ fn parse_iter_usage(
                     return if_chain! {
                         if match_def_path(cx, did, &paths::ITERTOOLS_NEXT_TUPLE);
                         if let ty::Adt(adt_def, subs) = cx.typeck_results().expr_ty(e).kind();
-                        if cx.tcx.is_diagnostic_item(sym::option_type, adt_def.did);
+                        if cx.tcx.is_diagnostic_item(sym::Option, adt_def.did);
                         if let ty::Tuple(subs) = subs.type_at(0).kind();
                         if subs.len() == 2;
                         then {
@@ -193,7 +193,7 @@ fn parse_iter_usage(
                     && cx
                         .typeck_results()
                         .type_dependent_def_id(e.hir_id)
-                        .map_or(false, |id| is_diag_item_method(cx, id, sym::option_type)) =>
+                        .map_or(false, |id| is_diag_item_method(cx, id, sym::Option)) =>
             {
                 (Some(UnwrapKind::Unwrap), e.span)
             },
diff --git a/clippy_lints/src/methods/manual_str_repeat.rs b/clippy_lints/src/methods/manual_str_repeat.rs
index 919e2628c52..d74c910b676 100644
--- a/clippy_lints/src/methods/manual_str_repeat.rs
+++ b/clippy_lints/src/methods/manual_str_repeat.rs
@@ -36,14 +36,14 @@ fn parse_repeat_arg(cx: &LateContext<'_>, e: &Expr<'_>) -> Option<RepeatKind> {
         }
     } else {
         let ty = cx.typeck_results().expr_ty(e);
-        if is_type_diagnostic_item(cx, ty, sym::string_type)
+        if is_type_diagnostic_item(cx, ty, sym::String)
             || (is_type_lang_item(cx, ty, LangItem::OwnedBox) && get_ty_param(ty).map_or(false, TyS::is_str))
             || (match_type(cx, ty, &paths::COW) && get_ty_param(ty).map_or(false, TyS::is_str))
         {
             Some(RepeatKind::String)
         } else {
             let ty = ty.peel_refs();
-            (ty.is_str() || is_type_diagnostic_item(cx, ty, sym::string_type)).then(|| RepeatKind::String)
+            (ty.is_str() || is_type_diagnostic_item(cx, ty, sym::String)).then(|| RepeatKind::String)
         }
     }
 }
@@ -58,7 +58,7 @@ pub(super) fn check(
     if_chain! {
         if let ExprKind::Call(repeat_fn, [repeat_arg]) = take_self_arg.kind;
         if is_expr_path_def_path(cx, repeat_fn, &paths::ITER_REPEAT);
-        if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(collect_expr), sym::string_type);
+        if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(collect_expr), sym::String);
         if let Some(collect_id) = cx.typeck_results().type_dependent_def_id(collect_expr.hir_id);
         if let Some(take_id) = cx.typeck_results().type_dependent_def_id(take_expr.hir_id);
         if let Some(iter_trait_id) = cx.tcx.get_diagnostic_item(sym::Iterator);
diff --git a/clippy_lints/src/methods/map_collect_result_unit.rs b/clippy_lints/src/methods/map_collect_result_unit.rs
index 82063ad70b5..d420f144eea 100644
--- a/clippy_lints/src/methods/map_collect_result_unit.rs
+++ b/clippy_lints/src/methods/map_collect_result_unit.rs
@@ -23,7 +23,7 @@ pub(super) fn check(
         if is_trait_method(cx, collect_recv, sym::Iterator);
         // return of collect `Result<(),_>`
         let collect_ret_ty = cx.typeck_results().expr_ty(expr);
-        if is_type_diagnostic_item(cx, collect_ret_ty, sym::result_type);
+        if is_type_diagnostic_item(cx, collect_ret_ty, sym::Result);
         if let ty::Adt(_, substs) = collect_ret_ty.kind();
         if let Some(result_t) = substs.types().next();
         if result_t.is_unit();
diff --git a/clippy_lints/src/methods/map_flatten.rs b/clippy_lints/src/methods/map_flatten.rs
index 08d3a7ce92b..6782f64f2ca 100644
--- a/clippy_lints/src/methods/map_flatten.rs
+++ b/clippy_lints/src/methods/map_flatten.rs
@@ -27,7 +27,7 @@ pub(super) fn check<'tcx>(
                     _ => map_closure_ty.fn_sig(cx.tcx),
                 };
                 let map_closure_return_ty = cx.tcx.erase_late_bound_regions(map_closure_sig.output());
-                is_type_diagnostic_item(cx, map_closure_return_ty, sym::option_type)
+                is_type_diagnostic_item(cx, map_closure_return_ty, sym::Option)
             },
             _ => false,
         };
@@ -55,9 +55,9 @@ pub(super) fn check<'tcx>(
     // lint if caller of `.map().flatten()` is an Option or Result
     let caller_type = match cx.typeck_results().expr_ty(recv).kind() {
         ty::Adt(adt, _) => {
-            if cx.tcx.is_diagnostic_item(sym::option_type, adt.did) {
+            if cx.tcx.is_diagnostic_item(sym::Option, adt.did) {
                 "Option"
-            } else if cx.tcx.is_diagnostic_item(sym::result_type, adt.did) {
+            } else if cx.tcx.is_diagnostic_item(sym::Result, adt.did) {
                 "Result"
             } else {
                 return;
diff --git a/clippy_lints/src/methods/map_identity.rs b/clippy_lints/src/methods/map_identity.rs
index 538a12566e3..f112b500d3d 100644
--- a/clippy_lints/src/methods/map_identity.rs
+++ b/clippy_lints/src/methods/map_identity.rs
@@ -19,8 +19,8 @@ pub(super) fn check(
 
     if_chain! {
         if is_trait_method(cx, expr, sym::Iterator)
-            || is_type_diagnostic_item(cx, caller_ty, sym::result_type)
-            || is_type_diagnostic_item(cx, caller_ty, sym::option_type);
+            || is_type_diagnostic_item(cx, caller_ty, sym::Result)
+            || is_type_diagnostic_item(cx, caller_ty, sym::Option);
         if is_expr_identity_function(cx, map_arg);
         if let Some(sugg_span) = expr.span.trim_start(caller.span);
         then {
diff --git a/clippy_lints/src/methods/map_unwrap_or.rs b/clippy_lints/src/methods/map_unwrap_or.rs
index 4d8365fcda1..9ec84e76519 100644
--- a/clippy_lints/src/methods/map_unwrap_or.rs
+++ b/clippy_lints/src/methods/map_unwrap_or.rs
@@ -22,8 +22,8 @@ pub(super) fn check<'tcx>(
     msrv: Option<&RustcVersion>,
 ) -> bool {
     // lint if the caller of `map()` is an `Option`
-    let is_option = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::option_type);
-    let is_result = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::result_type);
+    let is_option = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::Option);
+    let is_result = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::Result);
 
     if is_result && !meets_msrv(msrv, &msrvs::RESULT_MAP_OR_ELSE) {
         return false;
diff --git a/clippy_lints/src/methods/ok_expect.rs b/clippy_lints/src/methods/ok_expect.rs
index d0b1b4b84be..d64a9f320d9 100644
--- a/clippy_lints/src/methods/ok_expect.rs
+++ b/clippy_lints/src/methods/ok_expect.rs
@@ -12,7 +12,7 @@ use super::OK_EXPECT;
 pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr<'_>) {
     if_chain! {
         // lint if the caller of `ok()` is a `Result`
-        if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::result_type);
+        if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::Result);
         let result_type = cx.typeck_results().expr_ty(recv);
         if let Some(error_type) = get_error_type(cx, result_type);
         if has_debug_impl(error_type, cx);
@@ -33,7 +33,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr
 /// Given a `Result<T, E>` type, return its error type (`E`).
 fn get_error_type<'a>(cx: &LateContext<'_>, ty: Ty<'a>) -> Option<Ty<'a>> {
     match ty.kind() {
-        ty::Adt(_, substs) if is_type_diagnostic_item(cx, ty, sym::result_type) => substs.types().nth(1),
+        ty::Adt(_, substs) if is_type_diagnostic_item(cx, ty, sym::Result) => substs.types().nth(1),
         _ => None,
     }
 }
@@ -41,6 +41,6 @@ fn get_error_type<'a>(cx: &LateContext<'_>, ty: Ty<'a>) -> Option<Ty<'a>> {
 /// This checks whether a given type is known to implement Debug.
 fn has_debug_impl<'tcx>(ty: Ty<'tcx>, cx: &LateContext<'tcx>) -> bool {
     cx.tcx
-        .get_diagnostic_item(sym::debug_trait)
+        .get_diagnostic_item(sym::Debug)
         .map_or(false, |debug| implements_trait(cx, ty, debug, &[]))
 }
diff --git a/clippy_lints/src/methods/option_as_ref_deref.rs b/clippy_lints/src/methods/option_as_ref_deref.rs
index 5a57135038f..d3f40d26208 100644
--- a/clippy_lints/src/methods/option_as_ref_deref.rs
+++ b/clippy_lints/src/methods/option_as_ref_deref.rs
@@ -28,7 +28,7 @@ pub(super) fn check<'tcx>(
     let same_mutability = |m| (is_mut && m == &hir::Mutability::Mut) || (!is_mut && m == &hir::Mutability::Not);
 
     let option_ty = cx.typeck_results().expr_ty(as_ref_recv);
-    if !is_type_diagnostic_item(cx, option_ty, sym::option_type) {
+    if !is_type_diagnostic_item(cx, option_ty, sym::Option) {
         return;
     }
 
diff --git a/clippy_lints/src/methods/option_map_or_none.rs b/clippy_lints/src/methods/option_map_or_none.rs
index 36a1c13d5be..e99b6b07d15 100644
--- a/clippy_lints/src/methods/option_map_or_none.rs
+++ b/clippy_lints/src/methods/option_map_or_none.rs
@@ -19,8 +19,8 @@ pub(super) fn check<'tcx>(
     def_arg: &'tcx hir::Expr<'_>,
     map_arg: &'tcx hir::Expr<'_>,
 ) {
-    let is_option = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::option_type);
-    let is_result = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::result_type);
+    let is_option = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::Option);
+    let is_result = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::Result);
 
     // There are two variants of this `map_or` lint:
     // (1) using `map_or` as an adapter from `Result<T,E>` to `Option<T>`
diff --git a/clippy_lints/src/methods/option_map_unwrap_or.rs b/clippy_lints/src/methods/option_map_unwrap_or.rs
index 5bca49dec24..2faa6a69f81 100644
--- a/clippy_lints/src/methods/option_map_unwrap_or.rs
+++ b/clippy_lints/src/methods/option_map_unwrap_or.rs
@@ -25,7 +25,7 @@ pub(super) fn check<'tcx>(
     map_span: Span,
 ) {
     // lint if the caller of `map()` is an `Option`
-    if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::option_type) {
+    if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::Option) {
         if !is_copy(cx, cx.typeck_results().expr_ty(unwrap_arg)) {
             // Do not lint if the `map` argument uses identifiers in the `map`
             // argument that are also used in the `unwrap_or` argument
diff --git a/clippy_lints/src/methods/or_fun_call.rs b/clippy_lints/src/methods/or_fun_call.rs
index a4d3f0bfb6c..b5bbbb09092 100644
--- a/clippy_lints/src/methods/or_fun_call.rs
+++ b/clippy_lints/src/methods/or_fun_call.rs
@@ -105,7 +105,7 @@ pub(super) fn check<'tcx>(
                     _ => (),
                 }
 
-                if is_type_diagnostic_item(cx, ty, sym::vec_type) {
+                if is_type_diagnostic_item(cx, ty, sym::Vec) {
                     return;
                 }
             }
diff --git a/clippy_lints/src/methods/search_is_some.rs b/clippy_lints/src/methods/search_is_some.rs
index ecec6fc3bb7..0f2e58d8983 100644
--- a/clippy_lints/src/methods/search_is_some.rs
+++ b/clippy_lints/src/methods/search_is_some.rs
@@ -101,7 +101,7 @@ pub(super) fn check<'tcx>(
     else if search_method == "find" {
         let is_string_or_str_slice = |e| {
             let self_ty = cx.typeck_results().expr_ty(e).peel_refs();
-            if is_type_diagnostic_item(cx, self_ty, sym::string_type) {
+            if is_type_diagnostic_item(cx, self_ty, sym::String) {
                 true
             } else {
                 *self_ty.kind() == ty::Str
diff --git a/clippy_lints/src/methods/string_extend_chars.rs b/clippy_lints/src/methods/string_extend_chars.rs
index 6e7890a3080..d06658f2a5e 100644
--- a/clippy_lints/src/methods/string_extend_chars.rs
+++ b/clippy_lints/src/methods/string_extend_chars.rs
@@ -12,7 +12,7 @@ use super::STRING_EXTEND_CHARS;
 
 pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr<'_>, arg: &hir::Expr<'_>) {
     let obj_ty = cx.typeck_results().expr_ty(recv).peel_refs();
-    if !is_type_diagnostic_item(cx, obj_ty, sym::string_type) {
+    if !is_type_diagnostic_item(cx, obj_ty, sym::String) {
         return;
     }
     if let Some(arglists) = method_chain_args(arg, &["chars"]) {
@@ -20,7 +20,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr
         let self_ty = cx.typeck_results().expr_ty(target).peel_refs();
         let ref_str = if *self_ty.kind() == ty::Str {
             ""
-        } else if is_type_diagnostic_item(cx, self_ty, sym::string_type) {
+        } else if is_type_diagnostic_item(cx, self_ty, sym::String) {
             "&"
         } else {
             return;
diff --git a/clippy_lints/src/methods/unnecessary_filter_map.rs b/clippy_lints/src/methods/unnecessary_filter_map.rs
index 8b66587bfd1..59bdfb923ed 100644
--- a/clippy_lints/src/methods/unnecessary_filter_map.rs
+++ b/clippy_lints/src/methods/unnecessary_filter_map.rs
@@ -35,8 +35,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, arg: &hir::Expr<
             let in_ty = cx.typeck_results().node_type(body.params[0].hir_id);
             match cx.typeck_results().expr_ty(&body.value).kind() {
                 ty::Adt(adt, subst)
-                    if cx.tcx.is_diagnostic_item(sym::option_type, adt.did)
-                        && TyS::same_type(in_ty, subst.type_at(0)) =>
+                    if cx.tcx.is_diagnostic_item(sym::Option, adt.did) && TyS::same_type(in_ty, subst.type_at(0)) =>
                 {
                     "filter"
                 },
diff --git a/clippy_lints/src/methods/unnecessary_lazy_eval.rs b/clippy_lints/src/methods/unnecessary_lazy_eval.rs
index b7380883a5e..740af750b48 100644
--- a/clippy_lints/src/methods/unnecessary_lazy_eval.rs
+++ b/clippy_lints/src/methods/unnecessary_lazy_eval.rs
@@ -18,8 +18,8 @@ pub(super) fn check<'tcx>(
     arg: &'tcx hir::Expr<'_>,
     simplify_using: &str,
 ) {
-    let is_option = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::option_type);
-    let is_result = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::result_type);
+    let is_option = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::Option);
+    let is_result = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::Result);
 
     if is_option || is_result {
         if let hir::ExprKind::Closure(_, _, eid, _, _) = arg.kind {
diff --git a/clippy_lints/src/methods/unwrap_or_else_default.rs b/clippy_lints/src/methods/unwrap_or_else_default.rs
index 677aa80e1b7..276467b1dfd 100644
--- a/clippy_lints/src/methods/unwrap_or_else_default.rs
+++ b/clippy_lints/src/methods/unwrap_or_else_default.rs
@@ -19,8 +19,8 @@ pub(super) fn check<'tcx>(
     // ^^^^^^^^^- recv          ^^^^^^^^^^^^^^^^- u_arg
     // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- expr
     let recv_ty = cx.typeck_results().expr_ty(recv);
-    let is_option = is_type_diagnostic_item(cx, recv_ty, sym::option_type);
-    let is_result = is_type_diagnostic_item(cx, recv_ty, sym::result_type);
+    let is_option = is_type_diagnostic_item(cx, recv_ty, sym::Option);
+    let is_result = is_type_diagnostic_item(cx, recv_ty, sym::Result);
 
     if_chain! {
         if is_option || is_result;
diff --git a/clippy_lints/src/methods/unwrap_used.rs b/clippy_lints/src/methods/unwrap_used.rs
index 7fd1948594d..44676d78c60 100644
--- a/clippy_lints/src/methods/unwrap_used.rs
+++ b/clippy_lints/src/methods/unwrap_used.rs
@@ -10,9 +10,9 @@ use super::UNWRAP_USED;
 pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr<'_>) {
     let obj_ty = cx.typeck_results().expr_ty(recv).peel_refs();
 
-    let mess = if is_type_diagnostic_item(cx, obj_ty, sym::option_type) {
+    let mess = if is_type_diagnostic_item(cx, obj_ty, sym::Option) {
         Some((UNWRAP_USED, "an Option", "None"))
-    } else if is_type_diagnostic_item(cx, obj_ty, sym::result_type) {
+    } else if is_type_diagnostic_item(cx, obj_ty, sym::Result) {
         Some((UNWRAP_USED, "a Result", "Err"))
     } else {
         None
diff --git a/clippy_lints/src/methods/utils.rs b/clippy_lints/src/methods/utils.rs
index 30d6665a920..ba2ce73a116 100644
--- a/clippy_lints/src/methods/utils.rs
+++ b/clippy_lints/src/methods/utils.rs
@@ -17,7 +17,7 @@ pub(super) fn derefs_to_slice<'tcx>(
         match ty.kind() {
             ty::Slice(_) => true,
             ty::Adt(def, _) if def.is_box() => may_slice(cx, ty.boxed_ty()),
-            ty::Adt(..) => is_type_diagnostic_item(cx, ty, sym::vec_type),
+            ty::Adt(..) => is_type_diagnostic_item(cx, ty, sym::Vec),
             ty::Array(_, size) => size.try_eval_usize(cx.tcx, cx.param_env).is_some(),
             ty::Ref(_, inner, _) => may_slice(cx, inner),
             _ => false,
diff --git a/clippy_lints/src/missing_doc.rs b/clippy_lints/src/missing_doc.rs
index 55d2e29e8bc..6920b4f72ea 100644
--- a/clippy_lints/src/missing_doc.rs
+++ b/clippy_lints/src/missing_doc.rs
@@ -13,6 +13,7 @@ use rustc_hir as hir;
 use rustc_lint::{LateContext, LateLintPass, LintContext};
 use rustc_middle::ty;
 use rustc_session::{declare_tool_lint, impl_lint_pass};
+use rustc_span::def_id::CRATE_DEF_ID;
 use rustc_span::source_map::Span;
 use rustc_span::sym;
 
@@ -119,9 +120,9 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
         self.doc_hidden_stack.pop().expect("empty doc_hidden_stack");
     }
 
-    fn check_crate(&mut self, cx: &LateContext<'tcx>, krate: &'tcx hir::Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'tcx>) {
         let attrs = cx.tcx.hir().attrs(hir::CRATE_HIR_ID);
-        self.check_missing_docs_attrs(cx, attrs, krate.module().inner, "the", "crate");
+        self.check_missing_docs_attrs(cx, attrs, cx.tcx.def_span(CRATE_DEF_ID), "the", "crate");
     }
 
     fn check_item(&mut self, cx: &LateContext<'tcx>, it: &'tcx hir::Item<'_>) {
diff --git a/clippy_lints/src/missing_enforced_import_rename.rs b/clippy_lints/src/missing_enforced_import_rename.rs
index 9d27870321c..448bfc2fdd6 100644
--- a/clippy_lints/src/missing_enforced_import_rename.rs
+++ b/clippy_lints/src/missing_enforced_import_rename.rs
@@ -2,7 +2,7 @@ use clippy_utils::{diagnostics::span_lint_and_sugg, source::snippet_opt};
 
 use rustc_data_structures::fx::FxHashMap;
 use rustc_errors::Applicability;
-use rustc_hir::{def::Res, def_id::DefId, Crate, Item, ItemKind, UseKind};
+use rustc_hir::{def::Res, def_id::DefId, Item, ItemKind, UseKind};
 use rustc_lint::{LateContext, LateLintPass, LintContext};
 use rustc_session::{declare_tool_lint, impl_lint_pass};
 use rustc_span::Symbol;
@@ -55,7 +55,7 @@ impl ImportRename {
 impl_lint_pass!(ImportRename => [MISSING_ENFORCED_IMPORT_RENAMES]);
 
 impl LateLintPass<'_> for ImportRename {
-    fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'_>) {
         for Rename { path, rename } in &self.conf_renames {
             if let Res::Def(_, id) = clippy_utils::path_to_res(cx, &path.split("::").collect::<Vec<_>>()) {
                 self.renames.insert(id, Symbol::intern(rename));
diff --git a/clippy_lints/src/multiple_crate_versions.rs b/clippy_lints/src/multiple_crate_versions.rs
index 1c61970fdc8..816b2f275fb 100644
--- a/clippy_lints/src/multiple_crate_versions.rs
+++ b/clippy_lints/src/multiple_crate_versions.rs
@@ -3,7 +3,7 @@
 use clippy_utils::diagnostics::span_lint;
 use clippy_utils::is_lint_allowed;
 use rustc_hir::def_id::LOCAL_CRATE;
-use rustc_hir::{Crate, CRATE_HIR_ID};
+use rustc_hir::CRATE_HIR_ID;
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 use rustc_span::source_map::DUMMY_SP;
@@ -41,7 +41,7 @@ declare_clippy_lint! {
 declare_lint_pass!(MultipleCrateVersions => [MULTIPLE_CRATE_VERSIONS]);
 
 impl LateLintPass<'_> for MultipleCrateVersions {
-    fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'_>) {
         if is_lint_allowed(cx, MULTIPLE_CRATE_VERSIONS, CRATE_HIR_ID) {
             return;
         }
diff --git a/clippy_lints/src/mut_key.rs b/clippy_lints/src/mut_key.rs
index cb17e4dbfd0..8476257f086 100644
--- a/clippy_lints/src/mut_key.rs
+++ b/clippy_lints/src/mut_key.rs
@@ -122,7 +122,7 @@ fn check_sig<'tcx>(cx: &LateContext<'tcx>, item_hir_id: hir::HirId, decl: &hir::
 fn check_ty<'tcx>(cx: &LateContext<'tcx>, span: Span, ty: Ty<'tcx>) {
     let ty = ty.peel_refs();
     if let Adt(def, substs) = ty.kind() {
-        let is_keyed_type = [sym::hashmap_type, sym::BTreeMap, sym::hashset_type, sym::BTreeSet]
+        let is_keyed_type = [sym::HashMap, sym::BTreeMap, sym::HashSet, sym::BTreeSet]
             .iter()
             .any(|diag_item| cx.tcx.is_diagnostic_item(*diag_item, def.did));
         if is_keyed_type && is_interior_mutable_type(cx, substs.type_at(0), span) {
@@ -147,11 +147,11 @@ fn is_interior_mutable_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, span: Sp
             // that of their type parameters.  Note: we don't include `HashSet` and `HashMap`
             // because they have no impl for `Hash` or `Ord`.
             let is_std_collection = [
-                sym::option_type,
-                sym::result_type,
+                sym::Option,
+                sym::Result,
                 sym::LinkedList,
-                sym::vec_type,
-                sym::vecdeque_type,
+                sym::Vec,
+                sym::VecDeque,
                 sym::BTreeMap,
                 sym::BTreeSet,
                 sym::Rc,
diff --git a/clippy_lints/src/mut_mutex_lock.rs b/clippy_lints/src/mut_mutex_lock.rs
index e9dcc7b227d..b96fa4774cb 100644
--- a/clippy_lints/src/mut_mutex_lock.rs
+++ b/clippy_lints/src/mut_mutex_lock.rs
@@ -6,6 +6,7 @@ use rustc_hir::{Expr, ExprKind, Mutability};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::ty;
 use rustc_session::{declare_lint_pass, declare_tool_lint};
+use rustc_span::sym;
 
 declare_clippy_lint! {
     /// ### What it does
@@ -51,7 +52,7 @@ impl<'tcx> LateLintPass<'tcx> for MutMutexLock {
             if path.ident.name == sym!(lock);
             let ty = cx.typeck_results().expr_ty(self_arg);
             if let ty::Ref(_, inner_ty, Mutability::Mut) = ty.kind();
-            if is_type_diagnostic_item(cx, inner_ty, sym!(mutex_type));
+            if is_type_diagnostic_item(cx, inner_ty, sym::Mutex);
             then {
                 span_lint_and_sugg(
                     cx,
diff --git a/clippy_lints/src/mutex_atomic.rs b/clippy_lints/src/mutex_atomic.rs
index 436ceec6cfa..5feddcbfc61 100644
--- a/clippy_lints/src/mutex_atomic.rs
+++ b/clippy_lints/src/mutex_atomic.rs
@@ -8,6 +8,7 @@ use rustc_hir::Expr;
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::ty::{self, Ty};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
+use rustc_span::sym;
 
 declare_clippy_lint! {
     /// ### What it does
@@ -74,7 +75,7 @@ impl<'tcx> LateLintPass<'tcx> for Mutex {
     fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
         let ty = cx.typeck_results().expr_ty(expr);
         if let ty::Adt(_, subst) = ty.kind() {
-            if is_type_diagnostic_item(cx, ty, sym!(mutex_type)) {
+            if is_type_diagnostic_item(cx, ty, sym::Mutex) {
                 let mutex_param = subst.type_at(0);
                 if let Some(atomic_name) = get_atomic_name(mutex_param) {
                     let msg = format!(
diff --git a/clippy_lints/src/needless_option_as_deref.rs b/clippy_lints/src/needless_option_as_deref.rs
index 5024a881d2a..fbdaaf51f74 100644
--- a/clippy_lints/src/needless_option_as_deref.rs
+++ b/clippy_lints/src/needless_option_as_deref.rs
@@ -45,7 +45,7 @@ impl<'tcx> LateLintPass<'tcx> for OptionNeedlessDeref {
         let outer_ty = typeck.expr_ty(expr);
 
         if_chain! {
-            if is_type_diagnostic_item(cx,outer_ty,sym::option_type);
+            if is_type_diagnostic_item(cx,outer_ty,sym::Option);
             if let ExprKind::MethodCall(path, _, [sub_expr], _) = expr.kind;
             let symbol = path.ident.as_str();
             if symbol=="as_deref" || symbol=="as_deref_mut";
diff --git a/clippy_lints/src/needless_pass_by_value.rs b/clippy_lints/src/needless_pass_by_value.rs
index 90b2aa16896..352dc6f8bec 100644
--- a/clippy_lints/src/needless_pass_by_value.rs
+++ b/clippy_lints/src/needless_pass_by_value.rs
@@ -206,7 +206,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
 
                         let deref_span = spans_need_deref.get(&canonical_id);
                         if_chain! {
-                            if is_type_diagnostic_item(cx, ty, sym::vec_type);
+                            if is_type_diagnostic_item(cx, ty, sym::Vec);
                             if let Some(clone_spans) =
                                 get_spans(cx, Some(body.id()), idx, &[("clone", ".to_owned()")]);
                             if let TyKind::Path(QPath::Resolved(_, path)) = input.kind;
@@ -245,7 +245,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
                             }
                         }
 
-                        if is_type_diagnostic_item(cx, ty, sym::string_type) {
+                        if is_type_diagnostic_item(cx, ty, sym::String) {
                             if let Some(clone_spans) =
                                 get_spans(cx, Some(body.id()), idx, &[("clone", ".to_string()"), ("as_str", "")]) {
                                 diag.span_suggestion(
diff --git a/clippy_lints/src/non_send_fields_in_send_ty.rs b/clippy_lints/src/non_send_fields_in_send_ty.rs
index 0973e3a1768..374b7bd5964 100644
--- a/clippy_lints/src/non_send_fields_in_send_ty.rs
+++ b/clippy_lints/src/non_send_fields_in_send_ty.rs
@@ -76,7 +76,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSendFieldInSendTy {
         // single `AdtDef` may have multiple `Send` impls due to generic
         // parameters, and the lint is much easier to implement in this way.
         if_chain! {
-            if let Some(send_trait) = cx.tcx.get_diagnostic_item(sym::send_trait);
+            if let Some(send_trait) = cx.tcx.get_diagnostic_item(sym::Send);
             if let ItemKind::Impl(hir_impl) = &item.kind;
             if let Some(trait_ref) = &hir_impl.of_trait;
             if let Some(trait_id) = trait_ref.trait_def_id();
diff --git a/clippy_lints/src/option_if_let_else.rs b/clippy_lints/src/option_if_let_else.rs
index 15f6dcae887..a62eb069989 100644
--- a/clippy_lints/src/option_if_let_else.rs
+++ b/clippy_lints/src/option_if_let_else.rs
@@ -70,7 +70,7 @@ declare_lint_pass!(OptionIfLetElse => [OPTION_IF_LET_ELSE]);
 fn is_result_ok(cx: &LateContext<'_>, expr: &'_ Expr<'_>) -> bool {
     if let ExprKind::MethodCall(path, _, &[ref receiver], _) = &expr.kind {
         path.ident.name.as_str() == "ok"
-            && is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(receiver), sym::result_type)
+            && is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(receiver), sym::Result)
     } else {
         false
     }
diff --git a/clippy_lints/src/panic_in_result_fn.rs b/clippy_lints/src/panic_in_result_fn.rs
index e2b6ba8e2d2..583c42b6563 100644
--- a/clippy_lints/src/panic_in_result_fn.rs
+++ b/clippy_lints/src/panic_in_result_fn.rs
@@ -47,7 +47,7 @@ impl<'tcx> LateLintPass<'tcx> for PanicInResultFn {
         span: Span,
         hir_id: hir::HirId,
     ) {
-        if !matches!(fn_kind, FnKind::Closure) && is_type_diagnostic_item(cx, return_ty(cx, hir_id), sym::result_type) {
+        if !matches!(fn_kind, FnKind::Closure) && is_type_diagnostic_item(cx, return_ty(cx, hir_id), sym::Result) {
             lint_impl_body(cx, span, body);
         }
     }
diff --git a/clippy_lints/src/ptr.rs b/clippy_lints/src/ptr.rs
index d696e17d656..d180d6f9227 100644
--- a/clippy_lints/src/ptr.rs
+++ b/clippy_lints/src/ptr.rs
@@ -258,7 +258,7 @@ fn check_fn(cx: &LateContext<'_>, decl: &FnDecl<'_>, fn_id: HirId, opt_body_id:
         }
 
         if let ty::Ref(_, ty, Mutability::Not) = ty.kind() {
-            if is_type_diagnostic_item(cx, ty, sym::vec_type) {
+            if is_type_diagnostic_item(cx, ty, sym::Vec) {
                 if let Some(spans) = get_spans(cx, opt_body_id, idx, &[("clone", ".to_owned()")]) {
                     span_lint_and_then(
                         cx,
@@ -288,7 +288,7 @@ fn check_fn(cx: &LateContext<'_>, decl: &FnDecl<'_>, fn_id: HirId, opt_body_id:
                         },
                     );
                 }
-            } else if is_type_diagnostic_item(cx, ty, sym::string_type) {
+            } else if is_type_diagnostic_item(cx, ty, sym::String) {
                 if let Some(spans) = get_spans(cx, opt_body_id, idx, &[("clone", ".to_string()"), ("as_str", "")]) {
                     span_lint_and_then(
                         cx,
diff --git a/clippy_lints/src/question_mark.rs b/clippy_lints/src/question_mark.rs
index e79cd7ed4ec..aa6d254e7a5 100644
--- a/clippy_lints/src/question_mark.rs
+++ b/clippy_lints/src/question_mark.rs
@@ -143,7 +143,7 @@ impl QuestionMark {
     fn is_option(cx: &LateContext<'_>, expression: &Expr<'_>) -> bool {
         let expr_ty = cx.typeck_results().expr_ty(expression);
 
-        is_type_diagnostic_item(cx, expr_ty, sym::option_type)
+        is_type_diagnostic_item(cx, expr_ty, sym::Option)
     }
 
     fn expression_returns_none(cx: &LateContext<'_>, expression: &Expr<'_>) -> bool {
diff --git a/clippy_lints/src/redundant_clone.rs b/clippy_lints/src/redundant_clone.rs
index 7041e4f980e..f7711b6fe94 100644
--- a/clippy_lints/src/redundant_clone.rs
+++ b/clippy_lints/src/redundant_clone.rs
@@ -123,7 +123,7 @@ impl<'tcx> LateLintPass<'tcx> for RedundantClone {
             let from_borrow = match_def_path(cx, fn_def_id, &paths::CLONE_TRAIT_METHOD)
                 || match_def_path(cx, fn_def_id, &paths::TO_OWNED_METHOD)
                 || (match_def_path(cx, fn_def_id, &paths::TO_STRING_METHOD)
-                    && is_type_diagnostic_item(cx, arg_ty, sym::string_type));
+                    && is_type_diagnostic_item(cx, arg_ty, sym::String));
 
             let from_deref = !from_borrow
                 && (match_def_path(cx, fn_def_id, &paths::PATH_TO_PATH_BUF)
diff --git a/clippy_lints/src/ref_option_ref.rs b/clippy_lints/src/ref_option_ref.rs
index 65ab6cac442..d543832e314 100644
--- a/clippy_lints/src/ref_option_ref.rs
+++ b/clippy_lints/src/ref_option_ref.rs
@@ -45,7 +45,7 @@ impl<'tcx> LateLintPass<'tcx> for RefOptionRef {
             if let Some(res) = last.res;
             if let Some(def_id) = res.opt_def_id();
 
-            if cx.tcx.is_diagnostic_item(sym::option_type, def_id);
+            if cx.tcx.is_diagnostic_item(sym::Option, def_id);
             if let Some(params) = last_path_segment(qpath).args ;
             if !params.parenthesized;
             if let Some(inner_ty) = params.args.iter().find_map(|arg| match arg {
diff --git a/clippy_lints/src/repeat_once.rs b/clippy_lints/src/repeat_once.rs
index 710de773e9c..cf94c0e97d9 100644
--- a/clippy_lints/src/repeat_once.rs
+++ b/clippy_lints/src/repeat_once.rs
@@ -72,7 +72,7 @@ impl<'tcx> LateLintPass<'tcx> for RepeatOnce {
                         format!("{}.to_vec()", snippet(cx, receiver.span, r#""...""#)),
                         Applicability::MachineApplicable,
                     );
-                } else if is_type_diagnostic_item(cx, ty, sym::string_type) {
+                } else if is_type_diagnostic_item(cx, ty, sym::String) {
                     span_lint_and_sugg(
                         cx,
                         REPEAT_ONCE,
diff --git a/clippy_lints/src/same_name_method.rs b/clippy_lints/src/same_name_method.rs
index 014898e6dab..737ff634e44 100644
--- a/clippy_lints/src/same_name_method.rs
+++ b/clippy_lints/src/same_name_method.rs
@@ -1,7 +1,7 @@
 use clippy_utils::diagnostics::span_lint_and_then;
 use rustc_data_structures::fx::FxHashMap;
 use rustc_hir::def::{DefKind, Res};
-use rustc_hir::{Crate, Impl, ItemKind, Node, Path, QPath, TraitRef, TyKind};
+use rustc_hir::{Impl, ItemKind, Node, Path, QPath, TraitRef, TyKind};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::ty::AssocKind;
 use rustc_session::{declare_lint_pass, declare_tool_lint};
@@ -46,10 +46,10 @@ struct ExistingName {
 }
 
 impl<'tcx> LateLintPass<'tcx> for SameNameMethod {
-    fn check_crate_post(&mut self, cx: &LateContext<'tcx>, krate: &'tcx Crate<'tcx>) {
+    fn check_crate_post(&mut self, cx: &LateContext<'tcx>) {
         let mut map = FxHashMap::<Res, ExistingName>::default();
 
-        for item in krate.items() {
+        for item in cx.tcx.hir().items() {
             if let ItemKind::Impl(Impl {
                 items,
                 of_trait,
diff --git a/clippy_lints/src/slow_vector_initialization.rs b/clippy_lints/src/slow_vector_initialization.rs
index 3d039e13065..3608fe1472d 100644
--- a/clippy_lints/src/slow_vector_initialization.rs
+++ b/clippy_lints/src/slow_vector_initialization.rs
@@ -120,7 +120,7 @@ impl SlowVectorInit {
             if let ExprKind::Call(func, [arg]) = expr.kind;
             if let ExprKind::Path(QPath::TypeRelative(ty, name)) = func.kind;
             if name.ident.as_str() == "with_capacity";
-            if is_type_diagnostic_item(cx, cx.typeck_results().node_type(ty.hir_id), sym::vec_type);
+            if is_type_diagnostic_item(cx, cx.typeck_results().node_type(ty.hir_id), sym::Vec);
             then {
                 Some(arg)
             } else {
diff --git a/clippy_lints/src/strings.rs b/clippy_lints/src/strings.rs
index 13d8f954c44..35b6bde5696 100644
--- a/clippy_lints/src/strings.rs
+++ b/clippy_lints/src/strings.rs
@@ -157,7 +157,7 @@ impl<'tcx> LateLintPass<'tcx> for StringAdd {
 }
 
 fn is_string(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
-    is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(e).peel_refs(), sym::string_type)
+    is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(e).peel_refs(), sym::String)
 }
 
 fn is_add(cx: &LateContext<'_>, src: &Expr<'_>, target: &Expr<'_>) -> bool {
@@ -397,7 +397,7 @@ impl LateLintPass<'_> for StringToString {
             if let ExprKind::MethodCall(path, _, [self_arg, ..], _) = &expr.kind;
             if path.ident.name == sym!(to_string);
             let ty = cx.typeck_results().expr_ty(self_arg);
-            if is_type_diagnostic_item(cx, ty, sym::string_type);
+            if is_type_diagnostic_item(cx, ty, sym::String);
             then {
                 span_lint_and_help(
                     cx,
diff --git a/clippy_lints/src/swap.rs b/clippy_lints/src/swap.rs
index f126908e84b..ef26de5b6b9 100644
--- a/clippy_lints/src/swap.rs
+++ b/clippy_lints/src/swap.rs
@@ -86,8 +86,8 @@ fn generate_swap_warning(cx: &LateContext<'_>, e1: &Expr<'_>, e2: &Expr<'_>, spa
 
                     if matches!(ty.kind(), ty::Slice(_))
                         || matches!(ty.kind(), ty::Array(_, _))
-                        || is_type_diagnostic_item(cx, ty, sym::vec_type)
-                        || is_type_diagnostic_item(cx, ty, sym::vecdeque_type)
+                        || is_type_diagnostic_item(cx, ty, sym::Vec)
+                        || is_type_diagnostic_item(cx, ty, sym::VecDeque)
                     {
                         let slice = Sugg::hir_with_applicability(cx, lhs1, "<slice>", &mut applicability);
                         span_lint_and_sugg(
@@ -231,7 +231,7 @@ fn check_xor_swap(cx: &LateContext<'_>, block: &Block<'_>) {
     }
 }
 
-/// Returns the lhs and rhs of an xor assignment statement.  
+/// Returns the lhs and rhs of an xor assignment statement.
 fn extract_sides_of_xor_assign<'a, 'hir>(stmt: &'a Stmt<'hir>) -> Option<(&'a Expr<'hir>, &'a Expr<'hir>)> {
     if let StmtKind::Semi(expr) = stmt.kind {
         if let ExprKind::AssignOp(
diff --git a/clippy_lints/src/transmute/unsound_collection_transmute.rs b/clippy_lints/src/transmute/unsound_collection_transmute.rs
index 868c41aab43..2ce8d4031d7 100644
--- a/clippy_lints/src/transmute/unsound_collection_transmute.rs
+++ b/clippy_lints/src/transmute/unsound_collection_transmute.rs
@@ -9,13 +9,13 @@ use rustc_span::symbol::{sym, Symbol};
 
 // used to check for UNSOUND_COLLECTION_TRANSMUTE
 static COLLECTIONS: &[Symbol] = &[
-    sym::vec_type,
-    sym::vecdeque_type,
+    sym::Vec,
+    sym::VecDeque,
     sym::BinaryHeap,
     sym::BTreeSet,
     sym::BTreeMap,
-    sym::hashset_type,
-    sym::hashmap_type,
+    sym::HashSet,
+    sym::HashMap,
 ];
 
 /// Checks for `unsound_collection_transmute` lint.
diff --git a/clippy_lints/src/try_err.rs b/clippy_lints/src/try_err.rs
index 1196271d5dd..e9ec120a7f9 100644
--- a/clippy_lints/src/try_err.rs
+++ b/clippy_lints/src/try_err.rs
@@ -143,7 +143,7 @@ fn find_return_type<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx ExprKind<'_>) -> O
 fn result_error_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'tcx>> {
     if_chain! {
         if let ty::Adt(_, subst) = ty.kind();
-        if is_type_diagnostic_item(cx, ty, sym::result_type);
+        if is_type_diagnostic_item(cx, ty, sym::Result);
         then {
             Some(subst.type_at(1))
         } else {
@@ -160,7 +160,7 @@ fn poll_result_error_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<
         let ready_ty = subst.type_at(0);
 
         if let ty::Adt(ready_def, ready_subst) = ready_ty.kind();
-        if cx.tcx.is_diagnostic_item(sym::result_type, ready_def.did);
+        if cx.tcx.is_diagnostic_item(sym::Result, ready_def.did);
         then {
             Some(ready_subst.type_at(1))
         } else {
@@ -177,11 +177,11 @@ fn poll_option_result_error_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) ->
         let ready_ty = subst.type_at(0);
 
         if let ty::Adt(ready_def, ready_subst) = ready_ty.kind();
-        if cx.tcx.is_diagnostic_item(sym::option_type, ready_def.did);
+        if cx.tcx.is_diagnostic_item(sym::Option, ready_def.did);
         let some_ty = ready_subst.type_at(0);
 
         if let ty::Adt(some_def, some_subst) = some_ty.kind();
-        if cx.tcx.is_diagnostic_item(sym::result_type, some_def.did);
+        if cx.tcx.is_diagnostic_item(sym::Result, some_def.did);
         then {
             Some(some_subst.type_at(1))
         } else {
diff --git a/clippy_lints/src/types/box_collection.rs b/clippy_lints/src/types/box_collection.rs
index b28da29c91c..538c10a5b20 100644
--- a/clippy_lints/src/types/box_collection.rs
+++ b/clippy_lints/src/types/box_collection.rs
@@ -38,11 +38,11 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_
 }
 
 fn get_std_collection(cx: &LateContext<'_>, qpath: &QPath<'_>) -> Option<&'static str> {
-    if is_ty_param_diagnostic_item(cx, qpath, sym::vec_type).is_some() {
+    if is_ty_param_diagnostic_item(cx, qpath, sym::Vec).is_some() {
         Some("Vec")
-    } else if is_ty_param_diagnostic_item(cx, qpath, sym::string_type).is_some() {
+    } else if is_ty_param_diagnostic_item(cx, qpath, sym::String).is_some() {
         Some("String")
-    } else if is_ty_param_diagnostic_item(cx, qpath, sym::hashmap_type).is_some() {
+    } else if is_ty_param_diagnostic_item(cx, qpath, sym::HashMap).is_some() {
         Some("HashMap")
     } else {
         None
diff --git a/clippy_lints/src/types/option_option.rs b/clippy_lints/src/types/option_option.rs
index b2692c48076..903e62995c6 100644
--- a/clippy_lints/src/types/option_option.rs
+++ b/clippy_lints/src/types/option_option.rs
@@ -7,9 +7,7 @@ use rustc_span::symbol::sym;
 use super::OPTION_OPTION;
 
 pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool {
-    if cx.tcx.is_diagnostic_item(sym::option_type, def_id)
-        && is_ty_param_diagnostic_item(cx, qpath, sym::option_type).is_some()
-    {
+    if cx.tcx.is_diagnostic_item(sym::Option, def_id) && is_ty_param_diagnostic_item(cx, qpath, sym::Option).is_some() {
         span_lint(
             cx,
             OPTION_OPTION,
diff --git a/clippy_lints/src/types/rc_buffer.rs b/clippy_lints/src/types/rc_buffer.rs
index ef629a35d10..31c4abdfc95 100644
--- a/clippy_lints/src/types/rc_buffer.rs
+++ b/clippy_lints/src/types/rc_buffer.rs
@@ -20,7 +20,7 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_
                 format!("Rc<{}>", alternate),
                 Applicability::MachineApplicable,
             );
-        } else if let Some(ty) = is_ty_param_diagnostic_item(cx, qpath, sym::vec_type) {
+        } else if let Some(ty) = is_ty_param_diagnostic_item(cx, qpath, sym::Vec) {
             let qpath = match &ty.kind {
                 TyKind::Path(qpath) => qpath,
                 _ => return false,
@@ -55,7 +55,7 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_
                 format!("Arc<{}>", alternate),
                 Applicability::MachineApplicable,
             );
-        } else if let Some(ty) = is_ty_param_diagnostic_item(cx, qpath, sym::vec_type) {
+        } else if let Some(ty) = is_ty_param_diagnostic_item(cx, qpath, sym::Vec) {
             let qpath = match &ty.kind {
                 TyKind::Path(qpath) => qpath,
                 _ => return false,
@@ -85,7 +85,7 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_
 }
 
 fn match_buffer_type(cx: &LateContext<'_>, qpath: &QPath<'_>) -> Option<&'static str> {
-    if is_ty_param_diagnostic_item(cx, qpath, sym::string_type).is_some() {
+    if is_ty_param_diagnostic_item(cx, qpath, sym::String).is_some() {
         Some("str")
     } else if is_ty_param_diagnostic_item(cx, qpath, sym::OsString).is_some() {
         Some("std::ffi::OsStr")
diff --git a/clippy_lints/src/types/rc_mutex.rs b/clippy_lints/src/types/rc_mutex.rs
index 12db7afb81c..d54608a07bb 100644
--- a/clippy_lints/src/types/rc_mutex.rs
+++ b/clippy_lints/src/types/rc_mutex.rs
@@ -10,7 +10,7 @@ use super::RC_MUTEX;
 pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool {
     if_chain! {
         if cx.tcx.is_diagnostic_item(sym::Rc, def_id) ;
-        if let Some(_) = is_ty_param_diagnostic_item(cx, qpath, sym!(mutex_type)) ;
+        if let Some(_) = is_ty_param_diagnostic_item(cx, qpath, sym::Mutex) ;
         then {
             span_lint_and_help(
                 cx,
diff --git a/clippy_lints/src/types/vec_box.rs b/clippy_lints/src/types/vec_box.rs
index e7e2016d8f2..c632f822544 100644
--- a/clippy_lints/src/types/vec_box.rs
+++ b/clippy_lints/src/types/vec_box.rs
@@ -19,7 +19,7 @@ pub(super) fn check(
     def_id: DefId,
     box_size_threshold: u64,
 ) -> bool {
-    if cx.tcx.is_diagnostic_item(sym::vec_type, def_id) {
+    if cx.tcx.is_diagnostic_item(sym::Vec, def_id) {
         if_chain! {
             // Get the _ part of Vec<_>
             if let Some(last) = last_path_segment(qpath).args;
diff --git a/clippy_lints/src/unnecessary_sort_by.rs b/clippy_lints/src/unnecessary_sort_by.rs
index 61670fe124e..dd74bf367f3 100644
--- a/clippy_lints/src/unnecessary_sort_by.rs
+++ b/clippy_lints/src/unnecessary_sort_by.rs
@@ -168,7 +168,7 @@ fn detect_lint(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<LintTrigger> {
         if let name = name_ident.ident.name.to_ident_string();
         if name == "sort_by" || name == "sort_unstable_by";
         if let [vec, Expr { kind: ExprKind::Closure(_, _, closure_body_id, _, _), .. }] = args;
-        if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(vec), sym::vec_type);
+        if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(vec), sym::Vec);
         if let closure_body = cx.tcx.hir().body(*closure_body_id);
         if let &[
             Param { pat: Pat { kind: PatKind::Binding(_, _, left_ident, _), .. }, ..},
diff --git a/clippy_lints/src/unnecessary_wraps.rs b/clippy_lints/src/unnecessary_wraps.rs
index 5ca861a14bf..c940cf077d1 100644
--- a/clippy_lints/src/unnecessary_wraps.rs
+++ b/clippy_lints/src/unnecessary_wraps.rs
@@ -101,9 +101,9 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryWraps {
 
         // Get the wrapper and inner types, if can't, abort.
         let (return_type_label, lang_item, inner_type) = if let ty::Adt(adt_def, subst) = return_ty(cx, hir_id).kind() {
-            if cx.tcx.is_diagnostic_item(sym::option_type, adt_def.did) {
+            if cx.tcx.is_diagnostic_item(sym::Option, adt_def.did) {
                 ("Option", OptionSome, subst.type_at(0))
-            } else if cx.tcx.is_diagnostic_item(sym::result_type, adt_def.did) {
+            } else if cx.tcx.is_diagnostic_item(sym::Result, adt_def.did) {
                 ("Result", ResultOk, subst.type_at(0))
             } else {
                 return;
diff --git a/clippy_lints/src/unwrap.rs b/clippy_lints/src/unwrap.rs
index b2ab300c2e9..ebaa9dcbbf8 100644
--- a/clippy_lints/src/unwrap.rs
+++ b/clippy_lints/src/unwrap.rs
@@ -132,11 +132,11 @@ fn collect_unwrap_info<'tcx>(
     is_entire_condition: bool,
 ) -> Vec<UnwrapInfo<'tcx>> {
     fn is_relevant_option_call(cx: &LateContext<'_>, ty: Ty<'_>, method_name: &str) -> bool {
-        is_type_diagnostic_item(cx, ty, sym::option_type) && ["is_some", "is_none"].contains(&method_name)
+        is_type_diagnostic_item(cx, ty, sym::Option) && ["is_some", "is_none"].contains(&method_name)
     }
 
     fn is_relevant_result_call(cx: &LateContext<'_>, ty: Ty<'_>, method_name: &str) -> bool {
-        is_type_diagnostic_item(cx, ty, sym::result_type) && ["is_ok", "is_err"].contains(&method_name)
+        is_type_diagnostic_item(cx, ty, sym::Result) && ["is_ok", "is_err"].contains(&method_name)
     }
 
     if let ExprKind::Binary(op, left, right) = &expr.kind {
@@ -165,7 +165,7 @@ fn collect_unwrap_info<'tcx>(
                     _ => unreachable!(),
                 };
                 let safe_to_unwrap = unwrappable != invert;
-                let kind = if is_type_diagnostic_item(cx, ty, sym::option_type) {
+                let kind = if is_type_diagnostic_item(cx, ty, sym::Option) {
                     UnwrappableKind::Option
                 } else {
                     UnwrappableKind::Result
diff --git a/clippy_lints/src/unwrap_in_result.rs b/clippy_lints/src/unwrap_in_result.rs
index 6eadd1fc1c9..a4680ae137b 100644
--- a/clippy_lints/src/unwrap_in_result.rs
+++ b/clippy_lints/src/unwrap_in_result.rs
@@ -64,8 +64,8 @@ impl<'tcx> LateLintPass<'tcx> for UnwrapInResult {
             // first check if it's a method or function
             if let hir::ImplItemKind::Fn(ref _signature, _) = impl_item.kind;
             // checking if its return type is `result` or `option`
-            if is_type_diagnostic_item(cx, return_ty(cx, impl_item.hir_id()), sym::result_type)
-                || is_type_diagnostic_item(cx, return_ty(cx, impl_item.hir_id()), sym::option_type);
+            if is_type_diagnostic_item(cx, return_ty(cx, impl_item.hir_id()), sym::Result)
+                || is_type_diagnostic_item(cx, return_ty(cx, impl_item.hir_id()), sym::Option);
             then {
                 lint_impl_body(cx, impl_item.span, impl_item);
             }
@@ -86,8 +86,8 @@ impl<'a, 'tcx> Visitor<'tcx> for FindExpectUnwrap<'a, 'tcx> {
         // check for `expect`
         if let Some(arglists) = method_chain_args(expr, &["expect"]) {
             let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
-            if is_type_diagnostic_item(self.lcx, reciever_ty, sym::option_type)
-                || is_type_diagnostic_item(self.lcx, reciever_ty, sym::result_type)
+            if is_type_diagnostic_item(self.lcx, reciever_ty, sym::Option)
+                || is_type_diagnostic_item(self.lcx, reciever_ty, sym::Result)
             {
                 self.result.push(expr.span);
             }
@@ -96,8 +96,8 @@ impl<'a, 'tcx> Visitor<'tcx> for FindExpectUnwrap<'a, 'tcx> {
         // check for `unwrap`
         if let Some(arglists) = method_chain_args(expr, &["unwrap"]) {
             let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
-            if is_type_diagnostic_item(self.lcx, reciever_ty, sym::option_type)
-                || is_type_diagnostic_item(self.lcx, reciever_ty, sym::result_type)
+            if is_type_diagnostic_item(self.lcx, reciever_ty, sym::Option)
+                || is_type_diagnostic_item(self.lcx, reciever_ty, sym::Result)
             {
                 self.result.push(expr.span);
             }
diff --git a/clippy_lints/src/useless_conversion.rs b/clippy_lints/src/useless_conversion.rs
index 2861b432919..88f11542072 100644
--- a/clippy_lints/src/useless_conversion.rs
+++ b/clippy_lints/src/useless_conversion.rs
@@ -63,7 +63,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessConversion {
             },
 
             ExprKind::MethodCall(name, .., args, _) => {
-                if is_trait_method(cx, e, sym::into_trait) && &*name.ident.as_str() == "into" {
+                if is_trait_method(cx, e, sym::Into) && &*name.ident.as_str() == "into" {
                     let a = cx.typeck_results().expr_ty(e);
                     let b = cx.typeck_results().expr_ty(&args[0]);
                     if same_type_and_consts(a, b) {
@@ -103,10 +103,10 @@ impl<'tcx> LateLintPass<'tcx> for UselessConversion {
                     }
                 }
                 if_chain! {
-                    if is_trait_method(cx, e, sym::try_into_trait) && name.ident.name == sym::try_into;
+                    if is_trait_method(cx, e, sym::TryInto) && name.ident.name == sym::try_into;
                     let a = cx.typeck_results().expr_ty(e);
                     let b = cx.typeck_results().expr_ty(&args[0]);
-                    if is_type_diagnostic_item(cx, a, sym::result_type);
+                    if is_type_diagnostic_item(cx, a, sym::Result);
                     if let ty::Adt(_, substs) = a.kind();
                     if let Some(a_type) = substs.types().next();
                     if same_type_and_consts(a_type, b);
@@ -134,7 +134,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessConversion {
                         let b = cx.typeck_results().expr_ty(&args[0]);
                         if_chain! {
                             if match_def_path(cx, def_id, &paths::TRY_FROM);
-                            if is_type_diagnostic_item(cx, a, sym::result_type);
+                            if is_type_diagnostic_item(cx, a, sym::Result);
                             if let ty::Adt(_, substs) = a.kind();
                             if let Some(a_type) = substs.types().next();
                             if same_type_and_consts(a_type, b);
diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs
index 3e2a4e9748d..9f9edbf258a 100644
--- a/clippy_lints/src/utils/internal_lints.rs
+++ b/clippy_lints/src/utils/internal_lints.rs
@@ -8,7 +8,7 @@ use clippy_utils::{
     paths, SpanlessEq,
 };
 use if_chain::if_chain;
-use rustc_ast::ast::{Crate as AstCrate, ItemKind, LitKind, ModKind, NodeId};
+use rustc_ast::ast::{Crate, ItemKind, LitKind, ModKind, NodeId};
 use rustc_ast::visit::FnKind;
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
 use rustc_errors::Applicability;
@@ -18,8 +18,8 @@ use rustc_hir::def_id::DefId;
 use rustc_hir::hir_id::CRATE_HIR_ID;
 use rustc_hir::intravisit::{NestedVisitorMap, Visitor};
 use rustc_hir::{
-    BinOpKind, Block, Crate, Expr, ExprKind, HirId, Item, Local, MutTy, Mutability, Node, Path, Stmt, StmtKind, Ty,
-    TyKind, UnOp,
+    BinOpKind, Block, Expr, ExprKind, HirId, Item, Local, MutTy, Mutability, Node, Path, Stmt, StmtKind, Ty, TyKind,
+    UnOp,
 };
 use rustc_lint::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
 use rustc_middle::hir::map::Map;
@@ -242,7 +242,7 @@ declare_clippy_lint! {
     ///
     /// Good:
     /// ```rust,ignore
-    /// utils::is_type_diagnostic_item(cx, ty, sym::vec_type)
+    /// utils::is_type_diagnostic_item(cx, ty, sym::Vec)
     /// ```
     pub MATCH_TYPE_ON_DIAGNOSTIC_ITEM,
     internal,
@@ -317,7 +317,7 @@ declare_clippy_lint! {
 declare_lint_pass!(ClippyLintsInternal => [CLIPPY_LINTS_INTERNAL]);
 
 impl EarlyLintPass for ClippyLintsInternal {
-    fn check_crate(&mut self, cx: &EarlyContext<'_>, krate: &AstCrate) {
+    fn check_crate(&mut self, cx: &EarlyContext<'_>, krate: &Crate) {
         if let Some(utils) = krate.items.iter().find(|item| item.ident.name.as_str() == "utils") {
             if let ItemKind::Mod(_, ModKind::Loaded(ref items, ..)) = utils.kind {
                 if let Some(paths) = items.iter().find(|item| item.ident.name.as_str() == "paths") {
@@ -412,7 +412,7 @@ impl<'tcx> LateLintPass<'tcx> for LintWithoutLintPass {
         }
     }
 
-    fn check_crate_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Crate<'_>) {
+    fn check_crate_post(&mut self, cx: &LateContext<'tcx>) {
         if is_lint_allowed(cx, LINT_WITHOUT_LINT_PASS, CRATE_HIR_ID) {
             return;
         }
@@ -907,7 +907,7 @@ pub struct InterningDefinedSymbol {
 impl_lint_pass!(InterningDefinedSymbol => [INTERNING_DEFINED_SYMBOL, UNNECESSARY_SYMBOL_STR]);
 
 impl<'tcx> LateLintPass<'tcx> for InterningDefinedSymbol {
-    fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'_>) {
         if !self.symbol_map.is_empty() {
             return;
         }
diff --git a/clippy_lints/src/vec_init_then_push.rs b/clippy_lints/src/vec_init_then_push.rs
index 0413c02b230..d8e241d72af 100644
--- a/clippy_lints/src/vec_init_then_push.rs
+++ b/clippy_lints/src/vec_init_then_push.rs
@@ -157,7 +157,7 @@ fn get_vec_init_kind<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Op
     if let ExprKind::Call(func, args) = expr.kind {
         match func.kind {
             ExprKind::Path(QPath::TypeRelative(ty, name))
-                if is_type_diagnostic_item(cx, cx.typeck_results().node_type(ty.hir_id), sym::vec_type) =>
+                if is_type_diagnostic_item(cx, cx.typeck_results().node_type(ty.hir_id), sym::Vec) =>
             {
                 if name.ident.name == sym::new {
                     return Some(VecInitKind::New);
@@ -177,7 +177,7 @@ fn get_vec_init_kind<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Op
             }
             ExprKind::Path(QPath::Resolved(_, path))
                 if match_def_path(cx, path.res.opt_def_id()?, &paths::DEFAULT_TRAIT_METHOD)
-                    && is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::vec_type) =>
+                    && is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::Vec) =>
             {
                 return Some(VecInitKind::New);
             }
diff --git a/clippy_lints/src/wildcard_dependencies.rs b/clippy_lints/src/wildcard_dependencies.rs
index fd3872bacbe..d0c98b6bd79 100644
--- a/clippy_lints/src/wildcard_dependencies.rs
+++ b/clippy_lints/src/wildcard_dependencies.rs
@@ -1,5 +1,5 @@
 use clippy_utils::{diagnostics::span_lint, is_lint_allowed};
-use rustc_hir::{hir_id::CRATE_HIR_ID, Crate};
+use rustc_hir::hir_id::CRATE_HIR_ID;
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 use rustc_span::source_map::DUMMY_SP;
@@ -28,7 +28,7 @@ declare_clippy_lint! {
 declare_lint_pass!(WildcardDependencies => [WILDCARD_DEPENDENCIES]);
 
 impl LateLintPass<'_> for WildcardDependencies {
-    fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+    fn check_crate(&mut self, cx: &LateContext<'_>) {
         if is_lint_allowed(cx, WILDCARD_DEPENDENCIES, CRATE_HIR_ID) {
             return;
         }
diff --git a/clippy_lints/src/zero_sized_map_values.rs b/clippy_lints/src/zero_sized_map_values.rs
index 8e1cd655b61..aa6b2614bbc 100644
--- a/clippy_lints/src/zero_sized_map_values.rs
+++ b/clippy_lints/src/zero_sized_map_values.rs
@@ -49,7 +49,7 @@ impl LateLintPass<'_> for ZeroSizedMapValues {
             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) || is_type_diagnostic_item(cx, ty, sym::BTreeMap);
+            if is_type_diagnostic_item(cx, ty, sym::HashMap) || is_type_diagnostic_item(cx, ty, sym::BTreeMap);
             if let Adt(_, substs) = ty.kind();
             let ty = substs.type_at(1);
             // Fixes https://github.com/rust-lang/rust-clippy/issues/7447 because of
diff --git a/clippy_utils/src/eager_or_lazy.rs b/clippy_utils/src/eager_or_lazy.rs
index 9650294fc7b..1ea7ccfb752 100644
--- a/clippy_utils/src/eager_or_lazy.rs
+++ b/clippy_utils/src/eager_or_lazy.rs
@@ -101,7 +101,7 @@ fn identify_some_potentially_expensive_patterns<'tcx>(cx: &LateContext<'tcx>, ex
                 ExprKind::Call(..) => !is_ctor_or_promotable_const_function(self.cx, expr),
                 ExprKind::Index(obj, _) => {
                     let ty = self.cx.typeck_results().expr_ty(obj);
-                    is_type_diagnostic_item(self.cx, ty, sym::hashmap_type)
+                    is_type_diagnostic_item(self.cx, ty, sym::HashMap)
                         || is_type_diagnostic_item(self.cx, ty, sym::BTreeMap)
                 },
                 ExprKind::MethodCall(..) => true,
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs
index 00cf8a4d077..c47aa9170e5 100644
--- a/clippy_utils/src/lib.rs
+++ b/clippy_utils/src/lib.rs
@@ -18,7 +18,6 @@
 extern crate rustc_ast;
 extern crate rustc_ast_pretty;
 extern crate rustc_attr;
-extern crate rustc_const_eval;
 extern crate rustc_data_structures;
 extern crate rustc_errors;
 extern crate rustc_hir;
@@ -647,13 +646,13 @@ pub fn can_mut_borrow_both(cx: &LateContext<'_>, e1: &Expr<'_>, e2: &Expr<'_>) -
 /// constructor from the std library
 fn is_default_equivalent_ctor(cx: &LateContext<'_>, def_id: DefId, path: &QPath<'_>) -> bool {
     let std_types_symbols = &[
-        sym::string_type,
-        sym::vec_type,
-        sym::vecdeque_type,
+        sym::String,
+        sym::Vec,
+        sym::VecDeque,
         sym::LinkedList,
-        sym::hashmap_type,
+        sym::HashMap,
         sym::BTreeMap,
-        sym::hashset_type,
+        sym::HashSet,
         sym::BTreeSet,
         sym::BinaryHeap,
     ];
diff --git a/clippy_utils/src/paths.rs b/clippy_utils/src/paths.rs
index 7a8208c12c0..e43c5756021 100644
--- a/clippy_utils/src/paths.rs
+++ b/clippy_utils/src/paths.rs
@@ -88,7 +88,7 @@ pub const MEM_SIZE_OF_VAL: [&str; 3] = ["core", "mem", "size_of_val"];
 pub const MUTEX_GUARD: [&str; 4] = ["std", "sync", "mutex", "MutexGuard"];
 pub const OPEN_OPTIONS: [&str; 3] = ["std", "fs", "OpenOptions"];
 pub const OPS_MODULE: [&str; 2] = ["core", "ops"];
-/// Preferably use the diagnostic item `sym::option_type` where possible
+/// Preferably use the diagnostic item `sym::Option` where possible
 pub const OPTION: [&str; 3] = ["core", "option", "Option"];
 pub const OPTION_NONE: [&str; 4] = ["core", "option", "Option", "None"];
 pub const OPTION_SOME: [&str; 4] = ["core", "option", "Option", "Some"];
@@ -129,13 +129,19 @@ pub const RANGE_ARGUMENT_TRAIT: [&str; 3] = ["core", "ops", "RangeBounds"];
 pub const RC_PTR_EQ: [&str; 4] = ["alloc", "rc", "Rc", "ptr_eq"];
 pub const REFCELL_REF: [&str; 3] = ["core", "cell", "Ref"];
 pub const REFCELL_REFMUT: [&str; 3] = ["core", "cell", "RefMut"];
+#[allow(clippy::invalid_paths)] // internal lints do not know about all external crates
 pub const REGEX_BUILDER_NEW: [&str; 5] = ["regex", "re_builder", "unicode", "RegexBuilder", "new"];
+#[allow(clippy::invalid_paths)] // internal lints do not know about all external crates
 pub const REGEX_BYTES_BUILDER_NEW: [&str; 5] = ["regex", "re_builder", "bytes", "RegexBuilder", "new"];
+#[allow(clippy::invalid_paths)] // internal lints do not know about all external crates
 pub const REGEX_BYTES_NEW: [&str; 4] = ["regex", "re_bytes", "Regex", "new"];
+#[allow(clippy::invalid_paths)] // internal lints do not know about all external crates
 pub const REGEX_BYTES_SET_NEW: [&str; 5] = ["regex", "re_set", "bytes", "RegexSet", "new"];
+#[allow(clippy::invalid_paths)] // internal lints do not know about all external crates
 pub const REGEX_NEW: [&str; 4] = ["regex", "re_unicode", "Regex", "new"];
+#[allow(clippy::invalid_paths)] // internal lints do not know about all external crates
 pub const REGEX_SET_NEW: [&str; 5] = ["regex", "re_set", "unicode", "RegexSet", "new"];
-/// Preferably use the diagnostic item `sym::result_type` where possible
+/// Preferably use the diagnostic item `sym::Result` where possible
 pub const RESULT: [&str; 3] = ["core", "result", "Result"];
 pub const RESULT_ERR: [&str; 4] = ["core", "result", "Result", "Err"];
 pub const RESULT_OK: [&str; 4] = ["core", "result", "Result", "Ok"];
diff --git a/clippy_utils/src/qualify_min_const_fn.rs b/clippy_utils/src/qualify_min_const_fn.rs
index 238728f090f..e6d8ba3f02e 100644
--- a/clippy_utils/src/qualify_min_const_fn.rs
+++ b/clippy_utils/src/qualify_min_const_fn.rs
@@ -364,7 +364,7 @@ fn check_terminator(
 }
 
 fn is_const_fn(tcx: TyCtxt<'_>, def_id: DefId, msrv: Option<&RustcVersion>) -> bool {
-    rustc_const_eval::const_eval::is_const_fn(tcx, def_id)
+    tcx.is_const_fn(def_id)
         && tcx.lookup_const_stability(def_id).map_or(true, |const_stab| {
             if let rustc_attr::StabilityLevel::Stable { since } = const_stab.level {
                 // Checking MSRV is manually necessary because `rustc` has no such concept. This entire
diff --git a/clippy_utils/src/ty.rs b/clippy_utils/src/ty.rs
index 834889314db..6ebe1a0028a 100644
--- a/clippy_utils/src/ty.rs
+++ b/clippy_utils/src/ty.rs
@@ -77,16 +77,16 @@ pub fn has_iter_method(cx: &LateContext<'_>, probably_ref_ty: Ty<'_>) -> Option<
     // exists and has the desired signature. Unfortunately FnCtxt is not exported
     // so we can't use its `lookup_method` method.
     let into_iter_collections: &[Symbol] = &[
-        sym::vec_type,
-        sym::option_type,
-        sym::result_type,
+        sym::Vec,
+        sym::Option,
+        sym::Result,
         sym::BTreeMap,
         sym::BTreeSet,
-        sym::vecdeque_type,
+        sym::VecDeque,
         sym::LinkedList,
         sym::BinaryHeap,
-        sym::hashset_type,
-        sym::hashmap_type,
+        sym::HashSet,
+        sym::HashMap,
         sym::PathBuf,
         sym::Path,
         sym::Receiver,
diff --git a/rust-toolchain b/rust-toolchain
index 660401ff28c..f98819303e6 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1,3 +1,3 @@
 [toolchain]
-channel = "nightly-2021-09-28"
+channel = "nightly-2021-10-07"
 components = ["llvm-tools-preview", "rustc-dev", "rust-src"]
diff --git a/tests/ui-internal/match_type_on_diag_item.stderr b/tests/ui-internal/match_type_on_diag_item.stderr
index f5d92fc615c..bf1d67e6054 100644
--- a/tests/ui-internal/match_type_on_diag_item.stderr
+++ b/tests/ui-internal/match_type_on_diag_item.stderr
@@ -2,7 +2,7 @@ error: usage of `clippy_utils::ty::match_type()` on a type diagnostic item
   --> $DIR/match_type_on_diag_item.rs:30:17
    |
 LL |         let _ = match_type(cx, ty, &OPTION);
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clippy_utils::ty::is_type_diagnostic_item(cx, ty, sym::option_type)`
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clippy_utils::ty::is_type_diagnostic_item(cx, ty, sym::Option)`
    |
 note: the lint level is defined here
   --> $DIR/match_type_on_diag_item.rs:1:9
@@ -15,7 +15,7 @@ error: usage of `clippy_utils::ty::match_type()` on a type diagnostic item
   --> $DIR/match_type_on_diag_item.rs:31:17
    |
 LL |         let _ = match_type(cx, ty, &["core", "result", "Result"]);
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clippy_utils::ty::is_type_diagnostic_item(cx, ty, sym::result_type)`
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clippy_utils::ty::is_type_diagnostic_item(cx, ty, sym::Result)`
 
 error: usage of `clippy_utils::ty::match_type()` on a type diagnostic item
   --> $DIR/match_type_on_diag_item.rs:34:17
diff --git a/tests/ui/crashes/issues_loop_mut_cond.rs b/tests/ui/crashes/issues_loop_mut_cond.rs
index 553c840f9b0..bb238c81ebc 100644
--- a/tests/ui/crashes/issues_loop_mut_cond.rs
+++ b/tests/ui/crashes/issues_loop_mut_cond.rs
@@ -1,4 +1,3 @@
-#![allow(clippy::blocks_in_if_conditions)]
 #![allow(dead_code)]
 
 /// Issue: https://github.com/rust-lang/rust-clippy/issues/2596
diff --git a/tests/ui/def_id_nocore.rs b/tests/ui/def_id_nocore.rs
index 9ff3b5e5ef5..156c88e2e45 100644
--- a/tests/ui/def_id_nocore.rs
+++ b/tests/ui/def_id_nocore.rs
@@ -16,11 +16,12 @@ pub trait Copy {}
 pub unsafe trait Freeze {}
 
 #[lang = "start"]
-#[start]
-fn start(_argc: isize, _argv: *const *const u8) -> isize {
+fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
     0
 }
 
+fn main() {}
+
 struct A;
 
 impl A {
diff --git a/tests/ui/def_id_nocore.stderr b/tests/ui/def_id_nocore.stderr
index 6210d7c6cfd..40d355e9a2e 100644
--- a/tests/ui/def_id_nocore.stderr
+++ b/tests/ui/def_id_nocore.stderr
@@ -1,5 +1,5 @@
 error: methods called `as_*` usually take `self` by reference or `self` by mutable reference
-  --> $DIR/def_id_nocore.rs:27:19
+  --> $DIR/def_id_nocore.rs:28:19
    |
 LL |     pub fn as_ref(self) -> &'static str {
    |                   ^^^^
diff --git a/tests/ui/infinite_loop.rs b/tests/ui/infinite_loop.rs
index e86bd7bcf4f..38e64b9ac0a 100644
--- a/tests/ui/infinite_loop.rs
+++ b/tests/ui/infinite_loop.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::blocks_in_if_conditions)]
-
 fn fn_val(i: i32) -> i32 {
     unimplemented!()
 }
diff --git a/tests/ui/infinite_loop.stderr b/tests/ui/infinite_loop.stderr
index 69309b0da87..4ec7d900ade 100644
--- a/tests/ui/infinite_loop.stderr
+++ b/tests/ui/infinite_loop.stderr
@@ -1,5 +1,5 @@
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:22:11
+  --> $DIR/infinite_loop.rs:20:11
    |
 LL |     while y < 10 {
    |           ^^^^^^
@@ -8,7 +8,7 @@ LL |     while y < 10 {
    = note: this may lead to an infinite or to a never running loop
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:27:11
+  --> $DIR/infinite_loop.rs:25:11
    |
 LL |     while y < 10 && x < 3 {
    |           ^^^^^^^^^^^^^^^
@@ -16,7 +16,7 @@ LL |     while y < 10 && x < 3 {
    = note: this may lead to an infinite or to a never running loop
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:34:11
+  --> $DIR/infinite_loop.rs:32:11
    |
 LL |     while !cond {
    |           ^^^^^
@@ -24,7 +24,7 @@ LL |     while !cond {
    = note: this may lead to an infinite or to a never running loop
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:78:11
+  --> $DIR/infinite_loop.rs:76:11
    |
 LL |     while i < 3 {
    |           ^^^^^
@@ -32,7 +32,7 @@ LL |     while i < 3 {
    = note: this may lead to an infinite or to a never running loop
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:83:11
+  --> $DIR/infinite_loop.rs:81:11
    |
 LL |     while i < 3 && j > 0 {
    |           ^^^^^^^^^^^^^^
@@ -40,7 +40,7 @@ LL |     while i < 3 && j > 0 {
    = note: this may lead to an infinite or to a never running loop
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:87:11
+  --> $DIR/infinite_loop.rs:85:11
    |
 LL |     while i < 3 {
    |           ^^^^^
@@ -48,7 +48,7 @@ LL |     while i < 3 {
    = note: this may lead to an infinite or to a never running loop
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:102:11
+  --> $DIR/infinite_loop.rs:100:11
    |
 LL |     while i < 3 {
    |           ^^^^^
@@ -56,7 +56,7 @@ LL |     while i < 3 {
    = note: this may lead to an infinite or to a never running loop
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:107:11
+  --> $DIR/infinite_loop.rs:105:11
    |
 LL |     while i < 3 {
    |           ^^^^^
@@ -64,7 +64,7 @@ LL |     while i < 3 {
    = note: this may lead to an infinite or to a never running loop
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:173:15
+  --> $DIR/infinite_loop.rs:171:15
    |
 LL |         while self.count < n {
    |               ^^^^^^^^^^^^^^
@@ -72,7 +72,7 @@ LL |         while self.count < n {
    = note: this may lead to an infinite or to a never running loop
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:181:11
+  --> $DIR/infinite_loop.rs:179:11
    |
 LL |     while y < 10 {
    |           ^^^^^^
@@ -82,7 +82,7 @@ LL |     while y < 10 {
    = help: rewrite it as `if cond { loop { } }`
 
 error: variables in the condition are not mutated in the loop body
-  --> $DIR/infinite_loop.rs:188:11
+  --> $DIR/infinite_loop.rs:186:11
    |
 LL |     while y < 10 {
    |           ^^^^^^