You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use non_exhaustive a bunch and #342 made us use it everywhere.
The more we use, the more likely it is that an AST/HIR change may not trigger the needed refactorings on the tool side.
Rustc has a lint, non_exhaustive_omitted_patterns, that is currently unstable (rust-lang/rust#89554). We can still run it in CI by gating it behind --cfg internal_nonexhastive_lint or something. This lint requires all enum variants/fields/etc to be mentioned in a match statement (not if let) even if they're stuck at the bottom with the wildcard.
We can't do this yet since we have a bunch of match statements that already violate this but we should slowly go through and fix the violations by turning them into if lets or adding the variant names to the wildcard arm.
The text was updated successfully, but these errors were encountered:
We use
non_exhaustive
a bunch and #342 made us use it everywhere.The more we use, the more likely it is that an AST/HIR change may not trigger the needed refactorings on the tool side.
Rustc has a lint,
non_exhaustive_omitted_patterns
, that is currently unstable (rust-lang/rust#89554). We can still run it in CI by gating it behind--cfg internal_nonexhastive_lint
or something. This lint requires all enum variants/fields/etc to be mentioned in a match statement (notif let
) even if they're stuck at the bottom with the wildcard.We can't do this yet since we have a bunch of match statements that already violate this but we should slowly go through and fix the violations by turning them into
if let
s or adding the variant names to the wildcard arm.The text was updated successfully, but these errors were encountered: