Skip to content

Commit e0712c8

Browse files
nikomatsakisAlexander Regueiro
authored and
Alexander Regueiro
committed
useful debug
1 parent 63a67a0 commit e0712c8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/librustc_typeck/astconv.rs

+14
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,17 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
14961496
{
14971497
let tcx = self.tcx();
14981498

1499+
debug!(
1500+
"find_bound_for_assoc_item(ty_param_def_id={:?}, assoc_name={:?}, span={:?})",
1501+
ty_param_def_id,
1502+
assoc_name,
1503+
span,
1504+
);
1505+
14991506
let predicates = &self.get_type_parameter_bounds(span, ty_param_def_id).predicates;
1507+
1508+
debug!("find_bound_for_assoc_item: predicates={:#?}", predicates);
1509+
15001510
let bounds = predicates.iter().filter_map(|(p, _)| p.to_opt_poly_trait_ref());
15011511

15021512
// Check that there is exactly one way to find an associated type with the
@@ -1535,7 +1545,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
15351545
}
15361546
};
15371547

1548+
debug!("one_bound_for_assoc_type: bound = {:?}", bound);
1549+
15381550
if let Some(bound2) = bounds.next() {
1551+
debug!("one_bound_for_assoc_type: bound2 = {:?}", bound2);
1552+
15391553
let bounds = iter::once(bound).chain(iter::once(bound2)).chain(bounds);
15401554
let mut err = struct_span_err!(
15411555
self.tcx().sess, span, E0221,

0 commit comments

Comments
 (0)