]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/option_take_on_temporary.fixed
Rollup merge of #96733 - SparrowLii:place_to_string, r=davidtwco
[rust.git] / src / tools / clippy / tests / ui / option_take_on_temporary.fixed
1 // run-rustfix
2
3 fn main() {
4     println!("Testing non erroneous option_take_on_temporary");
5     let mut option = Some(1);
6     let _ = Box::new(move || option.take().unwrap());
7
8     println!("Testing non erroneous option_take_on_temporary");
9     let x = Some(3);
10     x.as_ref();
11
12     println!("Testing erroneous option_take_on_temporary");
13     let x = Some(3);
14     x.as_ref();
15 }