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