summary refs log tree commit diff
path: root/src/test/ui/issue-46472.stderr
blob: 50df72fc2a0201326b2b674109c1563c2a39ba8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
error[E0597]: borrowed value does not live long enough (Ast)
  --> $DIR/issue-46472.rs:14:10
   |
14 |     &mut 4
   |          ^ temporary value does not live long enough
...
17 | }
   | - temporary value only lives until here
   |
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:1...
  --> $DIR/issue-46472.rs:13:1
   |
13 | / fn bar<'a>() -> &'a mut u32 {
14 | |     &mut 4
15 | |     //~^ ERROR borrowed value does not live long enough (Ast) [E0597]
16 | |     //~| ERROR borrowed value does not live long enough (Mir) [E0597]
17 | | }
   | |_^

error[E0597]: borrowed value does not live long enough (Mir)
  --> $DIR/issue-46472.rs:14:10
   |
14 |     &mut 4
   |          ^ temporary value does not live long enough
...
17 | }
   |  - temporary value only lives until here
   |
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:1...
  --> $DIR/issue-46472.rs:13:1
   |
13 | / fn bar<'a>() -> &'a mut u32 {
14 | |     &mut 4
15 | |     //~^ ERROR borrowed value does not live long enough (Ast) [E0597]
16 | |     //~| ERROR borrowed value does not live long enough (Mir) [E0597]
17 | | }
   | |_^

error: aborting due to 2 previous errors