1
1
error[E0716]: temporary value dropped while borrowed
2
- --> $DIR/if-let-rescope-borrowck-suggestions.rs:22 :39
2
+ --> $DIR/if-let-rescope-borrowck-suggestions.rs:21 :39
3
3
|
4
4
LL | do_something(if let Some(value) = Droppy.get_ref() { value } else { &0 });
5
5
| ^^^^^^ - temporary value is freed at the end of this statement
6
6
| |
7
7
| creates a temporary value which is freed while still in use
8
8
|
9
9
note: lifetimes for temporaries generated in `if let`s have been shortened in Edition 2024 so that they are dropped here instead
10
- --> $DIR/if-let-rescope-borrowck-suggestions.rs:22 :64
10
+ --> $DIR/if-let-rescope-borrowck-suggestions.rs:21 :64
11
11
|
12
12
LL | do_something(if let Some(value) = Droppy.get_ref() { value } else { &0 });
13
13
| ^
@@ -22,7 +22,7 @@ LL | do_something({ match Droppy.get_ref() { Some(value) => { value } _ =>
22
22
| ~~~~~~~ ++++++++++++++++ ~~~~ ++
23
23
24
24
error[E0716]: temporary value dropped while borrowed
25
- --> $DIR/if-let-rescope-borrowck-suggestions.rs:24 :39
25
+ --> $DIR/if-let-rescope-borrowck-suggestions.rs:23 :39
26
26
|
27
27
LL | do_something(if let Some(value) = Droppy.get_ref() {
28
28
| ^^^^^^ creates a temporary value which is freed while still in use
@@ -31,7 +31,7 @@ LL | } else if let Some(value) = Droppy.get_ref() {
31
31
| - temporary value is freed at the end of this statement
32
32
|
33
33
note: lifetimes for temporaries generated in `if let`s have been shortened in Edition 2024 so that they are dropped here instead
34
- --> $DIR/if-let-rescope-borrowck-suggestions.rs:27 :5
34
+ --> $DIR/if-let-rescope-borrowck-suggestions.rs:26 :5
35
35
|
36
36
LL | } else if let Some(value) = Droppy.get_ref() {
37
37
| ^
@@ -53,7 +53,7 @@ LL ~ }}});
53
53
|
54
54
55
55
error[E0716]: temporary value dropped while borrowed
56
- --> $DIR/if-let-rescope-borrowck-suggestions.rs:27 :33
56
+ --> $DIR/if-let-rescope-borrowck-suggestions.rs:26 :33
57
57
|
58
58
LL | } else if let Some(value) = Droppy.get_ref() {
59
59
| ^^^^^^ creates a temporary value which is freed while still in use
@@ -62,7 +62,7 @@ LL | } else {
62
62
| - temporary value is freed at the end of this statement
63
63
|
64
64
note: lifetimes for temporaries generated in `if let`s have been shortened in Edition 2024 so that they are dropped here instead
65
- --> $DIR/if-let-rescope-borrowck-suggestions.rs:30 :5
65
+ --> $DIR/if-let-rescope-borrowck-suggestions.rs:29 :5
66
66
|
67
67
LL | } else {
68
68
| ^
0 commit comments