]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-11493.fixed
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / borrowck / issue-11493.fixed
1 // run-rustfix
2 fn id<T>(x: T) -> T { x }
3
4 fn main() {
5     let x = Some(3);
6     let binding = id(5);
7     let y = x.as_ref().unwrap_or(&binding);  //~ ERROR
8     let _ = &y;
9 }