]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/wf.rs
Use ty::OpaqueTy everywhere
[rust.git] / compiler / rustc_trait_selection / src / traits / wf.rs
index e47ba64245f50732f0b95a7eddf143b5341bc555..ab678e4d98f81bec6ba72efd4918826eb37accb7 100644 (file)
@@ -648,12 +648,12 @@ fn compute(&mut self, arg: GenericArg<'tcx>) {
                     // types appearing in the fn signature
                 }
 
-                ty::Opaque(did, substs) => {
+                ty::Opaque(ty::OpaqueTy { def_id, substs }) => {
                     // All of the requirements on type parameters
                     // have already been checked for `impl Trait` in
                     // return position. We do need to check type-alias-impl-trait though.
-                    if ty::is_impl_trait_defn(self.tcx, did).is_none() {
-                        let obligations = self.nominal_obligations(did, substs);
+                    if ty::is_impl_trait_defn(self.tcx, def_id).is_none() {
+                        let obligations = self.nominal_obligations(def_id, substs);
                         self.out.extend(obligations);
                     }
                 }