diff options
| author | Seiichi Uchida <seuchida@gmail.com> | 2018-01-30 14:53:01 +0900 |
|---|---|---|
| committer | flip1995 <uwdkn@student.kit.edu> | 2018-05-02 11:32:34 +0200 |
| commit | 9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0 (patch) | |
| tree | dafe616470a07d22095ed35f0d2f421d309d44d9 /src/librustc/ich | |
| parent | 759bd01e039452a1a357d347aea51348f9ffc443 (diff) | |
| download | rust-9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0.tar.gz rust-9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0.zip | |
Remove Option from the return type of Attribute::name()
Diffstat (limited to 'src/librustc/ich')
| -rw-r--r-- | src/librustc/ich/impls_syntax.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs index ed7b79b392d..d90dba2ff04 100644 --- a/src/librustc/ich/impls_syntax.rs +++ b/src/librustc/ich/impls_syntax.rs @@ -199,8 +199,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for [ast::Attribute] { let filtered: AccumulateVec<[&ast::Attribute; 8]> = self .iter() .filter(|attr| { - !attr.is_sugared_doc && - attr.name().map(|name| !hcx.is_ignored_attr(name)).unwrap_or(true) + !attr.is_sugared_doc && !hcx.is_ignored_attr(attr.name()) }) .collect(); @@ -227,7 +226,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for ast::Attribute { hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher<W>) { // Make sure that these have been filtered out. - debug_assert!(self.name().map(|name| !hcx.is_ignored_attr(name)).unwrap_or(true)); + debug_assert!(!hcx.is_ignored_attr(self.name())); debug_assert!(!self.is_sugared_doc); let ast::Attribute { |
