-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
We're not warning against fn ptr and wide raw ptr nested inside ADTs #116929
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingC-bugCategory: This is a bug.Category: This is a bug.T-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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingC-bugCategory: This is a bug.Category: This is a bug.T-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I found a gap in our match forward-compatibility warnings:
This should warn but doesn't.
The reason is that here we are only checking the top-level type to be a wide raw ptr or fn ptr, we are not recursing.
The fix IMO is to reject those types in
compiler/rustc_trait_selection/src/traits/structural_match.rs, which already recurses the type.Cc @oli-obk @lcnr