-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deny specializing items not in the parent impl #64564
Conversation
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
src/test/ui/specialization/specialization-default-methods-fail.rs
Outdated
Show resolved
Hide resolved
src/test/ui/specialization/specialization-default-methods-fail.rs
Outdated
Show resolved
Hide resolved
src/test/ui/specialization/specialization-default-methods-fail.rs
Outdated
Show resolved
Hide resolved
src/test/ui/specialization/specialization-default-methods-fail.rs
Outdated
Show resolved
Hide resolved
Ah I forgot that we wanted to crater this. @bors try |
Deny specializing items not in the parent impl Part of #29661 (rust-lang/rfcs#2532). At least sort of? This was discussed in #61812 (comment) and is needed for that PR to make progress (fixing an unsoundness). One annoyance with doing this is that it sometimes requires users to copy-paste a provided trait method into an impl just to mark it `default` (ie. there is no syntax to forward this impl method to the provided trait method). cc @Centril and @arielb1
☀️ Try build successful - checks-azure |
@craterbot run mode=check-only |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me once crater run is complete etc
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
SummaryThere are 7 root regressions: There is one seemingly unrelated build failure in moxie. Full Analysispyo3
tao-of-rust paperclip-core:
kompact:
serde_traitobject
mockiato
incrust |
Okay, given that there are only 7 root regressions (meaning that only 7 projects need to be fixed after landing this), and this is an unstable feature anyways, I'm going to go ahead and: @bors r=nikomatsakis |
📌 Commit 47f89e7 has been approved by |
Deny specializing items not in the parent impl Part of #29661 (rust-lang/rfcs#2532). At least sort of? This was discussed in #61812 (comment) and is needed for that PR to make progress (fixing an unsoundness). One annoyance with doing this is that it sometimes requires users to copy-paste a provided trait method into an impl just to mark it `default` (ie. there is no syntax to forward this impl method to the provided trait method). cc @Centril and @arielb1
☀️ Test successful - checks-azure |
Implement RFC 2532 – Associated Type Defaults This is a partial implementation that is still missing the changes to object types, since I ran into some trouble while implementing that. I'm opening this part already to get feedback on the implementation and the unexpected test fallout (see my comments below). The remaining changes can be done in a later PR. Blockers before this can land: * [x] Resolve unsoundness around interaction with specialization (#61812 (comment)) - #64564 cc #29661 Fixes #53907 Fixes #54182 Fixes #62211 Fixes #41868 Fixes #63593 Fixes #47385 Fixes #43924 Fixes #32350 Fixes #26681 Fixes #67187
Part of #29661 (rust-lang/rfcs#2532). At least sort of?
This was discussed in #61812 (comment) and is needed for that PR to make progress (fixing an unsoundness).
One annoyance with doing this is that it sometimes requires users to copy-paste a provided trait method into an impl just to mark it
default
(ie. there is no syntax to forward this impl method to the provided trait method).cc @Centril and @arielb1