summary refs log tree commit diff
path: root/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.stderr
blob: 931eb7da744e94b412d6873e22a2d508fd3b5af6 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
error[E0597]: borrowed value does not live long enough
  --> $DIR/promote-ref-mut-in-let-issue-46557.rs:15:9
   |
LL |     let ref mut x = 1234543; //~ ERROR
   |         ^^^^^^^^^ temporary value does not live long enough
LL |     x
LL | }
   | - temporary value only lives until here
   |
   = note: borrowed value must be valid for the static lifetime...

error[E0597]: borrowed value does not live long enough
  --> $DIR/promote-ref-mut-in-let-issue-46557.rs:20:10
   |
LL |     let (ref mut x, ) = (1234543, ); //~ ERROR
   |          ^^^^^^^^^ borrowed value does not live long enough
LL |     x
LL | }
   | - borrowed value only lives until here
   |
   = note: borrowed value must be valid for the static lifetime...

error[E0597]: borrowed value does not live long enough
  --> $DIR/promote-ref-mut-in-let-issue-46557.rs:26:9
   |
LL |         ref mut x => x //~ ERROR
   |         ^^^^^^^^^ temporary value does not live long enough
LL |     }
LL | }
   | - temporary value only lives until here
   |
   = note: borrowed value must be valid for the static lifetime...

error[E0597]: borrowed value does not live long enough
  --> $DIR/promote-ref-mut-in-let-issue-46557.rs:32:10
   |
LL |         (ref mut x,) => x, //~ ERROR
   |          ^^^^^^^^^ borrowed value does not live long enough
LL |     }
LL | }
   | - borrowed value only lives until here
   |
   = note: borrowed value must be valid for the static lifetime...

error[E0597]: borrowed value does not live long enough
  --> $DIR/promote-ref-mut-in-let-issue-46557.rs:37:10
   |
LL |     &mut 1234543 //~ ERROR
   |          ^^^^^^^ temporary value does not live long enough
LL | }
   | - temporary value only lives until here
   |
   = note: borrowed value must be valid for the static lifetime...

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0597`.