]> git.proxmox.com Git - rustc.git/blame - src/test/ui/span/issue-15480.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / span / issue-15480.rs
CommitLineData
064997fb 1// run-rustfix
3b2f2976
XL
2fn id<T>(x: T) -> T { x }
3
223e47cc 4fn main() {
1a4d82fc 5 let v = vec![
3b2f2976 6 &id(3)
1a4d82fc 7 ];
48663c56 8 //~^^ ERROR temporary value dropped while borrowed
1a4d82fc 9
85aaf69f 10 for &&x in &v {
1a4d82fc 11 println!("{}", x + 3);
223e47cc
LB
12 }
13}