From ef05533c39a8c2009540366731b7459a770f8a8b Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Tue, 27 Jun 2023 07:40:47 +0000 Subject: Simplify some conditions --- compiler/rustc_expand/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_expand/src') diff --git a/compiler/rustc_expand/src/config.rs b/compiler/rustc_expand/src/config.rs index bcfa5313bde..3e43eae006f 100644 --- a/compiler/rustc_expand/src/config.rs +++ b/compiler/rustc_expand/src/config.rs @@ -445,7 +445,7 @@ impl<'a> StripUnconfigured<'a> { /// If attributes are not allowed on expressions, emit an error for `attr` #[instrument(level = "trace", skip(self))] pub(crate) fn maybe_emit_expr_attr_err(&self, attr: &Attribute) { - if !self.features.map_or(true, |features| features.stmt_expr_attributes) { + if self.features.is_some_and(|features| !features.stmt_expr_attributes) { let mut err = feature_err( &self.sess.parse_sess, sym::stmt_expr_attributes, -- cgit 1.4.1-3-g733a5