]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-58776-borrowck-scans-children.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[rust.git] / src / test / ui / borrowck / issue-58776-borrowck-scans-children.rs
1 fn main() {
2     let mut greeting = "Hello world!".to_string();
3     let res = (|| (|| &greeting)())();
4
5     greeting = "DEALLOCATED".to_string();
6     //~^ ERROR cannot assign
7     drop(greeting);
8     //~^ ERROR cannot move
9
10     println!("thread result: {:?}", res);
11 }