-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language teamRelevant to the language team
Milestone
Description
This is a tracking issue for the RFC "dyn Trait Syntax for Trait Objects: Take 2 " (rust-lang/rfcs#2113).
Implementation plan:
- In Rust 2015, accept
dyn Foobut we parsedyn ::Fooasdyn::Foo - We lint against uses of
dynas an identifier- This is a "breakage" lint, so it warns by default in Rust 2015 (and is inapplicable in Rust 2018)
- In Rust 2018, we parse
dynonly as adyn Trait, and hencedyn ::Foo - We have a rustfix-compatible lint that suggests rewriting
Traittodyn Trait; if the pathTraitis absolute (::Trait), then we suggestdyn (::Trait)- This is an "idiom shift" lint, in @Manishearth's terminology from Provide a way to distinguish between "breakage" and "idiom" epoch lints? #48796
- It is opt-in via the use of
#[warn(rust_2018_idioms)](Tracking issue for warning for rust_2018_idioms by default #54910)
- Use
dyn Traitin error messages (usedynsyntax in error messages #49277)
Steps to stabilize:
- Adjust documentation (
dynTrait (RFC 2113) reference#279) (see instructions on forge) - Stabilization PR (see instructions on forge)
Metadata
Metadata
Assignees
Labels
B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language teamRelevant to the language team