about summary refs log tree commit diff
path: root/src/librustc/hir
diff options
context:
space:
mode:
authorSeiichi Uchida <seuchida@gmail.com>2018-01-30 14:53:01 +0900
committerflip1995 <uwdkn@student.kit.edu>2018-05-02 11:32:34 +0200
commit9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0 (patch)
treedafe616470a07d22095ed35f0d2f421d309d44d9 /src/librustc/hir
parent759bd01e039452a1a357d347aea51348f9ffc443 (diff)
downloadrust-9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0.tar.gz
rust-9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0.zip
Remove Option from the return type of Attribute::name()
Diffstat (limited to 'src/librustc/hir')
-rw-r--r--src/librustc/hir/check_attr.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/librustc/hir/check_attr.rs b/src/librustc/hir/check_attr.rs
index cad6ff8ae9f..e8bdb9d5d5f 100644
--- a/src/librustc/hir/check_attr.rs
+++ b/src/librustc/hir/check_attr.rs
@@ -153,10 +153,7 @@ impl<'a, 'tcx> CheckAttrVisitor<'a, 'tcx> {
         // ```
         let hints: Vec<_> = item.attrs
             .iter()
-            .filter(|attr| match attr.name() {
-                Some(name) => name == "repr",
-                None => false,
-            })
+            .filter(|attr| attr.name() == "repr")
             .filter_map(|attr| attr.meta_item_list())
             .flat_map(|hints| hints)
             .collect();