2020-01-24 21:04:17 +01:00
|
|
|
error[E0367]: `Drop` impl requires `'adds_bnd: 'al` but the struct it is implemented for does not
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:24:20
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
LL | impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT
|
|
|
|
| ^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
note: the implementor must specify the same requirement
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:4:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-01-24 21:04:17 +01:00
|
|
|
error[E0367]: `Drop` impl requires `'adds_bnd: 'al` but the struct it is implemented for does not
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:28:67
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
LL | impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT
|
|
|
|
| ^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
note: the implementor must specify the same requirement
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:5:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:34:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
|
|
|
|
|
2019-11-13 14:16:56 -08:00
|
|
|
= note: expected struct `N<'n>`
|
|
|
|
found struct `N<'static>`
|
2021-10-05 12:11:51 +00:00
|
|
|
note: the lifetime `'n` as defined here...
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:7:10
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | struct N<'n> { x: &'n i8 }
|
|
|
|
| ^^
|
|
|
|
= note: ...does not necessarily outlive the static lifetime
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
error[E0366]: `Drop` impls cannot be specialized
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:41:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | impl Drop for P<i8> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:9:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | struct P<Tp> { x: *const Tp }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:44:14
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2018-12-16 22:21:47 -05:00
|
|
|
LL | impl<AddsBnd:Bound> Drop for Q<AddsBnd> { fn drop(&mut self) { } } // REJECT
|
2020-01-02 19:02:06 -05:00
|
|
|
| ^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
note: the implementor must specify the same requirement
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:10:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | struct Q<Tq> { x: *const Tq }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-01-24 21:04:17 +01:00
|
|
|
error[E0367]: `Drop` impl requires `AddsRBnd: 'rbnd` but the struct it is implemented for does not
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:47:21
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2018-12-16 22:21:47 -05:00
|
|
|
LL | impl<'rbnd,AddsRBnd:'rbnd> Drop for R<AddsRBnd> { fn drop(&mut self) { } } // REJECT
|
2020-01-02 19:02:06 -05:00
|
|
|
| ^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
note: the implementor must specify the same requirement
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:11:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | struct R<Tr> { x: *const Tr }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
error[E0366]: `Drop` impls cannot be specialized
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:56:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | impl<One> Drop for V<One,One> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:15:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | struct V<Tva, Tvb> { x: *const Tva, y: *const Tvb }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'lw` due to conflicting requirements
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:59:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-10-05 12:11:51 +00:00
|
|
|
note: first, the lifetime cannot outlive the lifetime `'l1` as defined here...
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:16:10
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 }
|
|
|
|
| ^^^
|
2021-10-05 12:11:51 +00:00
|
|
|
note: ...but the lifetime must also be valid for the lifetime `'l2` as defined here...
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:16:15
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 }
|
|
|
|
| ^^^
|
2019-12-03 22:20:05 -05:00
|
|
|
note: ...so that the types are compatible
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:59:1
|
2019-12-03 22:20:05 -05:00
|
|
|
|
|
|
|
|
LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-12-19 19:44:06 -08:00
|
|
|
= note: expected `W<'l1, 'l2>`
|
|
|
|
found `W<'_, '_>`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-11-12 15:39:21 +01:00
|
|
|
error[E0366]: `Drop` impls cannot be specialized
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:62:1
|
2020-11-12 15:39:21 +01:00
|
|
|
|
|
|
|
|
LL | impl Drop for X<3> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:17:1
|
2020-11-12 15:39:21 +01:00
|
|
|
|
|
|
|
|
LL | struct X<const Ca: usize>;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0366]: `Drop` impls cannot be specialized
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:65:1
|
2020-11-12 15:39:21 +01:00
|
|
|
|
|
|
|
|
LL | impl<const Ca: usize> Drop for Y<Ca, Ca> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:18:1
|
2020-11-12 15:39:21 +01:00
|
|
|
|
|
|
|
|
LL | struct Y<const Ca: usize, const Cb: usize>;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-01-02 19:02:06 -05:00
|
|
|
error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the enum it is implemented for does not
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:68:14
|
2020-01-02 19:02:06 -05:00
|
|
|
|
|
|
|
|
LL | impl<AddsBnd:Bound> Drop for Enum<AddsBnd> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
note: the implementor must specify the same requirement
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:20:1
|
2020-01-02 19:02:06 -05:00
|
|
|
|
|
|
|
|
LL | enum Enum<T> { Variant(T) }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:71:14
|
2020-01-02 19:02:06 -05:00
|
|
|
|
|
|
|
|
LL | impl<AddsBnd:Bound> Drop for TupleStruct<AddsBnd> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
note: the implementor must specify the same requirement
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:21:1
|
2020-01-02 19:02:06 -05:00
|
|
|
|
|
|
|
|
LL | struct TupleStruct<T>(T);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-10-04 22:24:14 +02:00
|
|
|
error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the union it is implemented for does not
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:74:21
|
2020-10-04 22:24:14 +02:00
|
|
|
|
|
|
|
|
LL | impl<AddsBnd:Copy + Bound> Drop for Union<AddsBnd> { fn drop(&mut self) { } } // REJECT
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
note: the implementor must specify the same requirement
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/reject-specialized-drops-8142.rs:22:1
|
2020-10-04 22:24:14 +02:00
|
|
|
|
|
|
|
|
LL | union Union<T: Copy> { f: T }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-11-12 15:39:21 +01:00
|
|
|
error: aborting due to 13 previous errors
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2019-09-12 15:00:44 +02:00
|
|
|
Some errors have detailed explanations: E0308, E0366, E0367, E0495.
|
2018-08-08 14:28:26 +02:00
|
|
|
For more information about an error, try `rustc --explain E0308`.
|