Don't use matches! when == suffices#150405
Conversation
|
Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred to constck cc @fee1-dead Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred to the CTFE machinery |
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
This comment has been minimized.
This comment has been minimized.
In the codebase we sometimes use `matches!` for values that can actually just be compared. Replace them with `==`.
f77875a to
9f566f2
Compare
There was a problem hiding this comment.
Looks good to me, but honestly it's so unusual to read pattern matching with a ==, when I find matches! more familiar
If this is what we are in favour to, because as far as I understand previous discussion ended on that we want to use == instead of matches!, then yeah, let's do it, I guess i will get used to it pretty fast
|
I personally prefer using |
|
r? me @bors r+ rollup |
…uwer Rollup of 2 pull requests Successful merges: - rust-lang/rust#150393 (Document relative and absolute paths handling in `--remap-path-prefix`) - rust-lang/rust#150405 (Don't use `matches!` when `==` suffices) r? `@ghost` `@rustbot` modify labels: rollup
In the codebase we sometimes use
matches!for values that can actually just be compared. Replace them with==.Subset of #149933.