]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/issue-11493.fixed
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / borrowck / issue-11493.fixed
CommitLineData
064997fb
FG
1// run-rustfix
2fn id<T>(x: T) -> T { x }
3
4fn 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}