Skip to content

Commit

Permalink
Rollup merge of rust-lang#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
ecstatic-morse authored Sep 22, 2020
2 parents 0b141e5 + c078905 commit 3748c26
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 3748c26

Please sign in to comment.