Description
This is a tracking issue for the lang experiment with new default auto traits, which is part of "MCP: Low level components for async drop" (rust-lang/compiler-team#727 + #120706 (comment))
Default auto traits are gated behind -Zexperimental-default-bounds
.
The experiment was accepted in rust-lang/rust#120706 (comment)
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label. Discussion comments will get marked as off-topic or deleted. Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Implementation
- Support
?Trait
syntax in more contexts (rust-lang/rust#121676) - Support default bounds for new lang item traits (rust-lang/rust#120706)
- Support switching to the new default traits using a edition
- Support switching to the new default traits using an crate-level or module-level attribute (Local Default Bounds to assist
Forget
and other?Trait
. rfcs#3783)
- Support
- Standard library experiments
- Publish results
Unresolved Questions
- due to performance issues, we currently only add the new default traits as super traits if it is required. Ideally this behavior should be consistent
- Default auto traits trigger several compiler bugs:
- Default auto traits cause a huge performance regressions and overflow errors
- Default auto traits are incompatible with non-lifetime binders
- Migration to a new edition