]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-91139.rs
Move some tests with compare-mode=nll output to revisions
[rust.git] / src / test / ui / generic-associated-types / issue-91139.rs
1 // revisions: migrate nll
2 //[nll]compile-flags: -Z borrowck=mir
3
4 // Since we are testing nll (and migration) explicitly as a separate
5 // revisions, don't worry about the --compare-mode=nll on this test.
6
7 // ignore-compare-mode-nll
8
9 //[nll] check-pass
10 //[migrate] check-fail
11
12 #![feature(generic_associated_types)]
13
14 trait Foo<T> {
15     type Type<'a>
16     where
17         T: 'a;
18 }
19
20 impl<T> Foo<T> for () {
21     type Type<'a> = ()
22     where
23         T: 'a;
24 }
25
26 fn foo<T>() {
27     let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
28     //[migrate]~^ the parameter type `T` may not live long enough
29 }
30
31 pub fn main() {}