Closed
Description
Member constraints
#61775 introduced "member constraints" as part of stabilizing async functions. These extend region inference to accommodate impl Trait
return types that contain multiple unrelated lifetimes (e.g., impl Trait<'a, 'b>
where neither 'a: 'b
nor 'b: 'a
). We decided to introduce a feature gate for other cases until we have time to gain more experience.
Learn more
The working of these constraints is described in the rustc-guide -- as of this writing, however, the PR has not yet landed.
Current status
- Implemented (generalize impl trait to permit multiple lifetime bounds #61775)
- Described in rustc-guide (Region inference member constraints rustc-dev-guide#344)
- Stabilized
Related issues
- Impl trait (Tracking issue for
impl Trait
(RFC 1522, RFC 1951, RFC 2071) #34511) - Uncertain interaction with impl trait in bindings (
impl_trait_in_bindings
and pick-constraint region bounds #61773)
Metadata
Metadata
Assignees
Labels
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: Type inferenceArea: Lifetimes / regions`#[feature(member_constraints)]`Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCRelevant to the language team, which will review and decide on the PR/issue.