diff options
| author | LingMan <LingMan@users.noreply.github.com> | 2020-09-23 00:29:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-23 00:29:56 +0200 |
| commit | c07890543d13b36180dfbc0b6b6632c2c1dfff3f (patch) | |
| tree | 6cbf39a293021f33b1f1c091e41adec1b678f54e | |
| parent | e0bc267512fc0cb49c86978192857e8187017f0b (diff) | |
| download | rust-c07890543d13b36180dfbc0b6b6632c2c1dfff3f.tar.gz rust-c07890543d13b36180dfbc0b6b6632c2c1dfff3f.zip | |
Don't use an if guard to check equality with a constant
Match on it directly instead
| -rw-r--r-- | compiler/rustc_attr/src/builtin.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index 9951c252001..1808eb270ba 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -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", |
