]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-50461-used-mut-from-moves.rs
Auto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercote
[rust.git] / src / test / ui / nll / issue-50461-used-mut-from-moves.rs
1 // run-pass
2
3 #![deny(unused_mut)]
4 #![allow(dead_code)]
5
6 struct Foo {
7     pub value: i32
8 }
9
10 fn use_foo_mut(mut foo: Foo) {
11     foo = foo;
12     println!("{}", foo.value);
13 }
14
15 fn main() {
16     use_foo_mut(Foo { value: 413 });
17 }