]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/bound-lifetime-constrained.func.stderr
Merge commit '2bb3996244cf1b89878da9e39841e9f6bf061602' into sync_cg_clif-2022-12-14
[rust.git] / src / test / ui / associated-types / bound-lifetime-constrained.func.stderr
1 error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types
2   --> $DIR/bound-lifetime-constrained.rs:16:50
3    |
4 LL | fn func1(_: for<'a> fn(<() as Foo<'a>>::Item) -> &'a i32) {
5    |                                                  ^^^^^^^
6
7 error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types
8   --> $DIR/bound-lifetime-constrained.rs:23:29
9    |
10 LL | fn func2(_: for<'a> fn() -> <() as Foo<'a>>::Item) {
11    |                             ^^^^^^^^^^^^^^^^^^^^^
12
13 error: aborting due to 2 previous errors
14
15 For more information about this error, try `rustc --explain E0581`.