]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/issue-11493.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / issue-11493.rs
1 // run-rustfix
2 fn id<T>(x: T) -> T { x }
3
4 fn main() {
5     let x = Some(3);
6     let y = x.as_ref().unwrap_or(&id(5));  //~ ERROR
7     let _ = &y;
8 }