Skip to content

Commit

Permalink
Correct nits from @nrc
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Aug 14, 2015
1 parent 401a243 commit 7f8942c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 5 additions & 1 deletion src/librustc/middle/outlives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ pub enum Component<'tcx> {
// the future without breaking backwards compat.
EscapingProjection(Vec<Component<'tcx>>),

// This is a temporary marker indicating "outlives components"
// that are due to the new rules introduced by RFC 1214. For the
// time being, violations of these requirements generally induce
// warnings, not errors.
RFC1214(Vec<Component<'tcx>>),
}

Expand All @@ -64,7 +68,7 @@ pub fn components<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>,
-> Vec<Component<'tcx>> {
let mut components = vec![];
compute_components(infcx, ty0, &mut components);
debug!("outlives({:?}) = {:?}", ty0, components);
debug!("components({:?}) = {:?}", ty0, components);
components
}

Expand Down
6 changes: 3 additions & 3 deletions src/librustc/middle/wf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ pub enum ImpliedBound<'tcx> {
RegionSubProjection(ty::Region, ty::ProjectionTy<'tcx>),
}

/// This routine computes the full set of well-formedness constraints
/// that must hold for the type `ty` to appear in a context with
/// lifetime `outer_region`.
/// Compute the implied bounds that a callee/impl can assume based on
/// the fact that caller/projector has ensured that `ty` is WF. See
/// the `ImpliedBound` type for more details.
pub fn implied_bounds<'a,'tcx>(
infcx: &'a InferCtxt<'a,'tcx>,
body_id: ast::NodeId,
Expand Down
5 changes: 0 additions & 5 deletions src/librustc_typeck/check/regionck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1732,11 +1732,6 @@ fn projection_bound<'a, 'tcx>(rcx: &Rcx<'a, 'tcx>,

// see the extensive comment in projection_must_outlive

// this routine is not invoked in this case
assert!(
!projection_ty.trait_ref.substs.types.iter().any(|t| t.needs_infer()) &&
!projection_ty.trait_ref.substs.regions().iter().any(|r| r.needs_infer()));

let ty = rcx.tcx().mk_projection(projection_ty.trait_ref, projection_ty.item_name);
let recursive_bound = recursive_type_bound(rcx, span, ty);

Expand Down

0 comments on commit 7f8942c

Please sign in to comment.