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