]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/issue-14303-fncall.rs
Rollup merge of #67005 - andrewbanchich:master, r=joshtriplett
[rust.git] / src / test / ui / parser / issue-14303-fncall.rs
1 // can't run rustfix because it doesn't handle multipart suggestions correctly
2 // compile-flags: -Zborrowck=mir
3 // we need the above to avoid ast borrowck failure in recovered code
4
5 struct S<'a, T> {
6     a: &'a T,
7     b: &'a T,
8 }
9
10 fn foo<'a, 'b>(start: &'a usize, end: &'a usize) {
11     let _x = (*start..*end)
12         .map(|x| S { a: start, b: end })
13         .collect::<Vec<S<_, 'a>>>();
14         //~^ ERROR lifetime arguments must be declared prior to type arguments
15 }
16
17 fn main() {}