]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/variance/constraints.rs
Rollup merge of #101786 - chenyukang:fix-tidy-for-bootstrap, r=jyn514
[rust.git] / compiler / rustc_typeck / src / variance / constraints.rs
index 4fe213ffeea35bcf69026b18a67b9177dadf188b..eaf0310d57aeca595c744cf9ee437a31610091c1 100644 (file)
@@ -257,7 +257,7 @@ fn add_constraints_from_ty(
                 self.add_constraints_from_invariant_substs(current, substs, variance);
             }
 
-            ty::Dynamic(data, r) => {
+            ty::Dynamic(data, r, _) => {
                 // The type `Foo<T+'a>` is contravariant w/r/t `'a`:
                 let contra = self.contravariant(variance);
                 self.add_constraints_from_region(current, r, contra);
@@ -411,11 +411,7 @@ fn add_constraints_from_region(
                 // way early-bound regions do, so we skip them here.
             }
 
-            ty::ReFree(..)
-            | ty::ReVar(..)
-            | ty::RePlaceholder(..)
-            | ty::ReEmpty(_)
-            | ty::ReErased => {
+            ty::ReFree(..) | ty::ReVar(..) | ty::RePlaceholder(..) | ty::ReErased => {
                 // We don't expect to see anything but 'static or bound
                 // regions when visiting member types or method types.
                 bug!(