]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/as-ref-2.fixed
Add warning when whitespace is not skipped after an escaped newline.
[rust.git] / src / test / ui / suggestions / as-ref-2.fixed
1 // run-rustfix
2
3 struct Struct;
4
5 fn bar(_: &Struct) -> Struct {
6     Struct
7 }
8
9 fn main() {
10     let foo = Some(Struct);
11     let _x: Option<Struct> = foo.as_ref().map(|s| bar(&s));
12     let _y = foo; //~ERROR use of moved value: `foo`
13 }