]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr
Merge commit '7c7683c8efe447b251d6c5ca6cce51233060f6e8' into clippyup
[rust.git] / src / test / ui / regions / region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:9:5
3    |
4 LL | fn b<'a, 'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c 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/region-multiple-lifetime-bounds-on-fns-where-clause.rs:16:5
16    |
17 LL | fn c<'a,'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) {
18    |      -- -- lifetime `'b` defined here
19    |      |
20    |      lifetime `'a` defined here
21 ...
22 LL |     a(x, y, z);
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/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:12
29    |
30 LL |     let _: fn(&mut &isize, &mut &isize, &mut &isize) = a;
31    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32
33 error: higher-ranked subtype error
34   --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:12
35    |
36 LL |     let _: fn(&mut &isize, &mut &isize, &mut &isize) = a;
37    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
39 error: higher-ranked subtype error
40   --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:12
41    |
42 LL |     let _: fn(&mut &isize, &mut &isize, &mut &isize) = a;
43    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
45 error: aborting due to 5 previous errors
46