Skip to content

Commit

Permalink
Rollup merge of #77078 - LingMan:patch-2, r=jonas-schievink
Browse files Browse the repository at this point in the history
Don't use an if guard to check equality with a constant

Match on it directly instead
  • Loading branch information
jonas-schievink authored Sep 25, 2020
2 parents 09b0bd6 + c078905 commit 28e0bc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_attr/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ where
.emit();
};
match issue.parse() {
Ok(num) if num == 0 => {
Ok(0) => {
emit_diag(
"`issue` must not be \"0\", \
use \"none\" instead",
Expand Down

0 comments on commit 28e0bc9

Please sign in to comment.