]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-91139.migrate.stderr
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / generic-associated-types / issue-91139.migrate.stderr
1 error[E0311]: the parameter type `T` may not live long enough
2   --> $DIR/issue-91139.rs:27:12
3    |
4 LL |     let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
5    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
6    |
7 help: consider adding an explicit lifetime bound...
8    |
9 LL | fn foo<T: 'a>() {
10    |         ++++
11
12 error: aborting due to previous error
13