fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1error[E0367]: The requirement `'adds_bnd : 'al` is added only by the Drop impl. 2 --> $DIR/reject-specialized-drops-8142.rs:19:1 3 | 4LL | / impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT 5LL | | 6LL | | fn drop(&mut self) { } } 7 | |____________________________^ 8 | 9note: The same requirement must be part of the struct/enum definition 10 --> $DIR/reject-specialized-drops-8142.rs:5:1 11 | 12LL | struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } 13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 14 15error[E0367]: The requirement `'adds_bnd : 'al` is added only by the Drop impl. 16 --> $DIR/reject-specialized-drops-8142.rs:23:1 17 | 18LL | / impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT 19LL | | 20LL | | fn drop(&mut self) { } } 21 | |____________________________^ 22 | 23note: The same requirement must be part of the struct/enum definition 24 --> $DIR/reject-specialized-drops-8142.rs:6:1 25 | 26LL | struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } 27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 28 29error[E0308]: mismatched types 30 --> $DIR/reject-specialized-drops-8142.rs:29:1 31 | 32LL | impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT 33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch 34 | 35 = note: expected type `N<'n>` 36 found type `N<'static>` 37note: the lifetime 'n as defined on the struct at 8:10... 38 --> $DIR/reject-specialized-drops-8142.rs:8:10 39 | 40LL | struct N<'n> { x: &'n i8 } 41 | ^^ 42 = note: ...does not necessarily outlive the static lifetime 43 44error[E0366]: Implementations of Drop cannot be specialized 45 --> $DIR/reject-specialized-drops-8142.rs:36:1 46 | 47LL | impl Drop for P<i8> { fn drop(&mut self) { } } // REJECT 48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 49 | 50note: Use same sequence of generic type and region parameters that is on the struct/enum definition 51 --> $DIR/reject-specialized-drops-8142.rs:10:1 52 | 53LL | struct P<Tp> { x: *const Tp } 54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 55 56error[E0367]: The requirement `AddsBnd: Bound` is added only by the Drop impl. 57 --> $DIR/reject-specialized-drops-8142.rs:39:1 58 | 59LL | impl<AddsBnd:Bound> Drop for Q<AddsBnd> { fn drop(&mut self) { } } // REJECT 60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 61 | 62note: The same requirement must be part of the struct/enum definition 63 --> $DIR/reject-specialized-drops-8142.rs:11:1 64 | 65LL | struct Q<Tq> { x: *const Tq } 66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 67 68error[E0367]: The requirement `AddsRBnd : 'rbnd` is added only by the Drop impl. 69 --> $DIR/reject-specialized-drops-8142.rs:42:1 70 | 71LL | impl<'rbnd,AddsRBnd:'rbnd> Drop for R<AddsRBnd> { fn drop(&mut self) { } } // REJECT 72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 73 | 74note: The same requirement must be part of the struct/enum definition 75 --> $DIR/reject-specialized-drops-8142.rs:12:1 76 | 77LL | struct R<Tr> { x: *const Tr } 78 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 79 80error[E0366]: Implementations of Drop cannot be specialized 81 --> $DIR/reject-specialized-drops-8142.rs:51:1 82 | 83LL | impl<One> Drop for V<One,One> { fn drop(&mut self) { } } // REJECT 84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 85 | 86note: Use same sequence of generic type and region parameters that is on the struct/enum definition 87 --> $DIR/reject-specialized-drops-8142.rs:16:1 88 | 89LL | struct V<Tva, Tvb> { x: *const Tva, y: *const Tvb } 90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 91 92error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'lw` due to conflicting requirements 93 --> $DIR/reject-specialized-drops-8142.rs:54:1 94 | 95LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT 96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 97 | 98note: first, the lifetime cannot outlive the lifetime 'l1 as defined on the struct at 17:10... 99 --> $DIR/reject-specialized-drops-8142.rs:17:10 100 | 101LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } 102 | ^^^ 103note: ...but the lifetime must also be valid for the lifetime 'l2 as defined on the struct at 17:15... 104 --> $DIR/reject-specialized-drops-8142.rs:17:15 105 | 106LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } 107 | ^^^ 108 = note: ...so that the types are compatible: 109 expected W<'l1, 'l2> 110 found W<'_, '_> 111 112error: aborting due to 8 previous errors 113 114Some errors have detailed explanations: E0308, E0366, E0367. 115For more information about an error, try `rustc --explain E0308`.