about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_borrowck/src')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/mod.rs4
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/move_errors.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs
index 50130dc2a27..a4df277a7b0 100644
--- a/compiler/rustc_borrowck/src/diagnostics/mod.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs
@@ -966,8 +966,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                         _ => None,
                     });
                 let is_option_or_result = parent_self_ty.map_or(false, |def_id| {
-                    tcx.is_diagnostic_item(sym::option_type, def_id)
-                        || tcx.is_diagnostic_item(sym::result_type, def_id)
+                    tcx.is_diagnostic_item(sym::Option, def_id)
+                        || tcx.is_diagnostic_item(sym::Result, def_id)
                 });
                 FnSelfUseKind::Normal { self_arg, implicit_into_iter, is_option_or_result }
             });
diff --git a/compiler/rustc_borrowck/src/diagnostics/move_errors.rs b/compiler/rustc_borrowck/src/diagnostics/move_errors.rs
index b23ce281bef..855e6850b2e 100644
--- a/compiler/rustc_borrowck/src/diagnostics/move_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/move_errors.rs
@@ -400,8 +400,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
             | ty::Opaque(def_id, _) => def_id,
             _ => return err,
         };
-        let is_option = self.infcx.tcx.is_diagnostic_item(sym::option_type, def_id);
-        let is_result = self.infcx.tcx.is_diagnostic_item(sym::result_type, def_id);
+        let is_option = self.infcx.tcx.is_diagnostic_item(sym::Option, def_id);
+        let is_result = self.infcx.tcx.is_diagnostic_item(sym::Result, def_id);
         if (is_option || is_result) && use_spans.map_or(true, |v| !v.for_closure()) {
             err.span_suggestion_verbose(
                 span.shrink_to_hi(),