]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / regions / regions-lifetime-bounds-on-fns.stderr
1 error[E0623]: lifetime mismatch
2   --> $DIR/regions-lifetime-bounds-on-fns.rs:18:10
3    |
4 LL | fn b<'a, 'b>(x: &mut &'a isize, y: &mut &'b isize) {
5    |                      ---------          --------- these two types are declared with different lifetimes...
6 LL |     // Illegal now because there is no `'b:'a` declaration.
7 LL |     *x = *y; //~ ERROR E0623
8    |          ^^ ...but data from `y` flows into `x` here
9
10 error[E0623]: lifetime mismatch
11   --> $DIR/regions-lifetime-bounds-on-fns.rs:24:7
12    |
13 LL | fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) {
14    |                     ---------          --------- these two types are declared with different lifetimes...
15 ...
16 LL |     a(x, y); //~ ERROR 24:7: 24:8: lifetime mismatch [E0623]
17    |       ^ ...but data from `y` flows into `x` here
18
19 error[E0308]: mismatched types
20   --> $DIR/regions-lifetime-bounds-on-fns.rs:30:43
21    |
22 LL |     let _: fn(&mut &isize, &mut &isize) = a; //~ ERROR mismatched types
23    |                                           ^ expected concrete lifetime, found bound lifetime parameter
24    |
25    = note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
26               found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
27
28 error: aborting due to 3 previous errors
29
30 Some errors occurred: E0308, E0623.
31 For more information about an error, try `rustc --explain E0308`.