]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr
Remove rustfmt tests from top-level .gitattributes
[rust.git] / src / test / ui / regions / regions-lifetime-bounds-on-fns.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/regions-lifetime-bounds-on-fns.rs:8:5
3    |
4 LL | fn b<'a, 'b>(x: &mut &'a isize, y: &mut &'b isize) {
5    |      --  -- lifetime `'b` defined here
6    |      |
7    |      lifetime `'a` defined here
8 LL |     // Illegal now because there is no `'b:'a` declaration.
9 LL |     *x = *y;
10    |     ^^^^^^^ assignment requires that `'b` must outlive `'a`
11    |
12    = help: consider adding the following bound: `'b: 'a`
13
14 error: lifetime may not live long enough
15   --> $DIR/regions-lifetime-bounds-on-fns.rs:14:5
16    |
17 LL | fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) {
18    |      -- -- lifetime `'b` defined here
19    |      |
20    |      lifetime `'a` defined here
21 ...
22 LL |     a(x, y);
23    |     ^^^^^^^ argument requires that `'b` must outlive `'a`
24    |
25    = help: consider adding the following bound: `'b: 'a`
26
27 error: higher-ranked subtype error
28   --> $DIR/regions-lifetime-bounds-on-fns.rs:20:12
29    |
30 LL |     let _: fn(&mut &isize, &mut &isize) = a;
31    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32
33 error: higher-ranked subtype error
34   --> $DIR/regions-lifetime-bounds-on-fns.rs:20:12
35    |
36 LL |     let _: fn(&mut &isize, &mut &isize) = a;
37    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
39 error: aborting due to 4 previous errors
40