-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
~const Drop bounds are broken / wrong / unsound #94803
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.Category: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.Category: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
(playground)
@rustbot label requires-nightly, I-unsound, T-compiler, F-const_trait_impl, A-const-fn
By the way, even if this worked “correctly” (i.e. soundly) I really hate the fact that this feature is using a sort of
T: Dropbound; thedrop_boundswarning exists for a reason, using theDroptrait in bounds is discouraged for a reason, abusing it as in the feature that allows “T: ~const Drop” makes everything just sooo much more confusing and inconsistent.