diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-12-17 22:34:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-17 22:34:40 +0100 |
| commit | 938742e6878d509aeecc4c6b854384ee732e6a35 (patch) | |
| tree | 16e05b0f3c899619aab47533adbe1cce357d4aa8 /compiler/rustc_middle/src | |
| parent | a4cb3c831823d9baa56c3d90514b75b2660116fa (diff) | |
| parent | 44790c490902d3eb5871a13b80ac4d6c19909278 (diff) | |
| download | rust-938742e6878d509aeecc4c6b854384ee732e6a35.tar.gz rust-938742e6878d509aeecc4c6b854384ee732e6a35.zip | |
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
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/diagnostics.rs b/compiler/rustc_middle/src/ty/diagnostics.rs index 604f1da26c6..406e732744b 100644 --- a/compiler/rustc_middle/src/ty/diagnostics.rs +++ b/compiler/rustc_middle/src/ty/diagnostics.rs @@ -309,7 +309,7 @@ pub fn suggest_constraining_type_params<'a>( let Some(param) = param else { return false }; { - let mut sized_constraints = constraints.extract_if(|(_, def_id, _)| { + let mut sized_constraints = constraints.extract_if(.., |(_, def_id, _)| { def_id.is_some_and(|def_id| tcx.is_lang_item(def_id, LangItem::Sized)) }); if let Some((_, def_id, _)) = sized_constraints.next() { |
