-
-
Notifications
You must be signed in to change notification settings - Fork 17.6k
Questionable const-checking for Drop with impossible bounds #163149
Copy link
Copy link
Open
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)A-impossible-boundsArea: Issues related to have impossible trait bounds in scope (impossible predicates)Area: Issues related to have impossible trait bounds in scope (impossible predicates)C-bugCategory: This is a bug.Category: This is a bug.I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}Issue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}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.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Milestone
Description
Activity
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, ...)A-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)A-impossible-boundsArea: Issues related to have impossible trait bounds in scope (impossible predicates)Area: Issues related to have impossible trait bounds in scope (impossible predicates)C-bugCategory: This is a bug.Category: This is a bug.I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}Issue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}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.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Code
I tried this code:
This code errors in beta, with the following error:
However, it compiles in nightly without any errors. It's unclear to me whether this is desirable.
Version it worked on
It failed to compile on:
1.99.0-beta.7 (2026-09-19 aa0593682acc35672839)on the playground.Version with regression
It compiles without errors on:
1.100.0-nightly (2026-09-21 1303417c416e1595173d)on the playground.