diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-12-24 02:55:21 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-12-24 13:35:12 +0100 |
| commit | d12a358673b17ed74fe1a584b4cab66fe62e18d0 (patch) | |
| tree | 4e2431f555f0dd3fa5df51ac629470f8112c01cd /compiler/rustc_builtin_macros/src/proc_macro_harness.rs | |
| parent | c34c015fe2710caf53ba7ae9d1644f9ba65a6f74 (diff) | |
| download | rust-d12a358673b17ed74fe1a584b4cab66fe62e18d0.tar.gz rust-d12a358673b17ed74fe1a584b4cab66fe62e18d0.zip | |
use matches!() macro in more places
Diffstat (limited to 'compiler/rustc_builtin_macros/src/proc_macro_harness.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/proc_macro_harness.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_builtin_macros/src/proc_macro_harness.rs b/compiler/rustc_builtin_macros/src/proc_macro_harness.rs index 4e91436199a..7582d980539 100644 --- a/compiler/rustc_builtin_macros/src/proc_macro_harness.rs +++ b/compiler/rustc_builtin_macros/src/proc_macro_harness.rs @@ -256,10 +256,7 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> { // we're just not interested in this item. // // If we find one, try to locate a `#[proc_macro_derive]` attribute on it. - let is_fn = match item.kind { - ast::ItemKind::Fn(..) => true, - _ => false, - }; + let is_fn = matches!(item.kind, ast::ItemKind::Fn(..)); let mut found_attr: Option<&'a ast::Attribute> = None; |
