error[E0367]: The requirement `'adds_bnd : 'al` is added only by the Drop impl. --> $DIR/reject-specialized-drops-8142.rs:29:1 | LL | / impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT LL | | //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl. LL | | fn drop(&mut self) { } } | |____________________________^ | note: The same requirement must be part of the struct/enum definition --> $DIR/reject-specialized-drops-8142.rs:15:1 | LL | struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0367]: The requirement `'adds_bnd : 'al` is added only by the Drop impl. --> $DIR/reject-specialized-drops-8142.rs:33:1 | LL | / impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT LL | | //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl. LL | | fn drop(&mut self) { } } | |____________________________^ | note: The same requirement must be part of the struct/enum definition --> $DIR/reject-specialized-drops-8142.rs:16:1 | LL | struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/reject-specialized-drops-8142.rs:39:1 | LL | impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `N<'n>` found type `N<'static>` note: the lifetime 'n as defined on the struct at 18:10... --> $DIR/reject-specialized-drops-8142.rs:18:10 | LL | struct N<'n> { x: &'n i8 } | ^^ = note: ...does not necessarily outlive the static lifetime error[E0366]: Implementations of Drop cannot be specialized --> $DIR/reject-specialized-drops-8142.rs:46:1 | LL | impl Drop for P { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: Use same sequence of generic type and region parameters that is on the struct/enum definition --> $DIR/reject-specialized-drops-8142.rs:20:1 | LL | struct P { x: *const Tp } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0367]: The requirement `Adds_bnd: Bound` is added only by the Drop impl. --> $DIR/reject-specialized-drops-8142.rs:49:1 | LL | impl Drop for Q { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: The same requirement must be part of the struct/enum definition --> $DIR/reject-specialized-drops-8142.rs:21:1 | LL | struct Q { x: *const Tq } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0367]: The requirement `Adds_rbnd : 'rbnd` is added only by the Drop impl. --> $DIR/reject-specialized-drops-8142.rs:52:1 | LL | impl<'rbnd,Adds_rbnd:'rbnd> Drop for R { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: The same requirement must be part of the struct/enum definition --> $DIR/reject-specialized-drops-8142.rs:22:1 | LL | struct R { x: *const Tr } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0366]: Implementations of Drop cannot be specialized --> $DIR/reject-specialized-drops-8142.rs:61:1 | LL | impl Drop for V { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: Use same sequence of generic type and region parameters that is on the struct/enum definition --> $DIR/reject-specialized-drops-8142.rs:26:1 | LL | struct V { x: *const Tva, y: *const Tvb } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'lw` due to conflicting requirements --> $DIR/reject-specialized-drops-8142.rs:64:1 | LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime 'l1 as defined on the struct at 27:10... --> $DIR/reject-specialized-drops-8142.rs:27:10 | LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^ note: ...but the lifetime must also be valid for the lifetime 'l2 as defined on the struct at 27:15... --> $DIR/reject-specialized-drops-8142.rs:27:15 | LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^ = note: ...so that the types are compatible: expected W<'l1, 'l2> found W<'_, '_> error: aborting due to 8 previous errors Some errors occurred: E0308, E0366, E0367, E0495. For more information about an error, try `rustc --explain E0308`.