]> git.proxmox.com Git - rustc.git/blob - vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / vendor / pin-project-lite / tests / ui / pin_project / invalid-bounds.rs
1 use pin_project_lite::pin_project;
2
3 pin_project! {
4 struct Generics1<T: 'static : Sized> { //~ ERROR no rules expected the token `:`
5 field: T,
6 }
7 }
8
9 pin_project! {
10 struct Generics2<T: 'static : ?Sized> { //~ ERROR no rules expected the token `:`
11 field: T,
12 }
13 }
14
15 pin_project! {
16 struct Generics3<T: Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
17 field: T,
18 }
19 }
20
21 pin_project! {
22 struct Generics4<T: ?Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
23 field: T,
24 }
25 }
26
27 pin_project! {
28 struct Generics5<T: Sized : ?Sized> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
29 field: T,
30 }
31 }
32
33 pin_project! {
34 struct Generics6<T: ?Sized : Sized> { //~ ERROR no rules expected the token `Sized`
35 field: T,
36 }
37 }
38
39 pin_project! {
40 struct WhereClause1<T>
41 where
42 T: 'static : Sized //~ ERROR no rules expected the token `:`
43 {
44 field: T,
45 }
46 }
47
48 pin_project! {
49 struct WhereClause2<T>
50 where
51 T: 'static : ?Sized //~ ERROR no rules expected the token `:`
52 {
53 field: T,
54 }
55 }
56
57 pin_project! {
58 struct WhereClause3<T>
59 where
60 T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
61 {
62 field: T,
63 }
64 }
65
66 pin_project! {
67 struct WhereClause4<T>
68 where
69 T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
70 {
71 field: T,
72 }
73 }
74
75 pin_project! {
76 struct WhereClause5<T>
77 where
78 T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:`
79 {
80 field: T,
81 }
82 }
83
84 pin_project! {
85 struct WhereClause6<T>
86 where
87 T: ?Sized : Sized //~ ERROR no rules expected the token `Sized`
88 {
89 field: T,
90 }
91 }
92
93 fn main() {}