Auto merge of #154700 - wesleywiser:revert_151771, r=jieyouxu
Revert "Fix: On wasm targets, call panic_in_cleanup if panic occurs in cleanup #151771"
Clean revert of rust-lang/rust#151771 as discussed in the [compiler team triage meeting](https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202026-03-26/near/581957759) and https://github.com/rust-lang/rust/issues/153948#issuecomment-4137655589
Fixes (after backport): rust-lang/rust#153948
diff --git a/Cargo.lock b/Cargo.lock
index 02da343..0d54197 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1296,9 +1296,9 @@
[[package]]
name = "ena"
-version = "0.14.4"
+version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eabffdaee24bd1bf95c5ef7cec31260444317e72ea56c4c91750e8b7ee58d5f1"
+checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5"
dependencies = [
"log",
]
diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml
index 0332ff6..f358fff 100644
--- a/compiler/rustc_data_structures/Cargo.toml
+++ b/compiler/rustc_data_structures/Cargo.toml
@@ -9,7 +9,7 @@
bitflags = "2.4.1"
either = "1.0"
elsa = "1.11.0"
-ena = "0.14.4"
+ena = "0.14.3"
indexmap = "2.12.1"
jobserver_crate = { version = "0.1.28", package = "jobserver" }
measureme = "12.0.1"
diff --git a/compiler/rustc_hir_typeck/src/expr.rs b/compiler/rustc_hir_typeck/src/expr.rs
index 8723285..184c0d5 100644
--- a/compiler/rustc_hir_typeck/src/expr.rs
+++ b/compiler/rustc_hir_typeck/src/expr.rs
@@ -1871,7 +1871,7 @@ fn check_expr_struct_fields(
if !ocx.try_evaluate_obligations().is_empty() {
return Err(TypeError::Mismatch);
}
- Ok(adt_ty)
+ Ok(self.resolve_vars_if_possible(adt_ty))
})
.ok()
});
diff --git a/compiler/rustc_hir_typeck/src/fallback.rs b/compiler/rustc_hir_typeck/src/fallback.rs
index f7ecfb6..5aadf37 100644
--- a/compiler/rustc_hir_typeck/src/fallback.rs
+++ b/compiler/rustc_hir_typeck/src/fallback.rs
@@ -357,6 +357,11 @@ fn create_coercion_graph(&self) -> VecGraph<ty::TyVid, true> {
VecGraph::new(num_ty_vars, coercion_edges)
}
+ /// If `ty` is an unresolved type variable, returns its root vid.
+ fn root_vid(&self, ty: Ty<'tcx>) -> Option<ty::TyVid> {
+ Some(self.root_var(self.shallow_resolve(ty).ty_vid()?))
+ }
+
/// Given a set of diverging vids and coercions, walk the HIR to gather a
/// set of suggestions which can be applied to preserve fallback to unit.
fn try_to_suggest_annotations(
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
index 0471fd9..f53259e 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
@@ -276,7 +276,12 @@ pub(in super::super) fn check_argument_types(
// Record all the argument types, with the args
// produced from the above subtyping unification.
- Ok(Some(formal_input_tys.to_vec()))
+ Ok(Some(
+ formal_input_tys
+ .iter()
+ .map(|&ty| self.resolve_vars_if_possible(ty))
+ .collect(),
+ ))
})
.ok()
})
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs
index 10e7b1e..e15b255 100644
--- a/compiler/rustc_infer/src/infer/mod.rs
+++ b/compiler/rustc_infer/src/infer/mod.rs
@@ -1099,45 +1099,22 @@ pub fn shallow_resolve(&self, ty: Ty<'tcx>) -> Ty<'tcx> {
//
// Note: if these two lines are combined into one we get
// dynamic borrow errors on `self.inner`.
- let (root_vid, value) =
- self.inner.borrow_mut().type_variables().probe_with_root_vid(v);
- value.known().map_or_else(
- || if root_vid == v { ty } else { Ty::new_var(self.tcx, root_vid) },
- |t| self.shallow_resolve(t),
- )
+ let known = self.inner.borrow_mut().type_variables().probe(v).known();
+ known.map_or(ty, |t| self.shallow_resolve(t))
}
ty::IntVar(v) => {
- let (root, value) =
- self.inner.borrow_mut().int_unification_table().inlined_probe_key_value(v);
- match value {
+ match self.inner.borrow_mut().int_unification_table().probe_value(v) {
ty::IntVarValue::IntType(ty) => Ty::new_int(self.tcx, ty),
ty::IntVarValue::UintType(ty) => Ty::new_uint(self.tcx, ty),
- ty::IntVarValue::Unknown => {
- if root == v {
- ty
- } else {
- Ty::new_int_var(self.tcx, root)
- }
- }
+ ty::IntVarValue::Unknown => ty,
}
}
ty::FloatVar(v) => {
- let (root, value) = self
- .inner
- .borrow_mut()
- .float_unification_table()
- .inlined_probe_key_value(v);
- match value {
+ match self.inner.borrow_mut().float_unification_table().probe_value(v) {
ty::FloatVarValue::Known(ty) => Ty::new_float(self.tcx, ty),
- ty::FloatVarValue::Unknown => {
- if root == v {
- ty
- } else {
- Ty::new_float_var(self.tcx, root)
- }
- }
+ ty::FloatVarValue::Unknown => ty,
}
}
@@ -1151,16 +1128,13 @@ pub fn shallow_resolve(&self, ty: Ty<'tcx>) -> Ty<'tcx> {
pub fn shallow_resolve_const(&self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {
match ct.kind() {
ty::ConstKind::Infer(infer_ct) => match infer_ct {
- InferConst::Var(vid) => {
- let (root, value) = self
- .inner
- .borrow_mut()
- .const_unification_table()
- .inlined_probe_key_value(vid);
- value.known().unwrap_or_else(|| {
- if root.vid == vid { ct } else { ty::Const::new_var(self.tcx, root.vid) }
- })
- }
+ InferConst::Var(vid) => self
+ .inner
+ .borrow_mut()
+ .const_unification_table()
+ .probe_value(vid)
+ .known()
+ .unwrap_or(ct),
InferConst::Fresh(_) => ct,
},
ty::ConstKind::Param(_)
@@ -1184,13 +1158,6 @@ pub fn root_var(&self, var: ty::TyVid) -> ty::TyVid {
self.inner.borrow_mut().type_variables().root_var(var)
}
- /// If `ty` is an unresolved type variable, returns its root vid.
- pub fn root_vid(&self, ty: Ty<'tcx>) -> Option<ty::TyVid> {
- let (root, value) =
- self.inner.borrow_mut().type_variables().inlined_probe_with_vid(ty.ty_vid()?);
- value.is_unknown().then_some(root)
- }
-
pub fn sub_unify_ty_vids_raw(&self, a: ty::TyVid, b: ty::TyVid) {
self.inner.borrow_mut().type_variables().sub_unify(a, b);
}
@@ -1250,36 +1217,6 @@ pub fn resolve_vars_if_possible<T>(&self, value: T) -> T
value.fold_with(&mut r)
}
- /// Normally, we shallow-resolve unresolved type variables to their root
- /// variables. This is mainly done for performance reasons, and in most
- /// cases resolving to the root variable (instead of the variable itself)
- /// does not affect type inference.
- ///
- /// However, there is an exceptional case: *fudging*. Fudging is intended
- /// to guide inference rather than impose hard requirements. But our current
- /// handling here is somewhat janky.
- ///
- /// In particular, inference variables that are considered equal within the
- /// fudging scope may not remain equal outside of it. This makes it observable
- /// which inference variable we resolve to. For backwards compatibility, we
- /// avoid resolving to the root variable by using this function inside the
- /// fudge instead of [`InferCtxt::resolve_vars_if_possible`].
- ///
- /// See #153869 for more details.
- pub fn resolve_vars_if_possible_for_fudging<T>(&self, value: T) -> T
- where
- T: TypeFoldable<TyCtxt<'tcx>>,
- {
- if let Err(guar) = value.error_reported() {
- self.set_tainted_by_errors(guar);
- }
- if !value.has_non_region_infer() {
- return value;
- }
- let mut r = resolve::OpportunisticVarResolver::new_for_fudging(self);
- value.fold_with(&mut r)
- }
-
pub fn resolve_numeric_literals_with_default<T>(&self, value: T) -> T
where
T: TypeFoldable<TyCtxt<'tcx>>,
diff --git a/compiler/rustc_infer/src/infer/resolve.rs b/compiler/rustc_infer/src/infer/resolve.rs
index 917d7b6..13df23a 100644
--- a/compiler/rustc_infer/src/infer/resolve.rs
+++ b/compiler/rustc_infer/src/infer/resolve.rs
@@ -17,9 +17,6 @@
/// points for correctness.
pub struct OpportunisticVarResolver<'a, 'tcx> {
infcx: &'a InferCtxt<'tcx>,
- /// If true, we don't resolve ty/const vars to their roots.
- /// See comments on [`InferCtxt::resolve_vars_if_possible_for_fudging`]
- for_fudging: bool,
/// We're able to use a cache here as the folder does
/// not have any mutable state.
cache: DelayedMap<Ty<'tcx>, Ty<'tcx>>,
@@ -28,12 +25,7 @@ pub struct OpportunisticVarResolver<'a, 'tcx> {
impl<'a, 'tcx> OpportunisticVarResolver<'a, 'tcx> {
#[inline]
pub fn new(infcx: &'a InferCtxt<'tcx>) -> Self {
- OpportunisticVarResolver { infcx, for_fudging: false, cache: Default::default() }
- }
-
- #[inline]
- pub fn new_for_fudging(infcx: &'a InferCtxt<'tcx>) -> Self {
- OpportunisticVarResolver { infcx, for_fudging: true, cache: Default::default() }
+ OpportunisticVarResolver { infcx, cache: Default::default() }
}
}
@@ -51,7 +43,6 @@ fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> {
} else {
let shallow = self.infcx.shallow_resolve(t);
let res = shallow.super_fold_with(self);
- let res = if self.for_fudging && res.is_ty_var() { t } else { res };
assert!(self.cache.insert(t, res));
res
}
@@ -61,11 +52,8 @@ fn fold_const(&mut self, ct: Const<'tcx>) -> Const<'tcx> {
if !ct.has_non_region_infer() {
ct // micro-optimize -- if there is nothing in this const that this fold affects...
} else {
- let res = self.infcx.shallow_resolve_const(ct);
- if self.for_fudging && res.is_ct_infer() {
- return ct;
- };
- res.super_fold_with(self)
+ let ct = self.infcx.shallow_resolve_const(ct);
+ ct.super_fold_with(self)
}
}
diff --git a/compiler/rustc_infer/src/infer/snapshot/fudge.rs b/compiler/rustc_infer/src/infer/snapshot/fudge.rs
index 56cae2c..6709c82 100644
--- a/compiler/rustc_infer/src/infer/snapshot/fudge.rs
+++ b/compiler/rustc_infer/src/infer/snapshot/fudge.rs
@@ -101,7 +101,7 @@ pub fn fudge_inference_if_ok<T, E, F>(&self, f: F) -> Result<T, E>
// going to be popped, so we will have to
// eliminate any references to them.
let snapshot_vars = SnapshotVarData::new(self, variable_lengths);
- Ok((snapshot_vars, self.resolve_vars_if_possible_for_fudging(value)))
+ Ok((snapshot_vars, self.resolve_vars_if_possible(value)))
})?;
// At this point, we need to replace any of the now-popped
diff --git a/compiler/rustc_infer/src/infer/type_variable.rs b/compiler/rustc_infer/src/infer/type_variable.rs
index 9b928cc..65f77fe 100644
--- a/compiler/rustc_infer/src/infer/type_variable.rs
+++ b/compiler/rustc_infer/src/infer/type_variable.rs
@@ -258,25 +258,6 @@ pub(crate) fn inlined_probe(&mut self, vid: ty::TyVid) -> TypeVariableValue<'tcx
self.eq_relations().inlined_probe_value(vid)
}
- /// Retrieves the type to which `vid` has been instantiated, if
- /// any, along with the root `vid`.
- pub(crate) fn probe_with_root_vid(
- &mut self,
- vid: ty::TyVid,
- ) -> (ty::TyVid, TypeVariableValue<'tcx>) {
- self.inlined_probe_with_vid(vid)
- }
-
- /// An always-inlined variant of `probe_with_root_vid`, for very hot call sites.
- #[inline(always)]
- pub(crate) fn inlined_probe_with_vid(
- &mut self,
- vid: ty::TyVid,
- ) -> (ty::TyVid, TypeVariableValue<'tcx>) {
- let (id, value) = self.eq_relations().inlined_probe_key_value(vid);
- (id.vid, value)
- }
-
#[inline]
fn eq_relations(&mut self) -> super::UnificationTable<'_, 'tcx, TyVidEqKey<'tcx>> {
self.storage.eq_relations.with_log(self.undo_log)
diff --git a/compiler/rustc_middle/src/query/on_disk_cache.rs b/compiler/rustc_middle/src/query/on_disk_cache.rs
index b6fd306..4dbceba 100644
--- a/compiler/rustc_middle/src/query/on_disk_cache.rs
+++ b/compiler/rustc_middle/src/query/on_disk_cache.rs
@@ -231,7 +231,7 @@ pub fn serialize(tcx: TyCtxt<'_>, encoder: FileEncoder) -> FileEncodeResult {
type_shorthands: Default::default(),
predicate_shorthands: Default::default(),
interpret_allocs: Default::default(),
- source_map: CachingSourceMapView::new(tcx.sess.source_map()),
+ caching_source_map_view: CachingSourceMapView::new(tcx.sess.source_map()),
file_to_file_index,
hygiene_context: &hygiene_encode_context,
symbol_index_table: Default::default(),
@@ -783,7 +783,7 @@ pub struct CacheEncoder<'a, 'tcx> {
type_shorthands: FxHashMap<Ty<'tcx>, usize>,
predicate_shorthands: FxHashMap<ty::PredicateKind<'tcx>, usize>,
interpret_allocs: FxIndexSet<interpret::AllocId>,
- source_map: CachingSourceMapView<'tcx>,
+ caching_source_map_view: CachingSourceMapView<'tcx>,
file_to_file_index: FxHashMap<*const SourceFile, SourceFileIndex>,
hygiene_context: &'a HygieneEncodeContext,
// Used for both `Symbol`s and `ByteSymbol`s.
@@ -900,7 +900,7 @@ fn encode_span(&mut self, span: Span) {
}
let Some((file_lo, line_lo, col_lo)) =
- self.source_map.byte_pos_to_line_and_col(span_data.lo)
+ self.caching_source_map_view.byte_pos_to_line_and_col(span_data.lo)
else {
return TAG_PARTIAL_SPAN.encode(self);
};
diff --git a/compiler/rustc_span/src/caching_source_map_view.rs b/compiler/rustc_span/src/caching_source_map_view.rs
index 11507a3..d9aa73c 100644
--- a/compiler/rustc_span/src/caching_source_map_view.rs
+++ b/compiler/rustc_span/src/caching_source_map_view.rs
@@ -4,10 +4,15 @@
use crate::source_map::SourceMap;
use crate::{BytePos, Pos, RelativeBytePos, SourceFile, SpanData};
+/// A `SourceMap` wrapper that caches info about a single recent code position. This gives a good
+/// speedup when hashing spans, because often multiple spans within a single line are hashed in
+/// succession, and this avoids expensive `SourceMap` lookups each time the cache is hit. We used
+/// to cache multiple code positions, but caching a single position ended up being simpler and
+/// faster.
#[derive(Clone)]
-struct CacheEntry {
- time_stamp: usize,
- line_number: usize,
+pub struct CachingSourceMapView<'sm> {
+ source_map: &'sm SourceMap,
+ file: Arc<SourceFile>,
// The line's byte position range in the `SourceMap`. This range will fail to contain a valid
// position in certain edge cases. Spans often start/end one past something, and when that
// something is the last character of a file (this can happen when a file doesn't end in a
@@ -20,261 +25,134 @@ struct CacheEntry {
// entry contains a position, the only ramification of the above is that we will get cache
// misses for these rare positions. A line lookup for the position via `SourceMap::lookup_line`
// after a cache miss will produce the last line number, as desired.
- line: Range<BytePos>,
- file: Arc<SourceFile>,
- file_index: usize,
-}
-
-impl CacheEntry {
- #[inline]
- fn update(
- &mut self,
- new_file_and_idx: Option<(Arc<SourceFile>, usize)>,
- pos: BytePos,
- time_stamp: usize,
- ) {
- if let Some((file, file_idx)) = new_file_and_idx {
- self.file = file;
- self.file_index = file_idx;
- }
-
- let pos = self.file.relative_position(pos);
- let line_index = self.file.lookup_line(pos).unwrap();
- let line_bounds = self.file.line_bounds(line_index);
- self.line_number = line_index + 1;
- self.line = line_bounds;
- self.touch(time_stamp);
- }
-
- #[inline]
- fn touch(&mut self, time_stamp: usize) {
- self.time_stamp = time_stamp;
- }
-}
-
-#[derive(Clone)]
-pub struct CachingSourceMapView<'sm> {
- source_map: &'sm SourceMap,
- line_cache: [CacheEntry; 3],
- time_stamp: usize,
+ line_bounds: Range<BytePos>,
+ line_number: usize,
}
impl<'sm> CachingSourceMapView<'sm> {
pub fn new(source_map: &'sm SourceMap) -> CachingSourceMapView<'sm> {
let files = source_map.files();
let first_file = Arc::clone(&files[0]);
- let entry = CacheEntry {
- time_stamp: 0,
- line_number: 0,
- line: BytePos(0)..BytePos(0),
- file: first_file,
- file_index: 0,
- };
-
CachingSourceMapView {
source_map,
- line_cache: [entry.clone(), entry.clone(), entry],
- time_stamp: 0,
+ file: first_file,
+ line_bounds: BytePos(0)..BytePos(0),
+ line_number: 0,
}
}
+ #[inline]
+ fn pos_to_line(&self, pos: BytePos) -> (Range<BytePos>, usize) {
+ let pos = self.file.relative_position(pos);
+ let line_index = self.file.lookup_line(pos).unwrap();
+ let line_bounds = self.file.line_bounds(line_index);
+ let line_number = line_index + 1;
+ (line_bounds, line_number)
+ }
+
+ #[inline]
+ fn update(&mut self, new_file: Option<Arc<SourceFile>>, pos: BytePos) {
+ if let Some(file) = new_file {
+ self.file = file;
+ }
+ (self.line_bounds, self.line_number) = self.pos_to_line(pos);
+ }
+
pub fn byte_pos_to_line_and_col(
&mut self,
pos: BytePos,
) -> Option<(Arc<SourceFile>, usize, RelativeBytePos)> {
- self.time_stamp += 1;
-
- // Check if the position is in one of the cached lines
- let cache_idx = self.cache_entry_index(pos);
- if cache_idx != -1 {
- let cache_entry = &mut self.line_cache[cache_idx as usize];
- cache_entry.touch(self.time_stamp);
-
- let col = RelativeBytePos(pos.to_u32() - cache_entry.line.start.to_u32());
- return Some((Arc::clone(&cache_entry.file), cache_entry.line_number, col));
- }
-
- // No cache hit ...
- let oldest = self.oldest_cache_entry_index();
-
- // If the entry doesn't point to the correct file, get the new file and index.
- let new_file_and_idx = if !file_contains(&self.line_cache[oldest].file, pos) {
- Some(self.file_for_position(pos)?)
+ if self.line_bounds.contains(&pos) {
+ // Cache hit: do nothing.
} else {
- None
+ // Cache miss. If the entry doesn't point to the correct file, get the new file and
+ // index.
+ let new_file = if !file_contains(&self.file, pos) {
+ Some(self.file_for_position(pos)?)
+ } else {
+ None
+ };
+ self.update(new_file, pos);
};
- let cache_entry = &mut self.line_cache[oldest];
- cache_entry.update(new_file_and_idx, pos, self.time_stamp);
-
- let col = RelativeBytePos(pos.to_u32() - cache_entry.line.start.to_u32());
- Some((Arc::clone(&cache_entry.file), cache_entry.line_number, col))
+ let col = RelativeBytePos(pos.to_u32() - self.line_bounds.start.to_u32());
+ Some((Arc::clone(&self.file), self.line_number, col))
}
pub fn span_data_to_lines_and_cols(
&mut self,
span_data: &SpanData,
) -> Option<(&SourceFile, usize, BytePos, usize, BytePos)> {
- self.time_stamp += 1;
-
- // Check if lo and hi are in the cached lines.
- let lo_cache_idx: isize = self.cache_entry_index(span_data.lo);
- let hi_cache_idx = self.cache_entry_index(span_data.hi);
-
- if lo_cache_idx != -1 && hi_cache_idx != -1 {
- // Cache hit for span lo and hi. Check if they belong to the same file.
- let lo_file_index = self.line_cache[lo_cache_idx as usize].file_index;
- let hi_file_index = self.line_cache[hi_cache_idx as usize].file_index;
-
- if lo_file_index != hi_file_index {
- return None;
- }
-
- self.line_cache[lo_cache_idx as usize].touch(self.time_stamp);
- self.line_cache[hi_cache_idx as usize].touch(self.time_stamp);
-
- let lo = &self.line_cache[lo_cache_idx as usize];
- let hi = &self.line_cache[hi_cache_idx as usize];
+ let lo_hit = self.line_bounds.contains(&span_data.lo);
+ let hi_hit = self.line_bounds.contains(&span_data.hi);
+ if lo_hit && hi_hit {
+ // span_data.lo and span_data.hi are cached (i.e. both in the same line).
return Some((
- &lo.file,
- lo.line_number,
- span_data.lo - lo.line.start,
- hi.line_number,
- span_data.hi - hi.line.start,
+ &self.file,
+ self.line_number,
+ span_data.lo - self.line_bounds.start,
+ self.line_number,
+ span_data.hi - self.line_bounds.start,
));
}
- // No cache hit or cache hit for only one of span lo and hi.
- let oldest = if lo_cache_idx != -1 || hi_cache_idx != -1 {
- let avoid_idx = if lo_cache_idx != -1 { lo_cache_idx } else { hi_cache_idx };
- self.oldest_cache_entry_index_avoid(avoid_idx as usize)
- } else {
- self.oldest_cache_entry_index()
- };
-
- // If the entry doesn't point to the correct file, get the new file and index.
- // Return early if the file containing beginning of span doesn't contain end of span.
- let new_file_and_idx = if !file_contains(&self.line_cache[oldest].file, span_data.lo) {
- let new_file_and_idx = self.file_for_position(span_data.lo)?;
- if !file_contains(&new_file_and_idx.0, span_data.hi) {
+ // If the cached file is wrong, update it. Return early if the span lo and hi are in
+ // different files.
+ let new_file = if !file_contains(&self.file, span_data.lo) {
+ let new_file = self.file_for_position(span_data.lo)?;
+ if !file_contains(&new_file, span_data.hi) {
return None;
}
-
- Some(new_file_and_idx)
+ Some(new_file)
} else {
- let file = &self.line_cache[oldest].file;
- if !file_contains(file, span_data.hi) {
+ if !file_contains(&self.file, span_data.hi) {
return None;
}
-
None
};
- // Update the cache entries.
- let (lo_idx, hi_idx) = match (lo_cache_idx, hi_cache_idx) {
- // Oldest cache entry is for span_data.lo line.
- (-1, -1) => {
- let lo = &mut self.line_cache[oldest];
- lo.update(new_file_and_idx, span_data.lo, self.time_stamp);
+ // If we reach here, lo and hi are in the same file.
- if !lo.line.contains(&span_data.hi) {
- let new_file_and_idx = Some((Arc::clone(&lo.file), lo.file_index));
- let next_oldest = self.oldest_cache_entry_index_avoid(oldest);
- let hi = &mut self.line_cache[next_oldest];
- hi.update(new_file_and_idx, span_data.hi, self.time_stamp);
- (oldest, next_oldest)
- } else {
- (oldest, oldest)
- }
- }
- // Oldest cache entry is for span_data.lo line.
- (-1, _) => {
- let lo = &mut self.line_cache[oldest];
- lo.update(new_file_and_idx, span_data.lo, self.time_stamp);
- let hi = &mut self.line_cache[hi_cache_idx as usize];
- hi.touch(self.time_stamp);
- (oldest, hi_cache_idx as usize)
- }
- // Oldest cache entry is for span_data.hi line.
- (_, -1) => {
- let hi = &mut self.line_cache[oldest];
- hi.update(new_file_and_idx, span_data.hi, self.time_stamp);
- let lo = &mut self.line_cache[lo_cache_idx as usize];
- lo.touch(self.time_stamp);
- (lo_cache_idx as usize, oldest)
- }
- _ => {
- panic!(
- "the case of neither value being equal to -1 was handled above and the function returns."
- );
- }
+ if !lo_hit {
+ // We cache the lo information.
+ self.update(new_file, span_data.lo);
+ }
+ let lo_line_bounds = &self.line_bounds;
+ let lo_line_number = self.line_number.clone();
+
+ let (hi_line_bounds, hi_line_number) = if !self.line_bounds.contains(&span_data.hi) {
+ // hi and lo are in different lines. We compute but don't cache the hi information.
+ self.pos_to_line(span_data.hi)
+ } else {
+ // hi and lo are in the same line.
+ (self.line_bounds.clone(), self.line_number)
};
- let lo = &self.line_cache[lo_idx];
- let hi = &self.line_cache[hi_idx];
-
// Span lo and hi may equal line end when last line doesn't
// end in newline, hence the inclusive upper bounds below.
- assert!(span_data.lo >= lo.line.start);
- assert!(span_data.lo <= lo.line.end);
- assert!(span_data.hi >= hi.line.start);
- assert!(span_data.hi <= hi.line.end);
- assert!(lo.file.contains(span_data.lo));
- assert!(lo.file.contains(span_data.hi));
- assert_eq!(lo.file_index, hi.file_index);
+ assert!(span_data.lo >= lo_line_bounds.start);
+ assert!(span_data.lo <= lo_line_bounds.end);
+ assert!(span_data.hi >= hi_line_bounds.start);
+ assert!(span_data.hi <= hi_line_bounds.end);
+ assert!(self.file.contains(span_data.lo));
+ assert!(self.file.contains(span_data.hi));
Some((
- &lo.file,
- lo.line_number,
- span_data.lo - lo.line.start,
- hi.line_number,
- span_data.hi - hi.line.start,
+ &self.file,
+ lo_line_number,
+ span_data.lo - lo_line_bounds.start,
+ hi_line_number,
+ span_data.hi - hi_line_bounds.start,
))
}
- fn cache_entry_index(&self, pos: BytePos) -> isize {
- for (idx, cache_entry) in self.line_cache.iter().enumerate() {
- if cache_entry.line.contains(&pos) {
- return idx as isize;
- }
- }
-
- -1
- }
-
- fn oldest_cache_entry_index(&self) -> usize {
- let mut oldest = 0;
-
- for idx in 1..self.line_cache.len() {
- if self.line_cache[idx].time_stamp < self.line_cache[oldest].time_stamp {
- oldest = idx;
- }
- }
-
- oldest
- }
-
- fn oldest_cache_entry_index_avoid(&self, avoid_idx: usize) -> usize {
- let mut oldest = if avoid_idx != 0 { 0 } else { 1 };
-
- for idx in 0..self.line_cache.len() {
- if idx != avoid_idx
- && self.line_cache[idx].time_stamp < self.line_cache[oldest].time_stamp
- {
- oldest = idx;
- }
- }
-
- oldest
- }
-
- fn file_for_position(&self, pos: BytePos) -> Option<(Arc<SourceFile>, usize)> {
+ fn file_for_position(&self, pos: BytePos) -> Option<Arc<SourceFile>> {
if !self.source_map.files().is_empty() {
let file_idx = self.source_map.lookup_source_file_idx(pos);
let file = &self.source_map.files()[file_idx];
if file_contains(file, pos) {
- return Some((Arc::clone(file), file_idx));
+ return Some(Arc::clone(file));
}
}
diff --git a/compiler/rustc_type_ir/Cargo.toml b/compiler/rustc_type_ir/Cargo.toml
index b00f9ee..58fc4d8 100644
--- a/compiler/rustc_type_ir/Cargo.toml
+++ b/compiler/rustc_type_ir/Cargo.toml
@@ -8,7 +8,7 @@
arrayvec = { version = "0.7", default-features = false }
bitflags = "2.4.1"
derive-where = "1.6.1"
-ena = "0.14.4"
+ena = "0.14.3"
indexmap = "2.0.0"
rustc-hash = "2.0.0"
rustc_abi = { path = "../rustc_abi", default-features = false }
diff --git a/tests/incremental/const-generics/issue-64087.rs b/tests/incremental/const-generics/issue-64087.rs
index 97f212b..787f2af 100644
--- a/tests/incremental/const-generics/issue-64087.rs
+++ b/tests/incremental/const-generics/issue-64087.rs
@@ -6,4 +6,6 @@
fn main() {
combinator().into_iter();
//[cfail1]~^ ERROR type annotations needed
+ //[cfail1]~| ERROR type annotations needed
+ //[cfail1]~| ERROR type annotations needed
}
diff --git a/tests/ui/associated-inherent-types/inference-fail.stderr b/tests/ui/associated-inherent-types/inference-fail.stderr
index 12cc3ae..bf329c6 100644
--- a/tests/ui/associated-inherent-types/inference-fail.stderr
+++ b/tests/ui/associated-inherent-types/inference-fail.stderr
@@ -2,7 +2,7 @@
--> $DIR/inference-fail.rs:10:12
|
LL | let _: S<_>::P = ();
- | ^^^^^^^ cannot infer type
+ | ^^^^^^^ cannot infer type for type parameter `T`
error: aborting due to 1 previous error
diff --git a/tests/ui/coercion/fudge-inference/input-ty-closure-param-fn-trait-bounds.rs b/tests/ui/coercion/fudge-inference/input-ty-closure-param-fn-trait-bounds.rs
deleted file mode 100644
index 91dc8e3..0000000
--- a/tests/ui/coercion/fudge-inference/input-ty-closure-param-fn-trait-bounds.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-//@ check-pass
-
-// Regression test for <https://github.com/rust-lang/rust/issues/153816>
-
-struct Inv<T, U>(*mut (T, U));
-
-fn pass_through<F>(_: F) -> Inv<F, F> {
- todo!()
-}
-
-fn map(_: Inv<impl FnOnce(), impl Fn()>) {}
-
-fn traverse() {
- map(pass_through(|| ()))
-}
-
-fn main() {}
diff --git a/tests/ui/coercion/fudge-inference/input-ty-higher-ranked-fn-trait.rs b/tests/ui/coercion/fudge-inference/input-ty-higher-ranked-fn-trait.rs
deleted file mode 100644
index 241a177..0000000
--- a/tests/ui/coercion/fudge-inference/input-ty-higher-ranked-fn-trait.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-//@ check-pass
-
-// Regression test for <https://github.com/rust-lang/rust/issues/153849>
-
-#[expect(dead_code)]
-// Must be invariant
-pub struct Server<T>(*mut T);
-impl<T> Server<T> {
- fn new(_: T) -> Self
- where
- // Must be higher-ranked
- T: Fn(&mut i32),
- {
- todo!()
- }
-}
-
-fn main() {
- // Must have a type annotation
- let _: Server<_> = Server::new(|_| ());
-}
diff --git a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs
index b754b1c..c50bbce 100644
--- a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs
+++ b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs
@@ -3,7 +3,7 @@
use std::marker::PhantomData;
#[derive(PartialEq, Default)]
-//~^ ERROR conflicting implementations of trait `PartialEq` for type `Interval<_>`
+//~^ ERROR conflicting implementations of trait `PartialEq<Interval<_>>` for type `Interval<_>`
pub(crate) struct Interval<T>(PhantomData<T>);
// This impl overlaps with the `derive` unless we reject the nested
diff --git a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
index 620694a..a9a99fb 100644
--- a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
+++ b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
@@ -1,4 +1,4 @@
-error[E0119]: conflicting implementations of trait `PartialEq` for type `Interval<_>`
+error[E0119]: conflicting implementations of trait `PartialEq<Interval<_>>` for type `Interval<_>`
--> $DIR/warn-when-cycle-is-error-in-coherence.rs:5:10
|
LL | #[derive(PartialEq, Default)]
diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs
index 79e9834..298cfb5 100644
--- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs
@@ -18,4 +18,5 @@ impl<const N: usize> Foo<N> for () {
fn main() {
use_dyn(&());
//~^ ERROR type annotations needed
+ //~| ERROR type annotations needed
}
diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr
index f9904c9..a124fbc 100644
--- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr
@@ -14,6 +14,27 @@
LL | use_dyn::<N>(&());
| +++++
-error: aborting due to 1 previous error
+error[E0284]: type annotations needed
+ --> $DIR/dyn-compatibility-ok-infer-err.rs:19:5
+ |
+LL | use_dyn(&());
+ | ^^^^^^^ --- type must be known at this point
+ | |
+ | cannot infer the value of the const parameter `N` declared on the function `use_dyn`
+ |
+note: required for `()` to implement `Foo<_>`
+ --> $DIR/dyn-compatibility-ok-infer-err.rs:8:22
+ |
+LL | impl<const N: usize> Foo<N> for () {
+ | -------------- ^^^^^^ ^^
+ | |
+ | unsatisfied trait bound introduced here
+ = note: required for the cast from `&()` to `&dyn Foo<_>`
+help: consider specifying the generic argument
+ |
+LL | use_dyn::<N>(&());
+ | +++++
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/const-generics/infer/issue-77092.rs b/tests/ui/const-generics/infer/issue-77092.rs
index 77d1fe1..47c594e 100644
--- a/tests/ui/const-generics/infer/issue-77092.rs
+++ b/tests/ui/const-generics/infer/issue-77092.rs
@@ -10,5 +10,6 @@ fn main() {
for i in 1..4 {
println!("{:?}", take_array_from_mut(&mut arr, i));
//~^ ERROR type annotations needed
+ //~| ERROR type annotations needed
}
}
diff --git a/tests/ui/const-generics/infer/issue-77092.stderr b/tests/ui/const-generics/infer/issue-77092.stderr
index 96f6496..3763cd7 100644
--- a/tests/ui/const-generics/infer/issue-77092.stderr
+++ b/tests/ui/const-generics/infer/issue-77092.stderr
@@ -14,6 +14,24 @@
LL | println!("{:?}", take_array_from_mut::<i32, N>(&mut arr, i));
| ++++++++++
-error: aborting due to 1 previous error
+error[E0284]: type annotations needed
+ --> $DIR/issue-77092.rs:11:26
+ |
+LL | println!("{:?}", take_array_from_mut(&mut arr, i));
+ | ---- ^^^^^^^^^^^^^^^^^^^ cannot infer the value of the const parameter `N` declared on the function `take_array_from_mut`
+ | |
+ | required by this formatting parameter
+ |
+ = note: required for `[i32; _]` to implement `Debug`
+ = note: 1 redundant requirement hidden
+ = note: required for `&mut [i32; _]` to implement `Debug`
+note: required by a bound in `core::fmt::rt::Argument::<'_>::new_debug`
+ --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
+help: consider specifying the generic arguments
+ |
+LL | println!("{:?}", take_array_from_mut::<i32, N>(&mut arr, i));
+ | ++++++++++
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs
index 808d960..49c8885 100644
--- a/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs
+++ b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs
@@ -4,6 +4,8 @@
pub fn test_usage(p: ()) {
SmallCString::try_from(p).map(|cstr| cstr);
//~^ ERROR: type annotations needed
+ //~| ERROR: type annotations needed
+ //~| ERROR: type annotations needed
}
pub struct SmallCString<const N: usize> {}
diff --git a/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr
index c80efd6..1557b83 100644
--- a/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr
+++ b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr
@@ -7,7 +7,7 @@
| type must be known at this point
|
note: required by a const generic parameter in `SmallCString`
- --> $DIR/try-from-with-const-genericsrs-98299.rs:9:25
+ --> $DIR/try-from-with-const-genericsrs-98299.rs:11:25
|
LL | pub struct SmallCString<const N: usize> {}
| ^^^^^^^^^^^^^^ required by this const generic parameter in `SmallCString`
@@ -16,6 +16,46 @@
LL | SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
| +++++++++++++++++
-error: aborting due to 1 previous error
+error[E0284]: type annotations needed for `SmallCString<_>`
+ --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
+ |
+LL | SmallCString::try_from(p).map(|cstr| cstr);
+ | ------------ ^^^^
+ | |
+ | type must be known at this point
+ |
+note: required for `SmallCString<_>` to implement `TryFrom<()>`
+ --> $DIR/try-from-with-const-genericsrs-98299.rs:13:22
+ |
+LL | impl<const N: usize> TryFrom<()> for SmallCString<N> {
+ | -------------- ^^^^^^^^^^^ ^^^^^^^^^^^^^^^
+ | |
+ | unsatisfied trait bound introduced here
+help: consider giving this closure parameter an explicit type, where the value of const parameter `N` is specified
+ |
+LL | SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
+ | +++++++++++++++++
+
+error[E0284]: type annotations needed for `SmallCString<_>`
+ --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
+ |
+LL | SmallCString::try_from(p).map(|cstr| cstr);
+ | ------------------------- ^^^^
+ | |
+ | type must be known at this point
+ |
+note: required for `SmallCString<_>` to implement `TryFrom<()>`
+ --> $DIR/try-from-with-const-genericsrs-98299.rs:13:22
+ |
+LL | impl<const N: usize> TryFrom<()> for SmallCString<N> {
+ | -------------- ^^^^^^^^^^^ ^^^^^^^^^^^^^^^
+ | |
+ | unsatisfied trait bound introduced here
+help: consider giving this closure parameter an explicit type, where the value of const parameter `N` is specified
+ |
+LL | SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
+ | +++++++++++++++++
+
+error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/error-emitter/multiline-removal-suggestion.svg b/tests/ui/error-emitter/multiline-removal-suggestion.svg
index 39631e0..1e86213 100644
--- a/tests/ui/error-emitter/multiline-removal-suggestion.svg
+++ b/tests/ui/error-emitter/multiline-removal-suggestion.svg
@@ -1,4 +1,4 @@
-<svg width="2322px" height="4322px" xmlns="http://www.w3.org/2000/svg">
+<svg width="2288px" height="3890px" xmlns="http://www.w3.org/2000/svg">
<style>
.fg { fill: #AAAAAA }
.bg { fill: #000000 }
@@ -129,375 +129,327 @@
</tspan>
<tspan x="10px" y="982px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
</tspan>
- <tspan x="10px" y="1000px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>> as IntoIterator>::IntoIter = _`</tspan>
+ <tspan x="10px" y="1000px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan>
</tspan>
- <tspan x="10px" y="1018px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="1018px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan>
</tspan>
- <tspan x="10px" y="1036px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>> as IntoIterator>::Item = _`</tspan>
+ <tspan x="10px" y="1036px">
</tspan>
- <tspan x="10px" y="1054px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="1054px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="1072px"><tspan> `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>>: IntoIterator`</tspan>
+ <tspan x="10px" y="1072px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:32:6</tspan>
</tspan>
- <tspan x="10px" y="1090px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="1090px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1108px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="1108px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .flatten()</tspan>
</tspan>
- <tspan x="10px" y="1126px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="1126px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="1144px">
+ <tspan x="10px" y="1144px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1162px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="1162px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
</tspan>
- <tspan x="10px" y="1180px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:32:6</tspan>
+ <tspan x="10px" y="1180px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
</tspan>
- <tspan x="10px" y="1198px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="1198px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
</tspan>
- <tspan x="10px" y="1216px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .flatten()</tspan>
+ <tspan x="10px" y="1216px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
</tspan>
- <tspan x="10px" y="1234px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="1234px"><tspan class="fg-bright-cyan bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan>
</tspan>
<tspan x="10px" y="1252px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1270px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
+ <tspan x="10px" y="1270px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- </tspan><tspan> ts.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="1288px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
+ <tspan x="10px" y="1288px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- .map(|t| (is_true, t))</tspan>
</tspan>
- <tspan x="10px" y="1306px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
+ <tspan x="10px" y="1306px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-green">+ </tspan><tspan> ts.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="1324px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
+ <tspan x="10px" y="1324px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1342px"><tspan class="fg-bright-cyan bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan>
+ <tspan x="10px" y="1342px">
</tspan>
- <tspan x="10px" y="1360px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="1360px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="1378px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- </tspan><tspan> ts.into_iter()</tspan>
+ <tspan x="10px" y="1378px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:28:2</tspan>
</tspan>
- <tspan x="10px" y="1396px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- .map(|t| (is_true, t))</tspan>
+ <tspan x="10px" y="1396px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1414px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-green">+ </tspan><tspan> ts.into_iter()</tspan>
+ <tspan x="10px" y="1414px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">/</tspan><tspan> hm.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="1432px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="1432px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
</tspan>
- <tspan x="10px" y="1450px">
+ <tspan x="10px" y="1450px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> ts.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="1468px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="1468px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|t| (is_true, t))</tspan>
</tspan>
- <tspan x="10px" y="1486px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:28:2</tspan>
+ <tspan x="10px" y="1486px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .flatten()</tspan>
</tspan>
- <tspan x="10px" y="1504px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="1504px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> })</tspan>
</tspan>
- <tspan x="10px" y="1522px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">/</tspan><tspan> hm.into_iter()</tspan>
+ <tspan x="10px" y="1522px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|__________^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="1540px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
+ <tspan x="10px" y="1540px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1558px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> ts.into_iter()</tspan>
+ <tspan x="10px" y="1558px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
</tspan>
- <tspan x="10px" y="1576px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|t| (is_true, t))</tspan>
+ <tspan x="10px" y="1576px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
</tspan>
- <tspan x="10px" y="1594px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .flatten()</tspan>
+ <tspan x="10px" y="1594px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
</tspan>
- <tspan x="10px" y="1612px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> })</tspan>
+ <tspan x="10px" y="1612px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
</tspan>
- <tspan x="10px" y="1630px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|__________^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="1630px">
</tspan>
- <tspan x="10px" y="1648px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="1648px"><tspan class="fg-bright-red bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>`, but its trait bounds were not satisfied</tspan>
</tspan>
- <tspan x="10px" y="1666px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
+ <tspan x="10px" y="1666px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:35:4</tspan>
</tspan>
- <tspan x="10px" y="1684px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
+ <tspan x="10px" y="1684px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1702px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
+ <tspan x="10px" y="1702px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">/</tspan><tspan> hm.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="1720px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
+ <tspan x="10px" y="1720px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
</tspan>
- <tspan x="10px" y="1738px">
+ <tspan x="10px" y="1738px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> ts.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="1756px"><tspan class="fg-bright-red bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>`, but its trait bounds were not satisfied</tspan>
+ <tspan x="10px" y="1756px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|t| (is_true, t))</tspan>
</tspan>
- <tspan x="10px" y="1774px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:35:4</tspan>
+ <tspan x="10px" y="1774px"><tspan class="fg-bright-blue bold">...</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1792px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="1792px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .flatten()</tspan>
</tspan>
- <tspan x="10px" y="1810px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">/</tspan><tspan> hm.into_iter()</tspan>
+ <tspan x="10px" y="1810px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .collect()</tspan>
</tspan>
- <tspan x="10px" y="1828px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
+ <tspan x="10px" y="1828px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">-</tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">method cannot be called due to unsatisfied trait bounds</tspan>
</tspan>
- <tspan x="10px" y="1846px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> ts.into_iter()</tspan>
+ <tspan x="10px" y="1846px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|_________|</tspan>
</tspan>
- <tspan x="10px" y="1864px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|t| (is_true, t))</tspan>
+ <tspan x="10px" y="1864px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1882px"><tspan class="fg-bright-blue bold">...</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="1882px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="1900px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .flatten()</tspan>
+ <tspan x="10px" y="1900px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
</tspan>
- <tspan x="10px" y="1918px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .collect()</tspan>
+ <tspan x="10px" y="1918px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan>
</tspan>
- <tspan x="10px" y="1936px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">-</tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">method cannot be called due to unsatisfied trait bounds</tspan>
+ <tspan x="10px" y="1936px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan>
</tspan>
- <tspan x="10px" y="1954px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|_________|</tspan>
+ <tspan x="10px" y="1954px">
</tspan>
- <tspan x="10px" y="1972px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="1972px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="1990px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="1990px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:43:7</tspan>
</tspan>
- <tspan x="10px" y="2008px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
+ <tspan x="10px" y="2008px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2026px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>> as IntoIterator>::IntoIter = _`</tspan>
+ <tspan x="10px" y="2026px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> }).flatten()</tspan>
</tspan>
- <tspan x="10px" y="2044px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="2044px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="2062px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>> as IntoIterator>::Item = _`</tspan>
+ <tspan x="10px" y="2062px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2080px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="2080px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
</tspan>
- <tspan x="10px" y="2098px"><tspan> `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>>: IntoIterator`</tspan>
+ <tspan x="10px" y="2098px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
</tspan>
- <tspan x="10px" y="2116px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="2116px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
</tspan>
- <tspan x="10px" y="2134px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="2134px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
</tspan>
- <tspan x="10px" y="2152px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="2152px"><tspan class="fg-bright-cyan bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan>
</tspan>
- <tspan x="10px" y="2170px">
+ <tspan x="10px" y="2170px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2188px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="2188px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- </tspan><tspan> ts.into_iter()</tspan><tspan class="fg-bright-red">.map(|t| {</tspan>
</tspan>
- <tspan x="10px" y="2206px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:43:7</tspan>
+ <tspan x="10px" y="2206px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- (is_true, t)</tspan>
</tspan>
- <tspan x="10px" y="2224px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="2224px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- })</tspan><tspan>.flatten()</tspan>
</tspan>
- <tspan x="10px" y="2242px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> }).flatten()</tspan>
+ <tspan x="10px" y="2242px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-green">+ </tspan><tspan> ts.into_iter().flatten()</tspan>
</tspan>
- <tspan x="10px" y="2260px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="2260px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2278px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="2278px">
</tspan>
- <tspan x="10px" y="2296px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
+ <tspan x="10px" y="2296px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="2314px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
+ <tspan x="10px" y="2314px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:39:2</tspan>
</tspan>
- <tspan x="10px" y="2332px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
+ <tspan x="10px" y="2332px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2350px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
+ <tspan x="10px" y="2350px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">/</tspan><tspan> hm.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="2368px"><tspan class="fg-bright-cyan bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan>
+ <tspan x="10px" y="2368px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
</tspan>
- <tspan x="10px" y="2386px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="2386px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> ts.into_iter().map(|t| {</tspan>
</tspan>
- <tspan x="10px" y="2404px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- </tspan><tspan> ts.into_iter()</tspan><tspan class="fg-bright-red">.map(|t| {</tspan>
+ <tspan x="10px" y="2404px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> (is_true, t)</tspan>
</tspan>
- <tspan x="10px" y="2422px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- (is_true, t)</tspan>
+ <tspan x="10px" y="2422px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> }).flatten()</tspan>
</tspan>
- <tspan x="10px" y="2440px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- })</tspan><tspan>.flatten()</tspan>
+ <tspan x="10px" y="2440px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> })</tspan>
</tspan>
- <tspan x="10px" y="2458px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-green">+ </tspan><tspan> ts.into_iter().flatten()</tspan>
+ <tspan x="10px" y="2458px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|__________^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
<tspan x="10px" y="2476px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2494px">
+ <tspan x="10px" y="2494px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
</tspan>
- <tspan x="10px" y="2512px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="2512px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
</tspan>
- <tspan x="10px" y="2530px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:39:2</tspan>
+ <tspan x="10px" y="2530px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
</tspan>
- <tspan x="10px" y="2548px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="2548px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
</tspan>
- <tspan x="10px" y="2566px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">/</tspan><tspan> hm.into_iter()</tspan>
+ <tspan x="10px" y="2566px">
</tspan>
- <tspan x="10px" y="2584px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
+ <tspan x="10px" y="2584px"><tspan class="fg-bright-red bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>`, but its trait bounds were not satisfied</tspan>
</tspan>
- <tspan x="10px" y="2602px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> ts.into_iter().map(|t| {</tspan>
+ <tspan x="10px" y="2602px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:46:4</tspan>
</tspan>
- <tspan x="10px" y="2620px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> (is_true, t)</tspan>
+ <tspan x="10px" y="2620px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2638px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> }).flatten()</tspan>
+ <tspan x="10px" y="2638px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">/</tspan><tspan> hm.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="2656px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> })</tspan>
+ <tspan x="10px" y="2656px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
</tspan>
- <tspan x="10px" y="2674px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|__________^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="2674px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> ts.into_iter().map(|t| {</tspan>
</tspan>
- <tspan x="10px" y="2692px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="2692px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> (is_true, t)</tspan>
</tspan>
- <tspan x="10px" y="2710px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
+ <tspan x="10px" y="2710px"><tspan class="fg-bright-blue bold">...</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2728px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
+ <tspan x="10px" y="2728px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .flatten()</tspan>
</tspan>
- <tspan x="10px" y="2746px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
+ <tspan x="10px" y="2746px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .collect()</tspan>
</tspan>
- <tspan x="10px" y="2764px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
+ <tspan x="10px" y="2764px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">-</tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">method cannot be called due to unsatisfied trait bounds</tspan>
</tspan>
- <tspan x="10px" y="2782px">
+ <tspan x="10px" y="2782px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|_________|</tspan>
</tspan>
- <tspan x="10px" y="2800px"><tspan class="fg-bright-red bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>`, but its trait bounds were not satisfied</tspan>
+ <tspan x="10px" y="2800px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2818px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:46:4</tspan>
+ <tspan x="10px" y="2818px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2836px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="2836px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
</tspan>
- <tspan x="10px" y="2854px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">/</tspan><tspan> hm.into_iter()</tspan>
+ <tspan x="10px" y="2854px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan>
</tspan>
- <tspan x="10px" y="2872px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
+ <tspan x="10px" y="2872px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan>
</tspan>
- <tspan x="10px" y="2890px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> ts.into_iter().map(|t| {</tspan>
+ <tspan x="10px" y="2890px">
</tspan>
- <tspan x="10px" y="2908px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> (is_true, t)</tspan>
+ <tspan x="10px" y="2908px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="2926px"><tspan class="fg-bright-blue bold">...</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="2926px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:53:28</tspan>
</tspan>
- <tspan x="10px" y="2944px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .flatten()</tspan>
+ <tspan x="10px" y="2944px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="2962px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .collect()</tspan>
+ <tspan x="10px" y="2962px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan>
</tspan>
- <tspan x="10px" y="2980px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">-</tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">method cannot be called due to unsatisfied trait bounds</tspan>
+ <tspan x="10px" y="2980px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="2998px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|_________|</tspan>
+ <tspan x="10px" y="2998px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="3016px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="3016px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
</tspan>
- <tspan x="10px" y="3034px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="3034px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
</tspan>
- <tspan x="10px" y="3052px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
+ <tspan x="10px" y="3052px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
</tspan>
- <tspan x="10px" y="3070px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>> as IntoIterator>::IntoIter = _`</tspan>
+ <tspan x="10px" y="3070px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
</tspan>
- <tspan x="10px" y="3088px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="3088px"><tspan class="fg-bright-cyan bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan>
</tspan>
- <tspan x="10px" y="3106px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>> as IntoIterator>::Item = _`</tspan>
+ <tspan x="10px" y="3106px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="3124px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="3124px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- </tspan><tspan> ts.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="3142px"><tspan> `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>>: IntoIterator`</tspan>
+ <tspan x="10px" y="3142px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- .map(|t| (is_true, t))</tspan><tspan>.flatten()</tspan>
</tspan>
- <tspan x="10px" y="3160px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="3160px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-green">+ </tspan><tspan> ts.into_iter().flatten()</tspan>
</tspan>
- <tspan x="10px" y="3178px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="3178px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="3196px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan>
+ <tspan x="10px" y="3196px">
</tspan>
- <tspan x="10px" y="3214px">
+ <tspan x="10px" y="3214px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="3232px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="3232px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:50:2</tspan>
</tspan>
- <tspan x="10px" y="3250px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:53:28</tspan>
+ <tspan x="10px" y="3250px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="3268px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="3268px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">/</tspan><tspan> hm.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="3286px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan>
+ <tspan x="10px" y="3286px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
</tspan>
- <tspan x="10px" y="3304px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="3304px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> ts.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="3322px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="3322px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan>
</tspan>
- <tspan x="10px" y="3340px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
+ <tspan x="10px" y="3340px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> })</tspan>
</tspan>
- <tspan x="10px" y="3358px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
+ <tspan x="10px" y="3358px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|__________^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
</tspan>
- <tspan x="10px" y="3376px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
+ <tspan x="10px" y="3376px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="3394px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
+ <tspan x="10px" y="3394px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
</tspan>
- <tspan x="10px" y="3412px"><tspan class="fg-bright-cyan bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan>
+ <tspan x="10px" y="3412px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
</tspan>
- <tspan x="10px" y="3430px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="3430px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
</tspan>
- <tspan x="10px" y="3448px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- </tspan><tspan> ts.into_iter()</tspan>
+ <tspan x="10px" y="3448px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
</tspan>
- <tspan x="10px" y="3466px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-red">- .map(|t| (is_true, t))</tspan><tspan>.flatten()</tspan>
+ <tspan x="10px" y="3466px">
</tspan>
- <tspan x="10px" y="3484px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-green">+ </tspan><tspan> ts.into_iter().flatten()</tspan>
+ <tspan x="10px" y="3484px"><tspan class="fg-bright-red bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>`, but its trait bounds were not satisfied</tspan>
</tspan>
- <tspan x="10px" y="3502px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="3502px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:56:4</tspan>
</tspan>
- <tspan x="10px" y="3520px">
+ <tspan x="10px" y="3520px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="3538px"><tspan class="fg-bright-red bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="3538px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">/</tspan><tspan> hm.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="3556px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:50:2</tspan>
+ <tspan x="10px" y="3556px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
</tspan>
- <tspan x="10px" y="3574px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="3574px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> ts.into_iter()</tspan>
</tspan>
- <tspan x="10px" y="3592px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">/</tspan><tspan> hm.into_iter()</tspan>
+ <tspan x="10px" y="3592px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan>
</tspan>
- <tspan x="10px" y="3610px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
+ <tspan x="10px" y="3610px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> })</tspan>
</tspan>
- <tspan x="10px" y="3628px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> ts.into_iter()</tspan>
+ <tspan x="10px" y="3628px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .flatten()</tspan>
</tspan>
- <tspan x="10px" y="3646px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan>
+ <tspan x="10px" y="3646px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .collect()</tspan>
</tspan>
- <tspan x="10px" y="3664px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|</tspan><tspan> })</tspan>
+ <tspan x="10px" y="3664px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">-</tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">method cannot be called due to unsatisfied trait bounds</tspan>
</tspan>
- <tspan x="10px" y="3682px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">|__________^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">`(bool, HashSet<u8>)` is not an iterator</tspan>
+ <tspan x="10px" y="3682px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|_________|</tspan>
</tspan>
<tspan x="10px" y="3700px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="3718px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan>
+ <tspan x="10px" y="3718px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
- <tspan x="10px" y="3736px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan>
+ <tspan x="10px" y="3736px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
</tspan>
- <tspan x="10px" y="3754px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
+ <tspan x="10px" y="3754px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan>
</tspan>
- <tspan x="10px" y="3772px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
+ <tspan x="10px" y="3772px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan>
</tspan>
<tspan x="10px" y="3790px">
</tspan>
- <tspan x="10px" y="3808px"><tspan class="fg-bright-red bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>`, but its trait bounds were not satisfied</tspan>
+ <tspan x="10px" y="3808px"><tspan class="fg-bright-red bold">error</tspan><tspan class="bold">: aborting due to 12 previous errors</tspan>
</tspan>
- <tspan x="10px" y="3826px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:56:4</tspan>
+ <tspan x="10px" y="3826px">
</tspan>
- <tspan x="10px" y="3844px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
+ <tspan x="10px" y="3844px"><tspan class="bold">Some errors have detailed explanations: E0277, E0599.</tspan>
</tspan>
- <tspan x="10px" y="3862px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">/</tspan><tspan> hm.into_iter()</tspan>
+ <tspan x="10px" y="3862px"><tspan class="bold">For more information about an error, try `rustc --explain E0277`.</tspan>
</tspan>
- <tspan x="10px" y="3880px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
-</tspan>
- <tspan x="10px" y="3898px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> ts.into_iter()</tspan>
-</tspan>
- <tspan x="10px" y="3916px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan>
-</tspan>
- <tspan x="10px" y="3934px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> })</tspan>
-</tspan>
- <tspan x="10px" y="3952px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .flatten()</tspan>
-</tspan>
- <tspan x="10px" y="3970px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> .collect()</tspan>
-</tspan>
- <tspan x="10px" y="3988px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">-</tspan><tspan class="fg-bright-red bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">method cannot be called due to unsatisfied trait bounds</tspan>
-</tspan>
- <tspan x="10px" y="4006px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|_________|</tspan>
-</tspan>
- <tspan x="10px" y="4024px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
-</tspan>
- <tspan x="10px" y="4042px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
-</tspan>
- <tspan x="10px" y="4060px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
-</tspan>
- <tspan x="10px" y="4078px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>> as IntoIterator>::IntoIter = _`</tspan>
-</tspan>
- <tspan x="10px" y="4096px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan>
-</tspan>
- <tspan x="10px" y="4114px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>> as IntoIterator>::Item = _`</tspan>
-</tspan>
- <tspan x="10px" y="4132px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan>
-</tspan>
- <tspan x="10px" y="4150px"><tspan> `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>>: IntoIterator`</tspan>
-</tspan>
- <tspan x="10px" y="4168px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan>
-</tspan>
- <tspan x="10px" y="4186px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan>
-</tspan>
- <tspan x="10px" y="4204px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan>
-</tspan>
- <tspan x="10px" y="4222px">
-</tspan>
- <tspan x="10px" y="4240px"><tspan class="fg-bright-red bold">error</tspan><tspan class="bold">: aborting due to 12 previous errors</tspan>
-</tspan>
- <tspan x="10px" y="4258px">
-</tspan>
- <tspan x="10px" y="4276px"><tspan class="bold">Some errors have detailed explanations: E0277, E0599.</tspan>
-</tspan>
- <tspan x="10px" y="4294px"><tspan class="bold">For more information about an error, try `rustc --explain E0277`.</tspan>
-</tspan>
- <tspan x="10px" y="4312px">
+ <tspan x="10px" y="3880px">
</tspan>
</text>
diff --git a/tests/ui/indexing/indexing-requires-a-uint.stderr b/tests/ui/indexing/indexing-requires-a-uint.stderr
index 9e974c8..17ef331 100644
--- a/tests/ui/indexing/indexing-requires-a-uint.stderr
+++ b/tests/ui/indexing/indexing-requires-a-uint.stderr
@@ -13,6 +13,8 @@
|
= note: `SliceIndex<ByteStr>`
= note: required for `[{integer}]` to implement `Index<u8>`
+ = note: 1 redundant requirement hidden
+ = note: required for `[{integer}; 1]` to implement `Index<u8>`
error[E0308]: mismatched types
--> $DIR/indexing-requires-a-uint.rs:12:18
diff --git a/tests/ui/indexing/point-at-index-for-obligation-failure.rs b/tests/ui/indexing/point-at-index-for-obligation-failure.rs
index 4ff9069..e9c429b 100644
--- a/tests/ui/indexing/point-at-index-for-obligation-failure.rs
+++ b/tests/ui/indexing/point-at-index-for-obligation-failure.rs
@@ -1,7 +1,7 @@
fn main() {
let a = std::collections::HashMap::<String,String>::new();
let s = "hello";
- let _b = a[ //~ ERROR E0277
- &s
+ let _b = a[
+ &s //~ ERROR E0277
];
}
diff --git a/tests/ui/indexing/point-at-index-for-obligation-failure.stderr b/tests/ui/indexing/point-at-index-for-obligation-failure.stderr
index 22f48d6..a221e43 100644
--- a/tests/ui/indexing/point-at-index-for-obligation-failure.stderr
+++ b/tests/ui/indexing/point-at-index-for-obligation-failure.stderr
@@ -1,11 +1,8 @@
error[E0277]: the trait bound `String: Borrow<&str>` is not satisfied
- --> $DIR/point-at-index-for-obligation-failure.rs:4:14
+ --> $DIR/point-at-index-for-obligation-failure.rs:5:9
|
-LL | let _b = a[
- | ______________^
-LL | | &s
-LL | | ];
- | |_____^ the trait `Borrow<&str>` is not implemented for `String`
+LL | &s
+ | ^^ the trait `Borrow<&str>` is not implemented for `String`
|
help: the trait `Borrow<&_>` is not implemented for `String`
but trait `Borrow<_>` is implemented for it
diff --git a/tests/ui/parser/issue-12187-1.stderr b/tests/ui/parser/issue-12187-1.stderr
index ee5d1c0..704854f 100644
--- a/tests/ui/parser/issue-12187-1.stderr
+++ b/tests/ui/parser/issue-12187-1.stderr
@@ -6,7 +6,7 @@
|
help: consider giving this pattern a type, where the type for type parameter `T` is specified
|
-LL | let &v: &_ = new();
+LL | let &v: &T = new();
| ++++
error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issue-12187-2.stderr b/tests/ui/parser/issue-12187-2.stderr
index 67d18cf..eeef63a 100644
--- a/tests/ui/parser/issue-12187-2.stderr
+++ b/tests/ui/parser/issue-12187-2.stderr
@@ -6,7 +6,7 @@
|
help: consider giving this pattern a type, where the type for type parameter `T` is specified
|
-LL | let &v: &_ = new();
+LL | let &v: &T = new();
| ++++
error: aborting due to 1 previous error
diff --git a/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr b/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr
index ba44beb..c98b9bb 100644
--- a/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr
+++ b/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr
@@ -7,7 +7,7 @@
LL | extract(x).max(2);
| ---------- type must be known at this point
|
-help: consider giving `x` an explicit type, where the type for type parameter `T` is specified
+help: consider giving `x` an explicit type, where the placeholders `_` are specified
|
LL | let x: [Foo<T>; 2] = [Foo(PhantomData); 2];
| +++++++++++++
diff --git a/tests/ui/suggestions/suggest-dereferencing-index.stderr b/tests/ui/suggestions/suggest-dereferencing-index.stderr
index cee5ffc..a1b66c2 100644
--- a/tests/ui/suggestions/suggest-dereferencing-index.stderr
+++ b/tests/ui/suggestions/suggest-dereferencing-index.stderr
@@ -13,6 +13,8 @@
|
= note: `SliceIndex<ByteStr>`
= note: required for `[{integer}]` to implement `Index<&usize>`
+ = note: 1 redundant requirement hidden
+ = note: required for `[{integer}; 3]` to implement `Index<&usize>`
help: dereference this index
|
LL | let one_item_please: i32 = [1, 2, 3][*i];
diff --git a/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr b/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr
index 6860b0b..739182e 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr
@@ -7,7 +7,7 @@
LL | return c();
| - type must be known at this point
|
-help: consider giving `closure0` an explicit type, where the type for type parameter `T` is specified
+help: consider giving `closure0` an explicit type, where the placeholders `_` are specified
|
LL | let mut closure0: Option<T> = None;
| +++++++++++