]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-50461-used-mut-from-moves.rs
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / tests / 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 }