1
Fork 0

Rollup merge of #133265 - the8472:extract-if-ranges, r=cuviper

Add a range argument to vec.extract_if

tracking issue: #43244

This adds the range argument requested in https://github.com/rust-lang/rust/issues/43244#issuecomment-2486160659
This commit is contained in:
Matthias Krüger 2024-12-17 22:34:40 +01:00 committed by GitHub
commit 938742e687
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 105 additions and 72 deletions

View file

@ -447,7 +447,7 @@ pub fn normalize_param_env_or_error<'tcx>(
// This works fairly well because trait matching does not actually care about param-env
// TypeOutlives predicates - these are normally used by regionck.
let outlives_predicates: Vec<_> = predicates
.extract_if(|predicate| {
.extract_if(.., |predicate| {
matches!(predicate.kind().skip_binder(), ty::ClauseKind::TypeOutlives(..))
})
.collect();