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 14:32:12 +09: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 19:11:15 -07:00
x = String::new();
dbg!(x);
2019-06-01 19:14:09 -05:00
}