-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Not using anon consts for uses of const parameters caused us to accept more code for free type aliases #149774
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-types-nominatedNominated for discussion during a types team meeting.Nominated for discussion during a types team meeting.P-highHigh priorityHigh priorityT-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.T-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-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-types-nominatedNominated for discussion during a types team meeting.Nominated for discussion during a types team meeting.P-highHigh priorityHigh priorityT-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.T-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-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This previously didn't compile but started to in 1.83, not sure which PR but probably something like #129137.
This is because the RHS of free type aliases are not well formed checked. Previously we caught this anyway by implicitly having an anon const with type
usizethat wrapped the usage ofBwhich caused a separate type checker error when type checking the anon const.Nowadays we just directly represent it without an anon const and rely on
WellFormed([u8; B])checking thatBis of typeusize. It might be possible to generate the list of wf predicates for the RHS of free type aliases and then only prove theConstArgHasTypeclauses to fix this?cc @rust-lang/types