rust/tests/ui/nll/issue-61424.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
151 B
Rust
Raw Normal View History

2020-07-02 00:32:12 -05:00
// run-rustfix
2019-06-01 19:14:09 -05:00
#![deny(unused_mut)]
fn main() {
let mut x; //~ ERROR: variable does not need to be mutable
2019-06-02 21:11:15 -05:00
x = String::new();
dbg!(x);
2019-06-01 19:14:09 -05:00
}