Correct nits from @nrc
This commit is contained in:
parent
401a243552
commit
7f8942c18d
@ -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>>),
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user