You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
object-safe traits can have associated types with unchecked bounds #27675
Interesting. I agree that it should be illegal and we should amend WF relations for object types to check that the bindings cover the requirements of the trait -- the RFC was incomplete on this topic.
The example from the first comment (#27675 (comment)) is actually scarier than the original bug description; at least, I usually can think "oh, an ICE, well that might just be something that won't actually ever compile"; but the first comment is showing code that is indeed a case of "wat"!
changed the title [-]object-safe traits can have associated types with Self-containing bounds[/-][+]object-safe traits can have associated types with unchecked bounds[/+]on Jan 21, 2016
Since this has not been demonstrated: We can indeed build a safe, arbitrary transmutation primitive from this, though this will ICE in practice except if used only for the purpose of the second comment, casting away lifetimes.
Activity
arielb1 commentedon Aug 11, 2015
Related:
nikomatsakis commentedon Aug 11, 2015
Interesting. I agree that it should be illegal and we should amend WF relations for object types to check that the bindings cover the requirements of the trait -- the RFC was incomplete on this topic.
pnkfelix commentedon Jan 21, 2016
The example from the first comment (#27675 (comment)) is actually scarier than the original bug description; at least, I usually can think "oh, an ICE, well that might just be something that won't actually ever compile"; but the first comment is showing code that is indeed a case of "wat"!
[-]object-safe traits can have associated types with Self-containing bounds[/-][+]object-safe traits can have associated types with unchecked bounds[/+]pnkfelix commentedon Jul 7, 2016
triage: P-medium
197g commentedon Sep 22, 2020
Since this has not been demonstrated: We can indeed build a safe, arbitrary transmutation primitive from this, though this will ICE in practice except if used only for the purpose of the second comment, casting away lifetimes.
197g commentedon Sep 22, 2020
Uuups, we can make any type
Copy. That's quite severe, wouldn't you say?7 remaining items
camelid commentedon Sep 22, 2020
Decided on
P-highas discussed in the prioritization working group procedure.197g commentedon Sep 22, 2020
For completeness sake. This may be used to send any reference across threads:
Aaron1011 commentedon Sep 23, 2020
I suspect that this will be fixed by #73905
lqd commentedon Sep 24, 2020
The 4 weaponized examples above will indeed be rejected with #73905
Rollup merge of rust-lang#77663 - HeroicKatora:regression-tests-27675…
Aaron1011 commentedon Oct 9, 2020
A regression test was added in #77663.
rust: Update to 1.48.0.
Upgrade rust to version 1.48.0.
Upgrade rust to version 1.48.0.
Upgrade rust to version 1.48.0.
Upgrade rust to version 1.48.0.