Repository navigation
Open
Labels
A-trait-systemArea: Trait systemArea: Trait systemB-RFC-implementedBlocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Approved by a merged RFC and implemented but not stabilized.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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 RFCF-marker_trait_attr`#![feature(marker_trait_attr)]``#![feature(marker_trait_attr)]`S-tracking-blockedStatus: This tracking issue is blocked on another tracking issueStatus: This tracking issue is blocked on another tracking issueS-tracking-needs-to-bakeStatus: The implementation is "complete" but it needs time to bake.Status: The implementation is "complete" but it needs time to bake.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
Tracking issue for rust-lang/rfcs#1268.
Status
- Initial implementation: Implement RFC 1268 "Allow overlapping implementations for marker traits" #41309
- Documentation
- Move to stabilize
- Stabilization PR
Known bugs
- cross-crate support lacking?
- broken interaction between marker traits, lifetimes, and caching #102360
History
- initial implementation Implement RFC 1268 "Allow overlapping implementations for marker traits" #41309
- Support an explicit annotation for marker traits #53693
Prior to stabilization
- Is it ok that adding items to a previously empty trait is a breaking change? Should we make declaring something a marker trait more explicit somehow? --> resolved by adding explicit
#[marker]annotation, see Support an explicit annotation for marker traits #53693
Other notes
In #96766 we decided NOT to disable the orphan check for marker traits as part of this work (just the overlap check), which was a proposed extension.
Reacted by Lokathor, Tim McLean, Sam, Flix, Sludge, Arvid Norlander, Vitalii Kryvenko, Ronno Das and Mingwei Samuel
Reacted by Vadim Petrochenkov
Reacted by Stanislav Tkach, Tim McLean, Martin Habovštiak, Brooks Rady and Vitalii Kryvenko
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemB-RFC-implementedBlocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Approved by a merged RFC and implemented but not stabilized.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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 RFCF-marker_trait_attr`#![feature(marker_trait_attr)]``#![feature(marker_trait_attr)]`S-tracking-blockedStatus: This tracking issue is blocked on another tracking issueStatus: This tracking issue is blocked on another tracking issueS-tracking-needs-to-bakeStatus: The implementation is "complete" but it needs time to bake.Status: The implementation is "complete" but it needs time to bake.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Activity
nikomatsakis commentedon Nov 18, 2015
With respect to the second question of whether we should make a more explicit notion of marker trait, I have been pondering this since the RFC discussion. On the one hand, there are a number of places in Rust today where going from nothing to something is a breaking change: adding a private field to a struct, for example.
The difference here I think is that:
However, the second point depends a lot on the fate of specialization. If we wind up adopting specialization, and in particular a model that does not require strict subsets, then it would still be possible to adapt existing impls. This makes me a lot less worried. Of course, implementing that form of specialization is tricky, but not (I don't think...) that much trickier than implementing THIS suggestion. The hard part in both cases is the potential for overlap.
Add the ability to work with boxed expressions
Add basic support for additional expressions in from clause
sgrif commentedon Nov 15, 2016
@nrc This has the RFC implemented label, but I don't think it has been. If it has, is there a feature gate that I'm missing? If it hasn't been implemented, is there anything I can do to help push this along? It's now been a year since the RFC was accepted.
nikomatsakis commentedon Nov 15, 2016
@sgrif swapped labels
Add a function for SQL `EXISTS` expressions.
Add a function for SQL `EXISTS` expressions.
78 remaining items
nikomatsakis commentedon Dec 26, 2024
I'm nominating this to @rust-lang/lang and @rust-lang/types ---
I'd like to get a temperature check on this feature. Quick summary is that it lets you put
#[marker]on a trait and then permit overlap.From lang, I'm curious as to whether folks still think this is desirable. (I do, though I'm potentially open to bike-shedding on the details -- but this precise scenario comes up all the time.)
From types, I'm curious as to whether folks are aware of impl problems, how this fits with the new solver, etc. Seems like a great candidate to target with a-mir-formality and spec work for testing out a new process.
@rustbot labels +I-lang-nominated +I-types-nominated
scottmcm commentedon Jan 8, 2025
I think it goes particularly well with rust-lang/rfcs#3678, since then
#[marker]traits could have methods so long as they'refinal fn.That would allow, for example,
traviscross commentedon Jan 8, 2025
@rustbot labels -I-lang-nominated
We talked about this during our lang day in December, and we touched on it briefly again today. We're feeling favorably toward allowing overlap on marker traits that are explicitly designated, and are looking forward to seeing concrete next steps on this nominated for us.
BoxyUwU commentedon Jan 8, 2025
This was discussed a bit in the T-types/nominated zulip stream. A proper implementation of this feature needs OR region constraints and is blocked on -Znext-solver everywhere
Rollup merge of rust-lang#160705 - WaffleLapkin:unreserve_Fromᐸǃᐳ, r=…
Rollup merge of rust-lang#160705 - WaffleLapkin:unreserve_Fromᐸǃᐳ, r=…
Rollup merge of rust-lang#160705 - WaffleLapkin:unreserve_Fromᐸǃᐳ, r=…
Unrolled build for #160705 in rollup 161672
Rollup merge of #160705 - WaffleLapkin:unreserve_Fromᐸǃᐳ, r=JonathanB…