update thin-vec

This commit is contained in:
malezjaa
2026-04-08 20:57:59 +02:00
parent 6a4eefde2d
commit cf6aa22df5
+1 -4
View File
@@ -10,7 +10,6 @@
use rustc_ast::{self as ast, DUMMY_NODE_ID, Mutability, Pat, PatKind, Pinnedness};
use rustc_ast_pretty::pprust;
use rustc_data_structures::thin_vec::{ThinVec, thin_vec};
use rustc_data_structures::thinvec::ExtractIf;
use rustc_errors::Applicability;
use rustc_lint::{EarlyContext, EarlyLintPass};
use rustc_session::impl_lint_pass;
@@ -422,9 +421,7 @@ fn drain_matching(
let mut tail_or = ThinVec::new();
let mut idx = 0;
// FIXME: once `thin-vec` releases a new version, change this to `alternatives.extract_if()`
// See https://github.com/mozilla/thin-vec/issues/77
for pat in ExtractIf::new(alternatives, |p| {
for pat in alternatives.extract_if(.., |p| {
// Check if we should extract, but only if `idx >= start`.
idx += 1;
idx > start && predicate(&p.kind)