]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/unnecessary_wraps.rs
Rollup merge of #87528 - :stack_overflow_obsd, r=joshtriplett
[rust.git] / src / tools / clippy / clippy_lints / src / unnecessary_wraps.rs
index 5ca861a14bf2d121ebf180ebc893e00d790bf726..c940cf077d11c291ec7ac24e09725856fa30c861 100644 (file)
@@ -101,9 +101,9 @@ fn check_fn(
 
         // 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;