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