]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_infer/src/infer/error_reporting/mod.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / compiler / rustc_infer / src / infer / error_reporting / mod.rs
index abd99fc74dacc323b664a50f396b4911f15a6be5..9c38eb6163f5627043746c3ead3953d998efe121 100644 (file)
@@ -2272,9 +2272,12 @@ pub fn construct_generic_bound_failure(
 
         let labeled_user_string = match bound_kind {
             GenericKind::Param(ref p) => format!("the parameter type `{}`", p),
-            GenericKind::Projection(ref p) => format!("the associated type `{}`", p),
-            GenericKind::Opaque(def_id, substs) => {
-                format!("the opaque type `{}`", self.tcx.def_path_str_with_substs(def_id, substs))
+            GenericKind::Alias(ty::Projection, ref p) => format!("the associated type `{}`", p),
+            GenericKind::Alias(ty::Opaque, ref p) => {
+                format!(
+                    "the opaque type `{}`",
+                    self.tcx.def_path_str_with_substs(p.def_id, p.substs)
+                )
             }
         };