]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_infer/src/infer/error_reporting/nice_region_error/trait_impl_difference.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / compiler / rustc_infer / src / infer / error_reporting / nice_region_error / trait_impl_difference.rs
index a6a39d062d51dadc9a0f2e173af676f563e4bdb7..5d536e982ed028af28d6cb4b50e3b3f9d96b2cee 100644 (file)
@@ -84,12 +84,12 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
 
         let expected_highlight = HighlightBuilder::build(self.tcx(), expected);
         let expected = self
-            .infcx
+            .cx
             .extract_inference_diagnostics_data(expected.into(), Some(expected_highlight))
             .name;
         let found_highlight = HighlightBuilder::build(self.tcx(), found);
         let found =
-            self.infcx.extract_inference_diagnostics_data(found.into(), Some(found_highlight)).name;
+            self.cx.extract_inference_diagnostics_data(found.into(), Some(found_highlight)).name;
 
         err.span_label(sp, &format!("found `{}`", found));
         err.span_label(trait_sp, &format!("expected `{}`", expected));
@@ -156,7 +156,8 @@ impl<'tcx> Visitor<'tcx> for TypeParamSpanVisitor<'tcx> {
                 [segment]
                     if matches!(
                         segment.res,
-                        Res::SelfTy { trait_: _, alias_to: _ }
+                        Res::SelfTyParam { .. }
+                            | Res::SelfTyAlias { .. }
                             | Res::Def(hir::def::DefKind::TyParam, _)
                     ) =>
                 {