]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-15480.rs
Auto merge of #55780 - ogoffart:span_source_text, r=petrochenkov
[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 borrowed value does not live long enough
8
9     for &&x in &v {
10         println!("{}", x + 3);
11     }
12 }