]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-52669.rs
Rollup merge of #60685 - dtolnay:spdx, r=nikomatsakis
[rust.git] / src / test / ui / nll / issue-52669.rs
1 #![feature(nll)]
2
3 struct A {
4     b: B,
5 }
6
7 #[derive(Clone)]
8 struct B;
9
10 fn foo(_: A) {}
11
12 fn bar(mut a: A) -> B {
13     a.b = B;
14     foo(a);
15     a.b.clone()
16 //~^ ERROR borrow of moved value
17 }
18
19 fn main() {}