X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_hir_typeck%2Fsrc%2Fcoercion.rs;h=36cf4791492dd1c8c8b36d1125289dc008cb3fed;hb=39b2a41b39b445bf7efab02f6eade16135d7df85;hp=f0b349f0c98dd667f349083ab9555df2aa758589;hpb=ebf579932dd3c89c64368e23501310611b0e0ccf;p=rust.git diff --git a/compiler/rustc_hir_typeck/src/coercion.rs b/compiler/rustc_hir_typeck/src/coercion.rs index f0b349f0c98..36cf4791492 100644 --- a/compiler/rustc_hir_typeck/src/coercion.rs +++ b/compiler/rustc_hir_typeck/src/coercion.rs @@ -1805,7 +1805,7 @@ fn add_impl_trait_explanation<'a>( { let ty = >::ast_ty_to_ty(fcx, ty); // Get the `impl Trait`'s `DefId`. - if let ty::Opaque(def_id, _) = ty.kind() + if let ty::Alias(ty::Opaque, ty::AliasTy { def_id, .. }) = ty.kind() // Get the `impl Trait`'s `Item` so that we can get its trait bounds and // get the `Trait`'s `DefId`. && let hir::ItemKind::OpaqueTy(hir::OpaqueTy { bounds, .. }) =