about summary refs log tree commit diff
path: root/compiler/rustc_expand/src
diff options
context:
space:
mode:
authorEllen <supbscripter@gmail.com>2022-04-27 08:51:33 +0100
committerEllen <supbscripter@gmail.com>2022-04-27 08:51:33 +0100
commitf697955c1eb72e3dac6b6aafa411e58cb8d18706 (patch)
tree7c4144db47e778adc08e4bd86109d1b4070ce004 /compiler/rustc_expand/src
parentde1026a67b0a3f5d6b61a1f77093af97d4799376 (diff)
downloadrust-f697955c1eb72e3dac6b6aafa411e58cb8d18706.tar.gz
rust-f697955c1eb72e3dac6b6aafa411e58cb8d18706.zip
tut tut tut
Diffstat (limited to 'compiler/rustc_expand/src')
-rw-r--r--compiler/rustc_expand/src/base.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs
index 3799623563f..ae1b50a4176 100644
--- a/compiler/rustc_expand/src/base.rs
+++ b/compiler/rustc_expand/src/base.rs
@@ -1272,9 +1272,7 @@ pub fn parse_macro_name_and_helper_attrs(
     // Once we've located the `#[proc_macro_derive]` attribute, verify
     // that it's of the form `#[proc_macro_derive(Foo)]` or
     // `#[proc_macro_derive(Foo, attributes(A, ..))]`
-    let Some(list) = attr.meta_item_list() else {
-        return None;
-    };
+    let list = attr.meta_item_list()?;
     if list.len() != 1 && list.len() != 2 {
         diag.span_err(attr.span, "attribute must have either one or two arguments");
         return None;