final assignments of the various region variables if there is some
flexibility.
-- vtable: find and records the impls to use for each trait bound that
- appears on a type parameter.
-
- writeback: writes the final types within a function body, replacing
type variables with their final inferred types. These final types
are written into the `tcx.node_types` table, which should *never* contain
// caught by case 1.
match rty.is_representable(tcx, sp) {
Representability::SelfRecursive(spans) => {
- let mut err = recursive_type_with_infinite_size_error(tcx, item_def_id.to_def_id());
- for span in spans {
- err.span_label(span, "recursive without indirection");
- }
- err.emit();
+ recursive_type_with_infinite_size_error(tcx, item_def_id.to_def_id(), spans);
return false;
}
Representability::Representable | Representability::ContainsRecursive => (),
trait_ref: ty::PolyTraitRef<'tcx>,
expected_vid: ty::TyVid,
) -> bool {
- let self_ty = self.shallow_resolve(trait_ref.self_ty());
+ let self_ty = self.shallow_resolve(trait_ref.skip_binder().self_ty());
debug!(
"self_type_matches_expected_vid(trait_ref={:?}, self_ty={:?}, expected_vid={:?})",
trait_ref, self_ty, expected_vid
debug!("check_closures={}", check_closures);
// More awful hacks: before we check argument types, try to do
- // an "opportunistic" vtable resolution of any trait bounds on
+ // an "opportunistic" trait resolution of any trait bounds on
// the call. This helps coercions.
if check_closures {
self.select_obligations_where_possible(false, |errors| {