]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/issues/issue-14303-fncall.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / parser / issues / issue-14303-fncall.rs
1 // revisions: full generic_arg
2 // can't run rustfix because it doesn't handle multipart suggestions correctly
3 // we need the above to avoid ast borrowck failure in recovered code
4 #![cfg_attr(generic_arg, feature(generic_arg_infer))]
5
6
7 struct S<'a, T> {
8     a: &'a T,
9     b: &'a T,
10 }
11
12 fn foo<'a, 'b>(start: &'a usize, end: &'a usize) {
13     let _x = (*start..*end)
14         .map(|x| S { a: start, b: end })
15         .collect::<Vec<S<_, 'a>>>();
16         //[generic_arg]~^ ERROR inferred provided when a lifetime was expected
17         //[full]~^^ ERROR type provided when a lifetime was expected
18 }
19
20 fn main() {}