Skip to content

Commit 40e6b02

Browse files
committed
Bless output of test nll/return-ref-mut-issue-46557.rs for Polonius
1 parent ed1625f commit 40e6b02

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error[E0716]: temporary value dropped while borrowed
2+
--> $DIR/return-ref-mut-issue-46557.rs:4:21
3+
|
4+
LL | let ref mut x = 1234543;
5+
| ^^^^^^^ creates a temporary which is freed while still in use
6+
LL | x
7+
| - borrow later used here
8+
LL | }
9+
| - temporary value is freed at the end of this statement
10+
|
11+
= note: consider using a `let` binding to create a longer lived value
12+
13+
error: aborting due to previous error
14+
15+
For more information about this error, try `rustc --explain E0716`.

0 commit comments

Comments
 (0)