]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-15480.rs
Merge commit '7ea7cd165ad6705603852771bf82cc2fd6560db5' into clippyup2
[rust.git] / src / test / ui / span / issue-15480.rs
1 fn id<T>(x: T) -> T { x }
2
3 fn main() {
4     let v = vec![
5         &id(3)
6     ];
7     //~^^ ERROR temporary value dropped while borrowed
8
9     for &&x in &v {
10         println!("{}", x + 3);
11     }
12 }