]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
Rollup merge of #105502 - chenyukang:yukang/fix-105366-impl, r=estebank
[rust.git] / compiler / rustc_infer / src / infer / error_reporting / need_type_info.rs
index 8ff1639a3a24b489e1f8ffc1d039e77a298fda4f..4f9e069c1763d08789c78175be6c926fe3e3d8fa 100644 (file)
@@ -852,7 +852,10 @@ fn generic_arg_contains_target(&self, arg: GenericArg<'tcx>) -> bool {
             match inner.unpack() {
                 GenericArgKind::Lifetime(_) => {}
                 GenericArgKind::Type(ty) => {
-                    if matches!(ty.kind(), ty::Opaque(..) | ty::Closure(..) | ty::Generator(..)) {
+                    if matches!(
+                        ty.kind(),
+                        ty::Alias(ty::Opaque, ..) | ty::Closure(..) | ty::Generator(..)
+                    ) {
                         // Opaque types can't be named by the user right now.
                         //
                         // Both the generic arguments of closures and generators can