]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-46472.stderr
Auto merge of #52101 - japaric:linker-flavor, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-46472.stderr
1 error[E0597]: borrowed value does not live long enough (Ast)
2   --> $DIR/issue-46472.rs:14:10
3    |
4 LL |     &mut 4
5    |          ^ temporary value does not live long enough
6 ...
7 LL | }
8    | - temporary value only lives until here
9    |
10 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:8...
11   --> $DIR/issue-46472.rs:13:8
12    |
13 LL | fn bar<'a>() -> &'a mut u32 {
14    |        ^^
15
16 error[E0597]: borrowed value does not live long enough (Mir)
17   --> $DIR/issue-46472.rs:14:10
18    |
19 LL |     &mut 4
20    |          ^ temporary value does not live long enough
21 ...
22 LL | }
23    | - temporary value only lives until here
24    |
25 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:8...
26   --> $DIR/issue-46472.rs:13:8
27    |
28 LL | fn bar<'a>() -> &'a mut u32 {
29    |        ^^
30
31 error: aborting due to 2 previous errors
32
33 For more information about this error, try `rustc --explain E0597`.