about summary refs log tree commit diff
path: root/compiler/rustc_expand/src
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-06-27 07:40:47 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-06-27 07:40:47 +0000
commitef05533c39a8c2009540366731b7459a770f8a8b (patch)
tree22b336491f57cff87bf3ab4788cbc5c7bfaad64f /compiler/rustc_expand/src
parent97bf23d26b1ffff46f071aa687945a6cf85a5914 (diff)
downloadrust-ef05533c39a8c2009540366731b7459a770f8a8b.tar.gz
rust-ef05533c39a8c2009540366731b7459a770f8a8b.zip
Simplify some conditions
Diffstat (limited to 'compiler/rustc_expand/src')
-rw-r--r--compiler/rustc_expand/src/config.rs2
1 files changed, 1 insertions, 1 deletions
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,