]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/issues/issue-14303.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / parser / issues / issue-14303.rs
1 enum Enum<'a, T, 'b> {
2 //~^ ERROR lifetime parameters must be declared prior to type and const parameters
3 A(&'a &'b T)
4 }
5
6 struct Struct<'a, T, 'b> {
7 //~^ ERROR lifetime parameters must be declared prior to type and const parameters
8 x: &'a &'b T
9 }
10
11 trait Trait<'a, T, 'b> {}
12 //~^ ERROR lifetime parameters must be declared prior to type and const parameters
13
14 fn foo<'a, T, 'b>(x: &'a T) {}
15 //~^ ERROR lifetime parameters must be declared prior to type and const parameters
16
17 struct Y<T>(T);
18 impl<'a, T, 'b> Y<T> {}
19 //~^ ERROR lifetime parameters must be declared prior to type and const parameters
20
21 mod bar {
22 pub struct X<'a, 'b, 'c, T> {
23 a: &'a str,
24 b: &'b str,
25 c: &'c str,
26 t: T,
27 }
28 }
29
30 fn bar<'a, 'b, 'c, T>(x: bar::X<'a, T, 'b, 'c>) {}
31 //~^ ERROR type provided when a lifetime was expected
32
33 fn main() {}