]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issue-46472.stderr
Add comment about the problem, and use provided path if available
[rust.git] / src / test / ui / issue-46472.stderr
1 error[E0597]: borrowed value does not live long enough (Ast)
2   --> $DIR/issue-46472.rs:14:10
3    |
4 14 |     &mut 4
5    |          ^ temporary value does not live long enough
6 ...
7 17 | }
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:1...
11   --> $DIR/issue-46472.rs:13:1
12    |
13 13 | / fn bar<'a>() -> &'a mut u32 {
14 14 | |     &mut 4
15 15 | |     //~^ ERROR borrowed value does not live long enough (Ast) [E0597]
16 16 | |     //~| ERROR borrowed value does not live long enough (Mir) [E0597]
17 17 | | }
18    | |_^
19
20 error[E0597]: borrowed value does not live long enough (Mir)
21   --> $DIR/issue-46472.rs:14:10
22    |
23 14 |     &mut 4
24    |          ^ temporary value does not live long enough
25 ...
26 17 | }
27    | - temporary value only lives until here
28    |
29 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:1...
30   --> $DIR/issue-46472.rs:13:1
31    |
32 13 | / fn bar<'a>() -> &'a mut u32 {
33 14 | |     &mut 4
34 15 | |     //~^ ERROR borrowed value does not live long enough (Ast) [E0597]
35 16 | |     //~| ERROR borrowed value does not live long enough (Mir) [E0597]
36 17 | | }
37    | |_^
38
39 error: aborting due to 2 previous errors
40