for &ty in fn_sig_tys {
let ty = self.resolve_type(ty);
debug!("relate_free_regions(t={:?})", ty);
- let implied_bounds = ty::wf::implied_bounds(self, body_id, ty, span);
+ let implied_bounds =
+ ty::wf::implied_bounds(self, self.fcx.param_env, body_id, ty, span);
// Record any relations between free regions that we observe into the free-region-map.
self.free_region_map.relate_free_regions_from_implied_bounds(&implied_bounds);
cmt: mc::cmt<'tcx>,
span: Span) {
match cmt.cat {
- Categorization::Rvalue(region, _) => {
+ Categorization::Rvalue(region) => {
match *region {
ty::ReScope(rvalue_scope) => {
let typ = self.resolve_type(cmt.ty);
let arg_ty = self.node_ty(arg.id);
let re_scope = self.tcx.mk_region(ty::ReScope(body_scope));
let arg_cmt = mc.cat_rvalue(
- arg.id, arg.pat.span, re_scope, re_scope, arg_ty);
+ arg.id, arg.pat.span, re_scope, arg_ty);
debug!("arg_ty={:?} arg_cmt={:?} arg={:?}",
arg_ty,
arg_cmt,
declared_bounds, projection_ty);
// see the extensive comment in projection_must_outlive
-
- let ty = self.tcx.mk_projection(projection_ty.trait_ref, projection_ty.item_name);
+ let item_name = projection_ty.item_name(self.tcx);
+ let ty = self.tcx.mk_projection(projection_ty.trait_ref, item_name);
let recursive_bound = self.recursive_type_bound(span, ty);
VerifyBound::AnyRegion(declared_bounds).or(recursive_bound)
{
debug!("projection_bounds(projection_ty={:?})",
projection_ty);
-
+ let item_name = projection_ty.item_name(self.tcx);
let ty = self.tcx.mk_projection(projection_ty.trait_ref.clone(),
- projection_ty.item_name);
+ item_name);
// Say we have a projection `<T as SomeTrait<'a>>::SomeType`. We are interested
// in looking for a trait definition like:
let (outlives, _) =
self.replace_late_bound_regions_with_fresh_var(
span,
- infer::AssocTypeProjection(projection_ty.item_name),
+ infer::AssocTypeProjection(projection_ty.item_name(self.tcx)),
&outlives);
debug!("projection_bounds: outlives={:?} (3)",
// check whether this predicate applies to our current projection
let cause = self.fcx.misc(span);
- match self.eq_types(false, &cause, ty, outlives.0) {
+ match self.at(&cause, self.fcx.param_env).eq(outlives.0, ty) {
Ok(ok) => {
self.register_infer_ok_obligations(ok);
Ok(outlives.1)