fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
6.2 KiB166 linesraw
1error[E0367]: `Drop` impl requires `'adds_bnd: 'al` but the struct it is implemented for does not
2  --> $DIR/reject-specialized-drops-8142.rs:24:20
3   |
4LL | impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> {                        // REJECT
5   |                    ^^^
6   |
7note: the implementor must specify the same requirement
8  --> $DIR/reject-specialized-drops-8142.rs:4:1
9   |
10LL | struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
11   | ^^^^^^^^^^^^^^^^^
12
13error[E0367]: `Drop` impl requires `'adds_bnd: 'al` but the struct it is implemented for does not
14  --> $DIR/reject-specialized-drops-8142.rs:28:67
15   |
16LL | impl<'al,'adds_bnd>     Drop for L<'al,'adds_bnd> where 'adds_bnd:'al {    // REJECT
17   |                                                                   ^^^
18   |
19note: the implementor must specify the same requirement
20  --> $DIR/reject-specialized-drops-8142.rs:5:1
21   |
22LL | struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
23   | ^^^^^^^^^^^^^^^^^
24
25error[E0366]: `Drop` impls cannot be specialized
26  --> $DIR/reject-specialized-drops-8142.rs:34:1
27   |
28LL | impl                    Drop for N<'static>     { fn drop(&mut self) { } } // REJECT
29   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30   |
31   = note: `'static` is not a generic parameter
32note: use the same sequence of generic lifetime, type and const parameters as the struct definition
33  --> $DIR/reject-specialized-drops-8142.rs:7:1
34   |
35LL | struct N<'n> { x: &'n i8 }
36   | ^^^^^^^^^^^^
37
38error[E0366]: `Drop` impls cannot be specialized
39  --> $DIR/reject-specialized-drops-8142.rs:39:1
40   |
41LL | impl              Drop for P<i8>          { fn drop(&mut self) { } } // REJECT
42   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43   |
44   = note: `i8` is not a generic parameter
45note: use the same sequence of generic lifetime, type and const parameters as the struct definition
46  --> $DIR/reject-specialized-drops-8142.rs:9:1
47   |
48LL | struct P<Tp> { x: *const Tp }
49   | ^^^^^^^^^^^^
50
51error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not
52  --> $DIR/reject-specialized-drops-8142.rs:42:14
53   |
54LL | impl<AddsBnd:Bound> Drop for Q<AddsBnd> { fn drop(&mut self) { } } // REJECT
55   |              ^^^^^
56   |
57note: the implementor must specify the same requirement
58  --> $DIR/reject-specialized-drops-8142.rs:10:1
59   |
60LL | struct Q<Tq> { x: *const Tq }
61   | ^^^^^^^^^^^^
62
63error[E0367]: `Drop` impl requires `AddsRBnd: 'rbnd` but the struct it is implemented for does not
64  --> $DIR/reject-specialized-drops-8142.rs:45:21
65   |
66LL | impl<'rbnd,AddsRBnd:'rbnd> Drop for R<AddsRBnd> { fn drop(&mut self) { } } // REJECT
67   |                     ^^^^^
68   |
69note: the implementor must specify the same requirement
70  --> $DIR/reject-specialized-drops-8142.rs:11:1
71   |
72LL | struct R<Tr> { x: *const Tr }
73   | ^^^^^^^^^^^^
74
75error[E0366]: `Drop` impls cannot be specialized
76  --> $DIR/reject-specialized-drops-8142.rs:54:1
77   |
78LL | impl<One>         Drop for V<One,One>     { fn drop(&mut self) { } } // REJECT
79   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80   |
81   = note: `One` is mentioned multiple times
82note: use the same sequence of generic lifetime, type and const parameters as the struct definition
83  --> $DIR/reject-specialized-drops-8142.rs:15:1
84   |
85LL | struct V<Tva, Tvb> { x: *const Tva, y: *const Tvb }
86   | ^^^^^^^^^^^^^^^^^^
87
88error[E0366]: `Drop` impls cannot be specialized
89  --> $DIR/reject-specialized-drops-8142.rs:57:1
90   |
91LL | impl<'lw>         Drop for W<'lw,'lw>     { fn drop(&mut self) { } } // REJECT
92   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93   |
94   = note: `'lw` is mentioned multiple times
95note: use the same sequence of generic lifetime, type and const parameters as the struct definition
96  --> $DIR/reject-specialized-drops-8142.rs:16:1
97   |
98LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 }
99   | ^^^^^^^^^^^^^^^^^^
100
101error[E0366]: `Drop` impls cannot be specialized
102  --> $DIR/reject-specialized-drops-8142.rs:60:1
103   |
104LL | impl              Drop for X<3>           { fn drop(&mut self) { } } // REJECT
105   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106   |
107   = note: `3` is not a generic parameter
108note: use the same sequence of generic lifetime, type and const parameters as the struct definition
109  --> $DIR/reject-specialized-drops-8142.rs:17:1
110   |
111LL | struct X<const Ca: usize>;
112   | ^^^^^^^^^^^^^^^^^^^^^^^^^
113
114error[E0366]: `Drop` impls cannot be specialized
115  --> $DIR/reject-specialized-drops-8142.rs:63:1
116   |
117LL | impl<const Ca: usize> Drop for Y<Ca, Ca>     { fn drop(&mut self) { } } // REJECT
118   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119   |
120   = note: `Ca` is mentioned multiple times
121note: use the same sequence of generic lifetime, type and const parameters as the struct definition
122  --> $DIR/reject-specialized-drops-8142.rs:18:1
123   |
124LL | struct Y<const Ca: usize, const Cb: usize>;
125   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126
127error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the enum it is implemented for does not
128  --> $DIR/reject-specialized-drops-8142.rs:66:14
129   |
130LL | impl<AddsBnd:Bound> Drop for Enum<AddsBnd> { fn drop(&mut self) { } } // REJECT
131   |              ^^^^^
132   |
133note: the implementor must specify the same requirement
134  --> $DIR/reject-specialized-drops-8142.rs:20:1
135   |
136LL | enum Enum<T> { Variant(T) }
137   | ^^^^^^^^^^^^
138
139error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not
140  --> $DIR/reject-specialized-drops-8142.rs:69:14
141   |
142LL | impl<AddsBnd:Bound> Drop for TupleStruct<AddsBnd> { fn drop(&mut self) { } } // REJECT
143   |              ^^^^^
144   |
145note: the implementor must specify the same requirement
146  --> $DIR/reject-specialized-drops-8142.rs:21:1
147   |
148LL | struct TupleStruct<T>(T);
149   | ^^^^^^^^^^^^^^^^^^^^^
150
151error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the union it is implemented for does not
152  --> $DIR/reject-specialized-drops-8142.rs:72:21
153   |
154LL | impl<AddsBnd:Copy + Bound> Drop for Union<AddsBnd> { fn drop(&mut self) { } } // REJECT
155   |                     ^^^^^
156   |
157note: the implementor must specify the same requirement
158  --> $DIR/reject-specialized-drops-8142.rs:22:1
159   |
160LL | union Union<T: Copy> { f: T }
161   | ^^^^^^^^^^^^^^^^^^^^
162
163error: aborting due to 13 previous errors
164
165Some errors have detailed explanations: E0366, E0367.
166For more information about an error, try `rustc --explain E0366`.