-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Milestone
Description
Doing this would present 2 advantages:
- In the implementation of these diagnostics, we always pass a stringified error code:
Instead of hard-coding these in, we could compute them using the discriminant.slicec/src/diagnostics/errors.rs
Line 268 in fabd9d9
"E002", - Compile-time guarantee there aren't any duplicate error codes.
Right now, it's up to us to make sure we don't pass the same error code for two different enums.
But if we used discriminants, the Rust compiler ensures there's no duplicate values for us.
Reactions are currently unavailable