diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-06-27 07:40:47 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-06-27 07:40:47 +0000 |
| commit | ef05533c39a8c2009540366731b7459a770f8a8b (patch) | |
| tree | 22b336491f57cff87bf3ab4788cbc5c7bfaad64f /compiler/rustc_expand/src | |
| parent | 97bf23d26b1ffff46f071aa687945a6cf85a5914 (diff) | |
| download | rust-ef05533c39a8c2009540366731b7459a770f8a8b.tar.gz rust-ef05533c39a8c2009540366731b7459a770f8a8b.zip | |
Simplify some conditions
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/config.rs | 2 |
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, |
