about summary refs log tree commit diff
path: root/compiler/rustc_expand/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-27 22:10:15 +0200
committerGitHub <noreply@github.com>2023-06-27 22:10:15 +0200
commitd505582ce2ec8f015180175acf41391d17324af8 (patch)
tree1d818614fd024020fbfa3ffbac1e931bf1eb11c8 /compiler/rustc_expand/src
parentdb11b77bdda8669fa260bb862f8773d7af877dbb (diff)
parentef05533c39a8c2009540366731b7459a770f8a8b (diff)
downloadrust-d505582ce2ec8f015180175acf41391d17324af8.tar.gz
rust-d505582ce2ec8f015180175acf41391d17324af8.zip
Rollup merge of #113084 - WaffleLapkin:less_map_or, r=Nilstrieb
Simplify some conditions

r? `@Nilstrieb`

Some things taken out of my `is_none_or` pr.
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,