]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issue-40288-2.nll.stderr
Rollup merge of #53110 - Xanewok:save-analysis-remap-path, r=nrc
[rust.git] / src / test / ui / issue-40288-2.nll.stderr
1 warning: not reporting region error due to nll
2   --> $DIR/issue-40288-2.rs:17:20
3    |
4 LL |         slice[0] = y;
5    |                    ^
6
7 warning: not reporting region error due to nll
8   --> $DIR/issue-40288-2.rs:16:20
9    |
10 LL |         let slice: &mut [_] = &mut out;
11    |                    ^^^^^^^^
12
13 warning: not reporting region error due to nll
14   --> $DIR/issue-40288-2.rs:14:19
15    |
16 LL |     let mut out = [x];
17    |                   ^^^
18
19 warning: not reporting region error due to nll
20   --> $DIR/issue-40288-2.rs:32:20
21    |
22 LL |         dst.head = y;
23    |                    ^
24
25 warning: not reporting region error due to nll
26   --> $DIR/issue-40288-2.rs:31:18
27    |
28 LL |         let dst: &mut Struct<_, [()]> = &mut out;
29    |                  ^^^^^^^^^^^^^^^^^^^^
30
31 warning: not reporting region error due to nll
32   --> $DIR/issue-40288-2.rs:29:19
33    |
34 LL |     let mut out = Struct { head: x, _tail: [()] };
35    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
37 error[E0621]: explicit lifetime required in the type of `y`
38   --> $DIR/issue-40288-2.rs:17:9
39    |
40 LL | fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
41    |                                                         -- help: add explicit lifetime `'a` to the type of `y`: `&'a T`
42 ...
43 LL |         slice[0] = y;
44    |         ^^^^^^^^^^^^ lifetime `'a` required
45
46 error[E0621]: explicit lifetime required in the type of `y`
47   --> $DIR/issue-40288-2.rs:32:9
48    |
49 LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
50    |                                                          -- help: add explicit lifetime `'a` to the type of `y`: `&'a T`
51 ...
52 LL |         dst.head = y;
53    |         ^^^^^^^^^^^^ lifetime `'a` required
54
55 error: aborting due to 2 previous errors
56
57 For more information about this error, try `rustc --explain E0621`.