Skip to content

Commit c078905

Browse files
authored
Don't use an if guard to check equality with a constant
Match on it directly instead
1 parent e0bc267 commit c078905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_attr/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ where
301301
.emit();
302302
};
303303
match issue.parse() {
304-
Ok(num) if num == 0 => {
304+
Ok(0) => {
305305
emit_diag(
306306
"`issue` must not be \"0\", \
307307
use \"none\" instead",

0 commit comments

Comments
 (0)