]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/type-alias-impl-trait/type-alias-impl-trait.rs
Check opaque types satisfy their bounds
[rust.git] / src / test / ui / type-alias-impl-trait / type-alias-impl-trait.rs
index 209134acf01f9723d50d9421bdf0caeb0074c306..80192d19af98b5cd9d63f5f89b664570a558dc1d 100644 (file)
@@ -70,14 +70,14 @@ fn my_other_iter<U>(u: U) -> MyOtherIter<U> {
 }
 
 trait Trait {}
-type GenericBound<'a, T: Trait> = impl Sized + 'a;
+type GenericBound<'a, T: Trait + 'a> = impl Sized + 'a;
 
 fn generic_bound<'a, T: Trait + 'a>(t: T) -> GenericBound<'a, T> {
     t
 }
 
 mod pass_through {
-    pub type Passthrough<T> = impl Sized + 'static;
+    pub type Passthrough<T: 'static> = impl Sized + 'static;
 
     fn define_passthrough<T: 'static>(t: T) -> Passthrough<T> {
         t