]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-50461-used-mut-from-moves.rs
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[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 }