]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-11493.fixed
Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyup
[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 }