Description
Summary
Please describe your meeting topic here. It doesn't have to be very long, but
it's always good to try and identify a concrete question to be answered or
narrow topic for discussion. Nobody likes a rambly meeting.
There are several options around what the defining scope of a TAIT is allowed to be and whether to require an explicit #[defines]
or #[defined_by]
attribute. From a recent discussion in the lang team meeting (linked below), the primary tradeoffs involved are:
- Explicitness
- Ease of use
- How it affects IDE performance (resolving auto traits)
- How it affects compiler complexity (resolving cycles wrt to auto traits)
We have several possible paths forward with various amounts of conservatism involved for a "TAIT MVP". The decision takes place along two axes:
- Where defining uses are allowed. More allowable defining uses means supporting more use cases. Some options:
- Restrict to "obvious" cases where the TAIT appears in the type signature in return position
- Restrict to cases where TAIT appears anywhere in the type signature
- Allow defining uses anywhere in the parent item/module
- Whether to require an explicit attribute.
- Always require an attribute
- Require an attribute on the "non-obvious" cases
- Do not require an attribute
Some of these options are forward-compatible with others from a lang perspective (some through an edition), but it is possible they would require considerable complexity or performance pessimization to continue supporting in the compiler and IDE tooling.
Background reading
Include any links to material that folks ought to try to read before-hand.
There probably needs to be a doc summarizing the discussion so far, but I don't know who is prepared to write that doc.
- TAIT defining scope options rust#107645
- Lang team discussion: https://hackmd.io/Yg28CAXiRzCZkNW_v9ivKw?view#%E2%80%9CTracking-issue-for-RFC-2515-%E2%80%9CPermit-impl-Trait-in-type-aliases%E2%80%9D%E2%80%9D-rust63063
About this issue
This issue corresponds to a lang-team design meeting proposal. It corresponds to a possible topic of discussion that may be scheduled for deeper discussion during one of our design meetings.
Metadata
Metadata
Assignees
Type
Projects
Status