@@ -170,43 +170,6 @@ fn iterate_over_potentially_unsafe_regions_in_type<'a, 'tcx>(
170
170
result
171
171
} ) ;
172
172
173
- let has_type_param_of_interest = dtor_generics. types . iter ( ) . any ( |t| {
174
- let & ty:: ParamBounds {
175
- ref region_bounds, builtin_bounds, ref trait_bounds,
176
- ref projection_bounds,
177
- } = & t. bounds ;
178
-
179
- // Belt-and-suspenders: The current set of builtin
180
- // bounds {Send, Sized, Copy, Sync} do not introduce
181
- // any new capability to access borrowed data hidden
182
- // behind a type parameter.
183
- //
184
- // In case new builtin bounds get added that do not
185
- // satisfy that property, ensure `builtin_bounds \
186
- // {Send,Sized,Copy,Sync}` is empty.
187
-
188
- let mut builtin_bounds = builtin_bounds;
189
- builtin_bounds. remove ( & ty:: BoundSend ) ;
190
- builtin_bounds. remove ( & ty:: BoundSized ) ;
191
- builtin_bounds. remove ( & ty:: BoundCopy ) ;
192
- builtin_bounds. remove ( & ty:: BoundSync ) ;
193
-
194
- let has_bounds =
195
- !region_bounds. is_empty ( ) ||
196
- !builtin_bounds. is_empty ( ) ||
197
- !trait_bounds. is_empty ( ) ||
198
- !projection_bounds. is_empty ( ) ;
199
-
200
- if has_bounds {
201
- debug ! ( "typ: {} has interesting dtor due to \
202
- bounds on param {}",
203
- typ. repr( rcx. tcx( ) ) , t. name) ;
204
- }
205
-
206
- has_bounds
207
-
208
- } ) ;
209
-
210
173
// In `impl<'a> Drop ...`, we automatically assume
211
174
// `'a` is meaningful and thus represents a bound
212
175
// through which we could reach borrowed data.
@@ -220,15 +183,13 @@ fn iterate_over_potentially_unsafe_regions_in_type<'a, 'tcx>(
220
183
221
184
has_dtor_of_interest =
222
185
has_region_param_of_interest ||
223
- has_type_param_of_interest ||
224
186
has_pred_of_interest;
225
187
226
188
if has_dtor_of_interest {
227
189
debug ! ( "typ: {} has interesting dtor, due to \
228
- region params: {} type params: {} or pred: {}",
190
+ region params: {} or pred: {}",
229
191
typ. repr( rcx. tcx( ) ) ,
230
192
has_region_param_of_interest,
231
- has_type_param_of_interest,
232
193
has_pred_of_interest) ;
233
194
} else {
234
195
debug ! ( "typ: {} has dtor, but it is uninteresting" ,
0 commit comments