about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorYotam Ofek <yotam.ofek@gmail.com>2025-03-28 12:21:21 +0000
committerYotam Ofek <yotam.ofek@gmail.com>2025-03-28 12:21:21 +0000
commit9ef35ddc0ca236db91d444a31de5fc8ac835ce9b (patch)
tree32bbf5d10c166dd747d79dbe931a223eb24f33e3 /compiler/rustc_span/src
parente77a8f439cc87c5d67b007e9811578533de1de91 (diff)
downloadrust-9ef35ddc0ca236db91d444a31de5fc8ac835ce9b.tar.gz
rust-9ef35ddc0ca236db91d444a31de5fc8ac835ce9b.zip
use `slice::contains` where applicable
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index f19d4d9f362..9e6ba2e1b9c 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -876,7 +876,7 @@ impl Span {
         self.ctxt()
             .outer_expn_data()
             .allow_internal_unstable
-            .is_some_and(|features| features.iter().any(|&f| f == feature))
+            .is_some_and(|features| features.contains(&feature))
     }
 
     /// Checks if this span arises from a compiler desugaring of kind `kind`.