Skip to content

Commit c30b136

Browse files
committed
---
yaml --- r: 180147 b: refs/heads/tmp c: d6c158d h: refs/heads/master i: 180145: f20a093 180143: 612ec6d v: v3
1 parent 007fc5f commit c30b136

File tree

2 files changed

+2
-41
lines changed

2 files changed

+2
-41
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: f51176df0182f37b71a0f6397ecde590efe4a757
37+
refs/heads/tmp: d6c158d262e2783018854ac885cb6af0268dab88

branches/tmp/src/librustc_typeck/check/dropck.rs

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -170,43 +170,6 @@ fn iterate_over_potentially_unsafe_regions_in_type<'a, 'tcx>(
170170
result
171171
});
172172

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-
210173
// In `impl<'a> Drop ...`, we automatically assume
211174
// `'a` is meaningful and thus represents a bound
212175
// through which we could reach borrowed data.
@@ -220,15 +183,13 @@ fn iterate_over_potentially_unsafe_regions_in_type<'a, 'tcx>(
220183

221184
has_dtor_of_interest =
222185
has_region_param_of_interest ||
223-
has_type_param_of_interest ||
224186
has_pred_of_interest;
225187

226188
if has_dtor_of_interest {
227189
debug!("typ: {} has interesting dtor, due to \
228-
region params: {} type params: {} or pred: {}",
190+
region params: {} or pred: {}",
229191
typ.repr(rcx.tcx()),
230192
has_region_param_of_interest,
231-
has_type_param_of_interest,
232193
has_pred_of_interest);
233194
} else {
234195
debug!("typ: {} has dtor, but it is uninteresting",

0 commit comments

Comments
 (0)