-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macros: diagnostic derive on enums #102189
Conversation
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki |
} | ||
|
||
#[derive(Diagnostic)] | ||
enum ExampleEnum { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only added this test for the enums, in addition to the existing case that needed changed and is a failing test - most of the logic is the same so I don't think it is super necessary to test everything again with enums but I can if we want.
Signed-off-by: David Wood <david.wood@huawei.com>
3f0e59d
to
f20c882
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (de0b511): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
Part of #100717.
Extends
#[derive(Diagnostic)]
to work on enums too where each variant acts like a distinct diagnostic - being able to represent diagnostics this way can be quite a bit simpler for some parts of the compiler.r? @compiler-errors
cc @Xiretza