Skip to content

Commit

Permalink
Use a type implementing Drop
Browse files Browse the repository at this point in the history
  • Loading branch information
czipperz committed Jun 3, 2019
1 parent 7feeaf0 commit fea2cdb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/ui/nll/issue-61424.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

fn main() {
let mut x; //~ ERROR: variable does not need to be mutable
x = 0;
dbg!(0);
x = String::new();
dbg!(x);
}
16 changes: 16 additions & 0 deletions src/test/ui/nll/issue-61424.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
error: variable does not need to be mutable
--> $DIR/issue-61424.rs:4:9
|
LL | let mut x;
| ----^
| |
| help: remove this `mut`
|
note: lint level defined here
--> $DIR/issue-61424.rs:1:9
|
LL | #![deny(unused_mut)]
| ^^^^^^^^^^

error: aborting due to previous error

0 comments on commit fea2cdb

Please sign in to comment.