1 error[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
4 LL | impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT
7 note: the implementor must specify the same requirement
8 --> $DIR/reject-specialized-drops-8142.rs:4:1
10 LL | struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 error[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
16 LL | impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT
19 note: the implementor must specify the same requirement
20 --> $DIR/reject-specialized-drops-8142.rs:5:1
22 LL | struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 error[E0308]: mismatched types
26 --> $DIR/reject-specialized-drops-8142.rs:34:1
28 LL | impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
31 = note: expected struct `N<'n>`
32 found struct `N<'static>`
33 note: the lifetime `'n` as defined here...
34 --> $DIR/reject-specialized-drops-8142.rs:7:10
36 LL | struct N<'n> { x: &'n i8 }
38 = note: ...does not necessarily outlive the static lifetime
40 error[E0366]: `Drop` impls cannot be specialized
41 --> $DIR/reject-specialized-drops-8142.rs:41:1
43 LL | impl Drop for P<i8> { fn drop(&mut self) { } } // REJECT
44 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 note: use the same sequence of generic type, lifetime and const parameters as the struct definition
47 --> $DIR/reject-specialized-drops-8142.rs:9:1
49 LL | struct P<Tp> { x: *const Tp }
50 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52 error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not
53 --> $DIR/reject-specialized-drops-8142.rs:44:14
55 LL | impl<AddsBnd:Bound> Drop for Q<AddsBnd> { fn drop(&mut self) { } } // REJECT
58 note: the implementor must specify the same requirement
59 --> $DIR/reject-specialized-drops-8142.rs:10:1
61 LL | struct Q<Tq> { x: *const Tq }
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64 error[E0367]: `Drop` impl requires `AddsRBnd: 'rbnd` but the struct it is implemented for does not
65 --> $DIR/reject-specialized-drops-8142.rs:47:21
67 LL | impl<'rbnd,AddsRBnd:'rbnd> Drop for R<AddsRBnd> { fn drop(&mut self) { } } // REJECT
70 note: the implementor must specify the same requirement
71 --> $DIR/reject-specialized-drops-8142.rs:11:1
73 LL | struct R<Tr> { x: *const Tr }
74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76 error[E0366]: `Drop` impls cannot be specialized
77 --> $DIR/reject-specialized-drops-8142.rs:56:1
79 LL | impl<One> Drop for V<One,One> { fn drop(&mut self) { } } // REJECT
80 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82 note: use the same sequence of generic type, lifetime and const parameters as the struct definition
83 --> $DIR/reject-specialized-drops-8142.rs:15:1
85 LL | struct V<Tva, Tvb> { x: *const Tva, y: *const Tvb }
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'lw` due to conflicting requirements
89 --> $DIR/reject-specialized-drops-8142.rs:59:1
91 LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT
92 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94 note: first, the lifetime cannot outlive the lifetime `'l1` as defined here...
95 --> $DIR/reject-specialized-drops-8142.rs:16:10
97 LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 }
99 note: ...but the lifetime must also be valid for the lifetime `'l2` as defined here...
100 --> $DIR/reject-specialized-drops-8142.rs:16:15
102 LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 }
104 note: ...so that the types are compatible
105 --> $DIR/reject-specialized-drops-8142.rs:59:1
107 LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT
108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109 = note: expected `W<'l1, 'l2>`
112 error[E0366]: `Drop` impls cannot be specialized
113 --> $DIR/reject-specialized-drops-8142.rs:62:1
115 LL | impl Drop for X<3> { fn drop(&mut self) { } } // REJECT
116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118 note: use the same sequence of generic type, lifetime and const parameters as the struct definition
119 --> $DIR/reject-specialized-drops-8142.rs:17:1
121 LL | struct X<const Ca: usize>;
122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
124 error[E0366]: `Drop` impls cannot be specialized
125 --> $DIR/reject-specialized-drops-8142.rs:65:1
127 LL | impl<const Ca: usize> Drop for Y<Ca, Ca> { fn drop(&mut self) { } } // REJECT
128 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130 note: use the same sequence of generic type, lifetime and const parameters as the struct definition
131 --> $DIR/reject-specialized-drops-8142.rs:18:1
133 LL | struct Y<const Ca: usize, const Cb: usize>;
134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the enum it is implemented for does not
137 --> $DIR/reject-specialized-drops-8142.rs:68:14
139 LL | impl<AddsBnd:Bound> Drop for Enum<AddsBnd> { fn drop(&mut self) { } } // REJECT
142 note: the implementor must specify the same requirement
143 --> $DIR/reject-specialized-drops-8142.rs:20:1
145 LL | enum Enum<T> { Variant(T) }
146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
148 error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not
149 --> $DIR/reject-specialized-drops-8142.rs:71:14
151 LL | impl<AddsBnd:Bound> Drop for TupleStruct<AddsBnd> { fn drop(&mut self) { } } // REJECT
154 note: the implementor must specify the same requirement
155 --> $DIR/reject-specialized-drops-8142.rs:21:1
157 LL | struct TupleStruct<T>(T);
158 | ^^^^^^^^^^^^^^^^^^^^^^^^^
160 error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the union it is implemented for does not
161 --> $DIR/reject-specialized-drops-8142.rs:74:21
163 LL | impl<AddsBnd:Copy + Bound> Drop for Union<AddsBnd> { fn drop(&mut self) { } } // REJECT
166 note: the implementor must specify the same requirement
167 --> $DIR/reject-specialized-drops-8142.rs:22:1
169 LL | union Union<T: Copy> { f: T }
170 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172 error: aborting due to 13 previous errors
174 Some errors have detailed explanations: E0308, E0366, E0367, E0495.
175 For more information about an error, try `rustc --explain E0308`.