}
}
- // Now take member constraints into account.
+ // Now take member constraints into account.
let member_constraints = self.member_constraints.clone();
for m_c_i in member_constraints.indices(scc_a) {
self.apply_member_constraint(
let choice_regions = member_constraints.choice_regions(m_c_i);
debug!("check_member_constraint: choice_regions={:?}", choice_regions);
- // did the pick-region wind up equal to any of the option regions?
+ // Did the member region wind up equal to any of the option regions?
if let Some(o) = choice_regions.iter().find(|&&o_r| {
self.eval_equal(o_r, m_c.member_region_vid)
}) {
continue;
}
- // if not, report an error
+ // If not, report an error.
let region_scope_tree = &infcx.tcx.region_scope_tree(mir_def_id);
let member_region = infcx.tcx.mk_region(ty::ReVar(member_region_vid));
opaque_types::unexpected_hidden_region_diagnostic(
let closure_constraints = QueryRegionConstraints {
outlives: closure_region_requirements.apply_requirements(tcx, def_id, substs),
- // Presently, closures never propagate pick
+ // Presently, closures never propagate member
// constraints to their parents -- they are enforced
- // locally. This is largely a non-issue as pick
+ // locally. This is largely a non-issue as member
// constraints only come from `-> impl Trait` and
// friends which don't appear (thus far...) in
// closures.
// Allows explicit discriminants on non-unit enum variants.
(active, arbitrary_enum_discriminant, "1.37.0", Some(60553), None),
- // Allows impl trait with multiple unrelated lifetimes
+ // Allows `impl Trait` with multiple unrelated lifetimes.
(active, member_constraints, "1.37.0", Some(61977), None),
// -------------------------------------------------------------------------
impl<T> Trait<'_, '_> for T { }
// Here we wind up selecting `'a` and `'b` in the hidden type because
-// those are the types that appear inth e original values.
+// those are the types that appear in the original values.
existential type Foo<'a, 'b>: Trait<'a, 'b>;
impl<T> Trait<'_, '_> for T { }
// Here we wind up selecting `'a` and `'b` in the hidden type because
-// those are the types that appear inth e original values.
+// those are the types that appear in the original values.
fn upper_bounds<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
// In this simple case, you have a hidden type `(&'0 u8, &'1 u8)` and constraints like