]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions-fn-subtyping-return-static-fail.stderr
Merge branch 'master' into rusty-hermit
[rust.git] / src / test / ui / regions-fn-subtyping-return-static-fail.stderr
1 error[E0308]: mismatched types
2   --> $DIR/regions-fn-subtyping-return-static-fail.rs:40:12
3    |
4 LL |     want_F(bar);
5    |            ^^^ expected concrete lifetime, found bound lifetime parameter 'cx
6    |
7    = note: expected type `for<'cx> fn(&'cx S) -> &'cx S`
8               found type `for<'a> fn(&'a S) -> &S {bar::<'_>}`
9
10 error[E0308]: mismatched types
11   --> $DIR/regions-fn-subtyping-return-static-fail.rs:48:12
12    |
13 LL |     want_G(baz);
14    |            ^^^ expected concrete lifetime, found bound lifetime parameter 'cx
15    |
16    = note: expected type `for<'cx> fn(&'cx S) -> &'static S`
17               found type `for<'r> fn(&'r S) -> &'r S {baz}`
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0308`.