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
152 B
Rust
Raw Normal View History

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