authorbors <bors@rust-lang.org> 2024-12-26 21:04:12 UTC
committerbors <bors@rust-lang.org> 2024-12-26 21:04:12 UTC
log917bfa78478cbcc77406e5ea37b24c3eedefacf4
treeb69309143a2c72cd20ed5ef25f8dd9cd37b81f8a
parent19e75f4fb3f960267996e8788459e97b8769aac7
parent3d50eba781811a41247bb99baa450d4c82565a43

Auto merge of #134795 - GuillaumeGomez:rollup-9x8n7pi, r=GuillaumeGomez

Rollup of 4 pull requests Successful merges: - #134656 (Migrate `incr-add-rust-src-component` to rmake) - #134664 (Account for removal of multiline span in suggestion) - #134772 (Improve/cleanup rustdoc code) - #134781 (Add more `begin_panic` normalizations to panic backtrace tests) r? `@ghost` `@rustbot` modify labels: rollup

26 files changed, 806 insertions(+), 81 deletions(-)

compiler/rustc_errors/src/emitter.rs+79-7
...@@ -2216,6 +2216,11 @@ impl HumanEmitter {...@@ -2216,6 +2216,11 @@ impl HumanEmitter {
2216 show_code_change2216 show_code_change
2217 {2217 {
2218 for part in parts {2218 for part in parts {
2219 let snippet = if let Ok(snippet) = sm.span_to_snippet(part.span) {
2220 snippet
2221 } else {
2222 String::new()
2223 };
2219 let span_start_pos = sm.lookup_char_pos(part.span.lo()).col_display;2224 let span_start_pos = sm.lookup_char_pos(part.span.lo()).col_display;
2220 let span_end_pos = sm.lookup_char_pos(part.span.hi()).col_display;2225 let span_end_pos = sm.lookup_char_pos(part.span.hi()).col_display;
22212226
...@@ -2263,13 +2268,80 @@ impl HumanEmitter {...@@ -2263,13 +2268,80 @@ impl HumanEmitter {
2263 }2268 }
2264 if let DisplaySuggestion::Diff = show_code_change {2269 if let DisplaySuggestion::Diff = show_code_change {
2265 // Colorize removal with red in diff format.2270 // Colorize removal with red in diff format.
2266 buffer.set_style_range(2271
2267 row_num - 2,2272 // Below, there's some tricky buffer indexing going on. `row_num` at this
2268 (padding as isize + span_start_pos as isize) as usize,2273 // point corresponds to:
2269 (padding as isize + span_end_pos as isize) as usize,2274 //
2270 Style::Removal,2275 // |
2271 true,2276 // LL | CODE
2272 );2277 // | ++++ <- `row_num`
2278 //
2279 // in the buffer. When we have a diff format output, we end up with
2280 //
2281 // |
2282 // LL - OLDER <- row_num - 2
2283 // LL + NEWER
2284 // | <- row_num
2285 //
2286 // The `row_num - 2` is to select the buffer line that has the "old version
2287 // of the diff" at that point. When the removal is a single line, `i` is
2288 // `0`, `newlines` is `1` so `(newlines - i - 1)` ends up being `0`, so row
2289 // points at `LL - OLDER`. When the removal corresponds to multiple lines,
2290 // we end up with `newlines > 1` and `i` being `0..newlines - 1`.
2291 //
2292 // |
2293 // LL - OLDER <- row_num - 2 - (newlines - last_i - 1)
2294 // LL - CODE
2295 // LL - BEING
2296 // LL - REMOVED <- row_num - 2 - (newlines - first_i - 1)
2297 // LL + NEWER
2298 // | <- row_num
2299
2300 let newlines = snippet.lines().count();
2301 if newlines > 0 && row_num > newlines {
2302 // Account for removals where the part being removed spans multiple
2303 // lines.
2304 // FIXME: We check the number of rows because in some cases, like in
2305 // `tests/ui/lint/invalid-nan-comparison-suggestion.rs`, the rendered
2306 // suggestion will only show the first line of code being replaced. The
2307 // proper way of doing this would be to change the suggestion rendering
2308 // logic to show the whole prior snippet, but the current output is not
2309 // too bad to begin with, so we side-step that issue here.
2310 for (i, line) in snippet.lines().enumerate() {
2311 let line = normalize_whitespace(line);
2312 let row = row_num - 2 - (newlines - i - 1);
2313 // On the first line, we highlight between the start of the part
2314 // span, and the end of that line.
2315 // On the last line, we highlight between the start of the line, and
2316 // the column of the part span end.
2317 // On all others, we highlight the whole line.
2318 let start = if i == 0 {
2319 (padding as isize + span_start_pos as isize) as usize
2320 } else {
2321 padding
2322 };
2323 let end = if i == 0 {
2324 (padding as isize
2325 + span_start_pos as isize
2326 + line.len() as isize)
2327 as usize
2328 } else if i == newlines - 1 {
2329 (padding as isize + span_end_pos as isize) as usize
2330 } else {
2331 (padding as isize + line.len() as isize) as usize
2332 };
2333 buffer.set_style_range(row, start, end, Style::Removal, true);
2334 }
2335 } else {
2336 // The removed code fits all in one line.
2337 buffer.set_style_range(
2338 row_num - 2,
2339 (padding as isize + span_start_pos as isize) as usize,
2340 (padding as isize + span_end_pos as isize) as usize,
2341 Style::Removal,
2342 true,
2343 );
2344 }
2273 }2345 }
22742346
2275 // length of the code after substitution2347 // length of the code after substitution
src/librustdoc/clean/mod.rs+3-3
...@@ -894,7 +894,7 @@ fn clean_ty_generics<'tcx>(...@@ -894,7 +894,7 @@ fn clean_ty_generics<'tcx>(
894894
895 // Add back a `Sized` bound if there are no *trait* bounds remaining (incl. `?Sized`).895 // Add back a `Sized` bound if there are no *trait* bounds remaining (incl. `?Sized`).
896 // Since all potential trait bounds are at the front we can just check the first bound.896 // Since all potential trait bounds are at the front we can just check the first bound.
897 if bounds.first().map_or(true, |b| !b.is_trait_bound()) {897 if bounds.first().is_none_or(|b| !b.is_trait_bound()) {
898 bounds.insert(0, GenericBound::sized(cx));898 bounds.insert(0, GenericBound::sized(cx));
899 }899 }
900900
...@@ -1811,7 +1811,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T...@@ -1811,7 +1811,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T
1811 }1811 }
1812 TyKind::Slice(ty) => Slice(Box::new(clean_ty(ty, cx))),1812 TyKind::Slice(ty) => Slice(Box::new(clean_ty(ty, cx))),
1813 TyKind::Pat(ty, pat) => Type::Pat(Box::new(clean_ty(ty, cx)), format!("{pat:?}").into()),1813 TyKind::Pat(ty, pat) => Type::Pat(Box::new(clean_ty(ty, cx)), format!("{pat:?}").into()),
1814 TyKind::Array(ty, ref const_arg) => {1814 TyKind::Array(ty, const_arg) => {
1815 // NOTE(min_const_generics): We can't use `const_eval_poly` for constants1815 // NOTE(min_const_generics): We can't use `const_eval_poly` for constants
1816 // as we currently do not supply the parent generics to anonymous constants1816 // as we currently do not supply the parent generics to anonymous constants
1817 // but do allow `ConstKind::Param`.1817 // but do allow `ConstKind::Param`.
...@@ -2337,7 +2337,7 @@ fn clean_middle_opaque_bounds<'tcx>(...@@ -2337,7 +2337,7 @@ fn clean_middle_opaque_bounds<'tcx>(
23372337
2338 // Add back a `Sized` bound if there are no *trait* bounds remaining (incl. `?Sized`).2338 // Add back a `Sized` bound if there are no *trait* bounds remaining (incl. `?Sized`).
2339 // Since all potential trait bounds are at the front we can just check the first bound.2339 // Since all potential trait bounds are at the front we can just check the first bound.
2340 if bounds.first().map_or(true, |b| !b.is_trait_bound()) {2340 if bounds.first().is_none_or(|b| !b.is_trait_bound()) {
2341 bounds.insert(0, GenericBound::sized(cx));2341 bounds.insert(0, GenericBound::sized(cx));
2342 }2342 }
23432343
src/librustdoc/doctest.rs+1-1
...@@ -220,7 +220,7 @@ pub(crate) fn run(dcx: DiagCtxtHandle<'_>, input: Input, options: RustdocOptions...@@ -220,7 +220,7 @@ pub(crate) fn run(dcx: DiagCtxtHandle<'_>, input: Input, options: RustdocOptions
220 } = interface::run_compiler(config, |compiler| {220 } = interface::run_compiler(config, |compiler| {
221 let krate = rustc_interface::passes::parse(&compiler.sess);221 let krate = rustc_interface::passes::parse(&compiler.sess);
222222
223 let collector = rustc_interface::create_and_enter_global_ctxt(&compiler, krate, |tcx| {223 let collector = rustc_interface::create_and_enter_global_ctxt(compiler, krate, |tcx| {
224 let crate_name = tcx.crate_name(LOCAL_CRATE).to_string();224 let crate_name = tcx.crate_name(LOCAL_CRATE).to_string();
225 let crate_attrs = tcx.hir().attrs(CRATE_HIR_ID);225 let crate_attrs = tcx.hir().attrs(CRATE_HIR_ID);
226 let opts = scrape_test_config(crate_name, crate_attrs, args_path);226 let opts = scrape_test_config(crate_name, crate_attrs, args_path);
src/librustdoc/doctest/make.rs+1-1
...@@ -538,7 +538,7 @@ fn handle_attr(mod_attr_pending: &mut String, source_info: &mut SourceInfo, edit...@@ -538,7 +538,7 @@ fn handle_attr(mod_attr_pending: &mut String, source_info: &mut SourceInfo, edit
538 // If it's complete, then we can clear the pending content.538 // If it's complete, then we can clear the pending content.
539 mod_attr_pending.clear();539 mod_attr_pending.clear();
540 } else {540 } else {
541 mod_attr_pending.push_str("\n");541 mod_attr_pending.push('\n');
542 }542 }
543}543}
544544
src/librustdoc/formats/cache.rs+1-1
...@@ -413,7 +413,7 @@ impl DocFolder for CacheBuilder<'_, '_> {...@@ -413,7 +413,7 @@ impl DocFolder for CacheBuilder<'_, '_> {
413 let impl_item = Impl { impl_item: item };413 let impl_item = Impl { impl_item: item };
414 let impl_did = impl_item.def_id();414 let impl_did = impl_item.def_id();
415 let trait_did = impl_item.trait_did();415 let trait_did = impl_item.trait_did();
416 if trait_did.map_or(true, |d| self.cache.traits.contains_key(&d)) {416 if trait_did.is_none_or(|d| self.cache.traits.contains_key(&d)) {
417 for did in dids {417 for did in dids {
418 if self.impl_ids.entry(did).or_default().insert(impl_did) {418 if self.impl_ids.entry(did).or_default().insert(impl_did) {
419 self.cache.impls.entry(did).or_default().push(impl_item.clone());419 self.cache.impls.entry(did).or_default().push(impl_item.clone());
src/librustdoc/html/escape.rs+3-4
...@@ -104,10 +104,9 @@ impl fmt::Display for EscapeBodyTextWithWbr<'_> {...@@ -104,10 +104,9 @@ impl fmt::Display for EscapeBodyTextWithWbr<'_> {
104 continue;104 continue;
105 }105 }
106 let is_uppercase = || s.chars().any(|c| c.is_uppercase());106 let is_uppercase = || s.chars().any(|c| c.is_uppercase());
107 let next_is_uppercase =107 let next_is_uppercase = || pk.is_none_or(|(_, t)| t.chars().any(|c| c.is_uppercase()));
108 || pk.map_or(true, |(_, t)| t.chars().any(|c| c.is_uppercase()));108 let next_is_underscore = || pk.is_none_or(|(_, t)| t.contains('_'));
109 let next_is_underscore = || pk.map_or(true, |(_, t)| t.contains('_'));109 let next_is_colon = || pk.is_none_or(|(_, t)| t.contains(':'));
110 let next_is_colon = || pk.map_or(true, |(_, t)| t.contains(':'));
111 // Check for CamelCase.110 // Check for CamelCase.
112 //111 //
113 // `i - last > 3` avoids turning FmRadio into Fm<wbr>Radio, which is technically112 // `i - last > 3` avoids turning FmRadio into Fm<wbr>Radio, which is technically
src/librustdoc/html/markdown.rs+3-3
...@@ -480,7 +480,7 @@ impl<'a, I: Iterator<Item = SpannedEvent<'a>>> Iterator for SpannedLinkReplacer<...@@ -480,7 +480,7 @@ impl<'a, I: Iterator<Item = SpannedEvent<'a>>> Iterator for SpannedLinkReplacer<
480 type Item = SpannedEvent<'a>;480 type Item = SpannedEvent<'a>;
481481
482 fn next(&mut self) -> Option<Self::Item> {482 fn next(&mut self) -> Option<Self::Item> {
483 let Some((mut event, range)) = self.iter.next() else { return None };483 let (mut event, range) = self.iter.next()?;
484 self.inner.handle_event(&mut event);484 self.inner.handle_event(&mut event);
485 // Yield the modified event485 // Yield the modified event
486 Some((event, range))486 Some((event, range))
...@@ -2039,7 +2039,7 @@ impl IdMap {...@@ -2039,7 +2039,7 @@ impl IdMap {
2039 let candidate = candidate.to_string();2039 let candidate = candidate.to_string();
2040 if is_default_id(&candidate) {2040 if is_default_id(&candidate) {
2041 let id = format!("{}-{}", candidate, 1);2041 let id = format!("{}-{}", candidate, 1);
2042 self.map.insert(candidate.into(), 2);2042 self.map.insert(candidate, 2);
2043 id2043 id
2044 } else {2044 } else {
2045 candidate2045 candidate
...@@ -2052,7 +2052,7 @@ impl IdMap {...@@ -2052,7 +2052,7 @@ impl IdMap {
2052 }2052 }
2053 };2053 };
20542054
2055 self.map.insert(id.clone().into(), 1);2055 self.map.insert(id.clone(), 1);
2056 id2056 id
2057 }2057 }
20582058
src/librustdoc/html/render/context.rs+1-1
...@@ -748,7 +748,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {...@@ -748,7 +748,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
748 &shared.layout,748 &shared.layout,
749 &page,749 &page,
750 "",750 "",
751 scrape_examples_help(&shared),751 scrape_examples_help(shared),
752 &shared.style_files,752 &shared.style_files,
753 );753 );
754 shared.fs.write(scrape_examples_help_file, v)?;754 shared.fs.write(scrape_examples_help_file, v)?;
src/librustdoc/html/render/mod.rs+1-1
...@@ -1974,7 +1974,7 @@ fn render_impl(...@@ -1974,7 +1974,7 @@ fn render_impl(
1974 .opt_doc_value()1974 .opt_doc_value()
1975 .map(|dox| {1975 .map(|dox| {
1976 Markdown {1976 Markdown {
1977 content: &*dox,1977 content: &dox,
1978 links: &i.impl_item.links(cx),1978 links: &i.impl_item.links(cx),
1979 ids: &mut cx.id_map.borrow_mut(),1979 ids: &mut cx.id_map.borrow_mut(),
1980 error_codes: cx.shared.codes,1980 error_codes: cx.shared.codes,
src/librustdoc/html/render/print_item.rs+1-1
...@@ -1420,7 +1420,7 @@ fn item_union(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::Uni...@@ -1420,7 +1420,7 @@ fn item_union(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::Uni
1420 ty: &'a clean::Type,1420 ty: &'a clean::Type,
1421 ) -> impl fmt::Display + Captures<'a> + 'b + Captures<'cx> {1421 ) -> impl fmt::Display + Captures<'a> + 'b + Captures<'cx> {
1422 display_fn(move |f| {1422 display_fn(move |f| {
1423 let v = ty.print(&self.cx);1423 let v = ty.print(self.cx);
1424 write!(f, "{v}")1424 write!(f, "{v}")
1425 })1425 })
1426 }1426 }
src/librustdoc/json/conversions.rs+5-6
...@@ -312,15 +312,15 @@ fn from_clean_item(item: clean::Item, renderer: &JsonRenderer<'_>) -> ItemEnum {...@@ -312,15 +312,15 @@ fn from_clean_item(item: clean::Item, renderer: &JsonRenderer<'_>) -> ItemEnum {
312 StructFieldItem(f) => ItemEnum::StructField(f.into_json(renderer)),312 StructFieldItem(f) => ItemEnum::StructField(f.into_json(renderer)),
313 EnumItem(e) => ItemEnum::Enum(e.into_json(renderer)),313 EnumItem(e) => ItemEnum::Enum(e.into_json(renderer)),
314 VariantItem(v) => ItemEnum::Variant(v.into_json(renderer)),314 VariantItem(v) => ItemEnum::Variant(v.into_json(renderer)),
315 FunctionItem(f) => ItemEnum::Function(from_function(f, true, header.unwrap(), renderer)),315 FunctionItem(f) => ItemEnum::Function(from_function(*f, true, header.unwrap(), renderer)),
316 ForeignFunctionItem(f, _) => {316 ForeignFunctionItem(f, _) => {
317 ItemEnum::Function(from_function(f, false, header.unwrap(), renderer))317 ItemEnum::Function(from_function(*f, false, header.unwrap(), renderer))
318 }318 }
319 TraitItem(t) => ItemEnum::Trait((*t).into_json(renderer)),319 TraitItem(t) => ItemEnum::Trait((*t).into_json(renderer)),
320 TraitAliasItem(t) => ItemEnum::TraitAlias(t.into_json(renderer)),320 TraitAliasItem(t) => ItemEnum::TraitAlias(t.into_json(renderer)),
321 MethodItem(m, _) => ItemEnum::Function(from_function(m, true, header.unwrap(), renderer)),321 MethodItem(m, _) => ItemEnum::Function(from_function(*m, true, header.unwrap(), renderer)),
322 RequiredMethodItem(m) => {322 RequiredMethodItem(m) => {
323 ItemEnum::Function(from_function(m, false, header.unwrap(), renderer))323 ItemEnum::Function(from_function(*m, false, header.unwrap(), renderer))
324 }324 }
325 ImplItem(i) => ItemEnum::Impl((*i).into_json(renderer)),325 ImplItem(i) => ItemEnum::Impl((*i).into_json(renderer)),
326 StaticItem(s) => ItemEnum::Static(convert_static(s, rustc_hir::Safety::Safe, renderer)),326 StaticItem(s) => ItemEnum::Static(convert_static(s, rustc_hir::Safety::Safe, renderer)),
...@@ -730,12 +730,11 @@ impl FromClean<clean::Impl> for Impl {...@@ -730,12 +730,11 @@ impl FromClean<clean::Impl> for Impl {
730}730}
731731
732pub(crate) fn from_function(732pub(crate) fn from_function(
733 function: Box<clean::Function>,733 clean::Function { decl, generics }: clean::Function,
734 has_body: bool,734 has_body: bool,
735 header: rustc_hir::FnHeader,735 header: rustc_hir::FnHeader,
736 renderer: &JsonRenderer<'_>,736 renderer: &JsonRenderer<'_>,
737) -> Function {737) -> Function {
738 let clean::Function { decl, generics } = *function;
739 Function {738 Function {
740 sig: decl.into_json(renderer),739 sig: decl.into_json(renderer),
741 generics: generics.into_json(renderer),740 generics: generics.into_json(renderer),
src/librustdoc/lib.rs+1-1
...@@ -869,7 +869,7 @@ fn main_args(...@@ -869,7 +869,7 @@ fn main_args(
869 sess.dcx().fatal("Compilation failed, aborting rustdoc");869 sess.dcx().fatal("Compilation failed, aborting rustdoc");
870 }870 }
871871
872 rustc_interface::create_and_enter_global_ctxt(&compiler, krate, |tcx| {872 rustc_interface::create_and_enter_global_ctxt(compiler, krate, |tcx| {
873 let (krate, render_opts, mut cache) = sess.time("run_global_ctxt", || {873 let (krate, render_opts, mut cache) = sess.time("run_global_ctxt", || {
874 core::run_global_ctxt(tcx, show_coverage, render_options, output_format)874 core::run_global_ctxt(tcx, show_coverage, render_options, output_format)
875 });875 });
src/librustdoc/passes/collect_intra_doc_links.rs+1-1
...@@ -1977,7 +1977,7 @@ fn resolution_failure(...@@ -1977,7 +1977,7 @@ fn resolution_failure(
1977 }1977 }
19781978
1979 if !path_str.contains("::") {1979 if !path_str.contains("::") {
1980 if disambiguator.map_or(true, |d| d.ns() == MacroNS)1980 if disambiguator.is_none_or(|d| d.ns() == MacroNS)
1981 && collector1981 && collector
1982 .cx1982 .cx
1983 .tcx1983 .tcx
src/tools/tidy/src/allowed_run_make_makefiles.txt-1
...@@ -1,7 +1,6 @@...@@ -1,7 +1,6 @@
1run-make/branch-protection-check-IBT/Makefile1run-make/branch-protection-check-IBT/Makefile
2run-make/cat-and-grep-sanity-check/Makefile2run-make/cat-and-grep-sanity-check/Makefile
3run-make/extern-fn-reachable/Makefile3run-make/extern-fn-reachable/Makefile
4run-make/incr-add-rust-src-component/Makefile
5run-make/jobserver-error/Makefile4run-make/jobserver-error/Makefile
6run-make/libs-through-symlinks/Makefile5run-make/libs-through-symlinks/Makefile
7run-make/split-debuginfo/Makefile6run-make/split-debuginfo/Makefile
tests/run-make/incr-add-rust-src-component/Makefile deleted-45
...@@ -1,45 +0,0 @@
1# ignore-cross-compile
2include ../tools.mk
3
4# rust-lang/rust#70924: Test that if we add rust-src component in between two
5# incremental compiles, the compiler does not ICE on the second.
6
7# This test uses `ln -s` rather than copying to save testing time, but its
8# usage doesn't work on windows. So ignore windows.
9
10# ignore-windows
11
12SYSROOT:=$(shell $(RUSTC) --print sysroot)
13FAKEROOT=$(TMPDIR)/fakeroot
14INCR=$(TMPDIR)/incr
15
16# Make a local copy of the sysroot; then remove the rust-src part of it, if
17# present, for the *first* build. Then put in a facsimile of the rust-src
18# component for the second build, in order to expose the ICE from issue #70924.
19#
20# Note that it is much easier to just do `cp -a $(SYSROOT)/* $(FAKEROOT)` as a
21# first step, but I am concerned that would be too expensive in a unit test
22# compared to making symbolic links.
23#
24# Anyway, the pattern you'll see here is: For every prefix in
25# root/lib/rustlib/src, link all of prefix parent content, then remove the
26# prefix, then loop on the next prefix. This way, we basically create a copy of
27# the context around root/lib/rustlib/src, and can freely add/remove the src
28# component itself.
29all:
30 mkdir $(FAKEROOT)
31 ln -s $(SYSROOT)/* $(FAKEROOT)
32 rm -f $(FAKEROOT)/lib
33 mkdir $(FAKEROOT)/lib
34 ln -s $(SYSROOT)/lib/* $(FAKEROOT)/lib
35 rm -f $(FAKEROOT)/lib/rustlib
36 mkdir $(FAKEROOT)/lib/rustlib
37 ln -s $(SYSROOT)/lib/rustlib/* $(FAKEROOT)/lib/rustlib
38 rm -f $(FAKEROOT)/lib/rustlib/src
39 mkdir $(FAKEROOT)/lib/rustlib/src
40 ln -s $(SYSROOT)/lib/rustlib/src/* $(FAKEROOT)/lib/rustlib/src
41 rm -f $(FAKEROOT)/lib/rustlib/src/rust
42 $(RUSTC) --sysroot $(FAKEROOT) -C incremental=$(INCR) main.rs
43 mkdir -p $(FAKEROOT)/lib/rustlib/src/rust/src/libstd
44 touch $(FAKEROOT)/lib/rustlib/src/rust/src/libstd/lib.rs
45 $(RUSTC) --sysroot $(FAKEROOT) -C incremental=$(INCR) main.rs
tests/run-make/incr-add-rust-src-component/rmake.rs created+131
...@@ -0,0 +1,131 @@
1//! Regression test for rust-lang/rust#70924. Check that if we add the `rust-src` component in
2//! between two incremental compiles, that the compiler doesn't ICE on the second invocation.
3//!
4//! This test uses symbolic links to save testing time.
5//!
6//! The way this test works is that, for every prefix in `root/lib/rustlib/src`, link all of prefix
7//! parent content, then remove the prefix, then loop on the next prefix. This way, we basically
8//! create a copy of the context around `root/lib/rustlib/src`, and can freely add/remove the src
9//! component itself.
10
11//@ ignore-cross-compile
12// Reason: test needs to run.
13
14//@ needs-symlink
15// Reason: test needs symlink to create stub directories and files.
16
17use std::path::Path;
18
19use run_make_support::rfs::read_dir_entries;
20use run_make_support::{bare_rustc, path, rfs, run};
21
22#[derive(Debug, Copy, Clone)]
23struct Symlink<'a, 'b> {
24 src_dir: &'a Path,
25 dst_dir: &'b Path,
26}
27
28fn shallow_symlink_dir<'a, 'b>(Symlink { src_dir, dst_dir }: Symlink<'a, 'b>) {
29 eprintln!(
30 "shallow_symlink_dir: src_dir={} -> dst_dir={}",
31 src_dir.display(),
32 dst_dir.display()
33 );
34
35 read_dir_entries(src_dir, |src_path| {
36 let src_metadata = rfs::symlink_metadata(src_path);
37 let filename = src_path.file_name().unwrap();
38 if src_metadata.is_dir() {
39 rfs::symlink_dir(src_path, dst_dir.join(filename));
40 } else if src_metadata.is_file() {
41 rfs::symlink_file(src_path, dst_dir.join(filename));
42 } else if src_metadata.is_symlink() {
43 rfs::copy_symlink(src_path, dst_dir.join(filename));
44 }
45 });
46}
47
48fn recreate_dir(path: &Path) {
49 rfs::recursive_remove(path);
50 rfs::create_dir(path);
51}
52
53fn main() {
54 let sysroot = bare_rustc().print("sysroot").run().stdout_utf8();
55 let sysroot = sysroot.trim();
56 let sysroot = path(sysroot);
57
58 let incr = path("incr");
59
60 let fakeroot = path("fakeroot");
61 rfs::create_dir(&fakeroot);
62
63 shallow_symlink_dir(Symlink { src_dir: &sysroot, dst_dir: &fakeroot });
64 recreate_dir(&fakeroot.join("lib"));
65
66 shallow_symlink_dir(Symlink { src_dir: &sysroot.join("lib"), dst_dir: &fakeroot.join("lib") });
67 recreate_dir(&fakeroot.join("lib").join("rustlib"));
68
69 shallow_symlink_dir(Symlink {
70 src_dir: &sysroot.join("lib").join("rustlib"),
71 dst_dir: &fakeroot.join("lib").join("rustlib"),
72 });
73 recreate_dir(&fakeroot.join("lib").join("rustlib").join("src"));
74
75 shallow_symlink_dir(Symlink {
76 src_dir: &sysroot.join("lib").join("rustlib").join("src"),
77 dst_dir: &fakeroot.join("lib").join("rustlib").join("src"),
78 });
79
80 rfs::recursive_remove(&fakeroot.join("lib").join("rustlib").join("src").join("rust"));
81
82 let run_incr_rustc = || {
83 bare_rustc()
84 .sysroot(&fakeroot)
85 .arg("-C")
86 .arg(format!("incremental={}", incr.to_str().unwrap()))
87 .input("main.rs")
88 .run();
89 };
90
91 // Run rustc w/ incremental once...
92 run_incr_rustc();
93
94 // NOTE: the Makefile version of this used `$SYSROOT/lib/rustlib/src/rust/src/libstd/lib.rs`,
95 // but that actually got moved around and reorganized over the years. As of Dec 2024, the
96 // rust-src component is more like (specific for our purposes):
97 //
98 // ```
99 // $SYSROOT/lib/rustlib/src/rust/
100 // library/std/src/lib.rs
101 // src/
102 // ```
103 rfs::create_dir_all(
104 &fakeroot
105 .join("lib")
106 .join("rustlib")
107 .join("src")
108 .join("rust")
109 .join("library")
110 .join("std")
111 .join("src"),
112 );
113 rfs::write(
114 &fakeroot
115 .join("lib")
116 .join("rustlib")
117 .join("src")
118 .join("rust")
119 .join("library")
120 .join("std")
121 .join("src")
122 .join("lib.rs"),
123 b"",
124 );
125
126 // ... and a second time.
127 run_incr_rustc();
128
129 // Basic sanity check that the compiled binary can run.
130 run("main");
131}
tests/ui/error-emitter/multiline-removal-suggestion.rs created+58
...@@ -0,0 +1,58 @@
1// Make sure suggestion for removal of a span that covers multiple lines is properly highlighted.
2//@ compile-flags: --error-format=human --color=always
3//@ edition:2018
4//@ only-linux
5// ignore-tidy-tab
6// We use `\t` instead of spaces for indentation to ensure that the highlighting logic properly
7// accounts for replaced characters (like we do for `\t` with ` `). The naïve way of highlighting
8// could be counting chars of the original code, instead of operating on the code as it is being
9// displayed.
10use std::collections::{HashMap, HashSet};
11fn foo() -> Vec<(bool, HashSet<u8>)> {
12 let mut hm = HashMap::<bool, Vec<HashSet<u8>>>::new();
13 hm.into_iter()
14 .map(|(is_true, ts)| {
15 ts.into_iter()
16 .map(|t| {
17 (
18 is_true,
19 t,
20 )
21 }).flatten()
22 })
23 .flatten()
24 .collect()
25}
26fn bar() -> Vec<(bool, HashSet<u8>)> {
27 let mut hm = HashMap::<bool, Vec<HashSet<u8>>>::new();
28 hm.into_iter()
29 .map(|(is_true, ts)| {
30 ts.into_iter()
31 .map(|t| (is_true, t))
32 .flatten()
33 })
34 .flatten()
35 .collect()
36}
37fn baz() -> Vec<(bool, HashSet<u8>)> {
38 let mut hm = HashMap::<bool, Vec<HashSet<u8>>>::new();
39 hm.into_iter()
40 .map(|(is_true, ts)| {
41 ts.into_iter().map(|t| {
42 (is_true, t)
43 }).flatten()
44 })
45 .flatten()
46 .collect()
47}
48fn bay() -> Vec<(bool, HashSet<u8>)> {
49 let mut hm = HashMap::<bool, Vec<HashSet<u8>>>::new();
50 hm.into_iter()
51 .map(|(is_true, ts)| {
52 ts.into_iter()
53 .map(|t| (is_true, t)).flatten()
54 })
55 .flatten()
56 .collect()
57}
58fn main() {}
tests/ui/error-emitter/multiline-removal-suggestion.svg created+504
...@@ -0,0 +1,504 @@
1<svg width="1902px" height="4322px" xmlns="http://www.w3.org/2000/svg">
2 <style>
3 .fg { fill: #AAAAAA }
4 .bg { background: #000000 }
5 .fg-ansi256-009 { fill: #FF5555 }
6 .fg-ansi256-010 { fill: #55FF55 }
7 .fg-ansi256-012 { fill: #5555FF }
8 .fg-ansi256-014 { fill: #55FFFF }
9 .container {
10 padding: 0 10px;
11 line-height: 18px;
12 }
13 .bold { font-weight: bold; }
14 tspan {
15 font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
16 white-space: pre;
17 line-height: 18px;
18 }
19 </style>
20
21 <rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
22
23 <text xml:space="preserve" class="container fg">
24 <tspan x="10px" y="28px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
25</tspan>
26 <tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:21:8</tspan>
27</tspan>
28 <tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
29</tspan>
30 <tspan x="10px" y="82px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> }).flatten()</tspan>
31</tspan>
32 <tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
33</tspan>
34 <tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
35</tspan>
36 <tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet&lt;u8&gt;)`</tspan>
37</tspan>
38 <tspan x="10px" y="154px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet&lt;u8&gt;)` to implement `IntoIterator`</tspan>
39</tspan>
40 <tspan x="10px" y="172px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
41</tspan>
42 <tspan x="10px" y="190px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
43</tspan>
44 <tspan x="10px" y="208px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;` and `std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;: Iterator` trivially holds</tspan>
45</tspan>
46 <tspan x="10px" y="226px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
47</tspan>
48 <tspan x="10px" y="244px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- </tspan><tspan> ts.into_iter()</tspan>
49</tspan>
50 <tspan x="10px" y="262px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- .map(|t| {</tspan>
51</tspan>
52 <tspan x="10px" y="280px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- (</tspan>
53</tspan>
54 <tspan x="10px" y="298px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- is_true,</tspan>
55</tspan>
56 <tspan x="10px" y="316px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- t,</tspan>
57</tspan>
58 <tspan x="10px" y="334px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- )</tspan>
59</tspan>
60 <tspan x="10px" y="352px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- })</tspan><tspan>.flatten()</tspan>
61</tspan>
62 <tspan x="10px" y="370px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">+ </tspan><tspan> ts.into_iter().flatten()</tspan>
63</tspan>
64 <tspan x="10px" y="388px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
65</tspan>
66 <tspan x="10px" y="406px">
67</tspan>
68 <tspan x="10px" y="424px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
69</tspan>
70 <tspan x="10px" y="442px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:13:2</tspan>
71</tspan>
72 <tspan x="10px" y="460px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
73</tspan>
74 <tspan x="10px" y="478px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">/</tspan><tspan> hm.into_iter()</tspan>
75</tspan>
76 <tspan x="10px" y="496px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
77</tspan>
78 <tspan x="10px" y="514px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ts.into_iter()</tspan>
79</tspan>
80 <tspan x="10px" y="532px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|t| {</tspan>
81</tspan>
82 <tspan x="10px" y="550px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan>
83</tspan>
84 <tspan x="10px" y="568px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> }).flatten()</tspan>
85</tspan>
86 <tspan x="10px" y="586px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> })</tspan>
87</tspan>
88 <tspan x="10px" y="604px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|__________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
89</tspan>
90 <tspan x="10px" y="622px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
91</tspan>
92 <tspan x="10px" y="640px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet&lt;u8&gt;)`</tspan>
93</tspan>
94 <tspan x="10px" y="658px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet&lt;u8&gt;)` to implement `IntoIterator`</tspan>
95</tspan>
96 <tspan x="10px" y="676px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
97</tspan>
98 <tspan x="10px" y="694px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
99</tspan>
100 <tspan x="10px" y="712px">
101</tspan>
102 <tspan x="10px" y="730px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@multiline-removal-suggestion.rs:14:8}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
103</tspan>
104 <tspan x="10px" y="748px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:24:4</tspan>
105</tspan>
106 <tspan x="10px" y="766px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
107</tspan>
108 <tspan x="10px" y="784px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">/</tspan><tspan> hm.into_iter()</tspan>
109</tspan>
110 <tspan x="10px" y="802px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
111</tspan>
112 <tspan x="10px" y="820px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ts.into_iter()</tspan>
113</tspan>
114 <tspan x="10px" y="838px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|t| {</tspan>
115</tspan>
116 <tspan x="10px" y="856px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
117</tspan>
118 <tspan x="10px" y="874px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan>
119</tspan>
120 <tspan x="10px" y="892px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .collect()</tspan>
121</tspan>
122 <tspan x="10px" y="910px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">-</tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">method cannot be called due to unsatisfied trait bounds</tspan>
123</tspan>
124 <tspan x="10px" y="928px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________|</tspan>
125</tspan>
126 <tspan x="10px" y="946px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
127</tspan>
128 <tspan x="10px" y="964px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
129</tspan>
130 <tspan x="10px" y="982px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
131</tspan>
132 <tspan x="10px" y="1000px"><tspan> `&lt;Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}&gt;&gt; as IntoIterator&gt;::IntoIter = _`</tspan>
133</tspan>
134 <tspan x="10px" y="1018px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}&gt;&gt;: Iterator`</tspan>
135</tspan>
136 <tspan x="10px" y="1036px"><tspan> `&lt;Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}&gt;&gt; as IntoIterator&gt;::Item = _`</tspan>
137</tspan>
138 <tspan x="10px" y="1054px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}&gt;&gt;: Iterator`</tspan>
139</tspan>
140 <tspan x="10px" y="1072px"><tspan> `Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}&gt;&gt;: IntoIterator`</tspan>
141</tspan>
142 <tspan x="10px" y="1090px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}&gt;&gt;: Iterator`</tspan>
143</tspan>
144 <tspan x="10px" y="1108px"><tspan> `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}&gt;&gt;: Iterator`</tspan>
145</tspan>
146 <tspan x="10px" y="1126px"><tspan> which is required by `&amp;mut Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}&gt;&gt;: Iterator`</tspan>
147</tspan>
148 <tspan x="10px" y="1144px">
149</tspan>
150 <tspan x="10px" y="1162px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
151</tspan>
152 <tspan x="10px" y="1180px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:32:6</tspan>
153</tspan>
154 <tspan x="10px" y="1198px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
155</tspan>
156 <tspan x="10px" y="1216px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan>
157</tspan>
158 <tspan x="10px" y="1234px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
159</tspan>
160 <tspan x="10px" y="1252px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
161</tspan>
162 <tspan x="10px" y="1270px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet&lt;u8&gt;)`</tspan>
163</tspan>
164 <tspan x="10px" y="1288px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet&lt;u8&gt;)` to implement `IntoIterator`</tspan>
165</tspan>
166 <tspan x="10px" y="1306px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
167</tspan>
168 <tspan x="10px" y="1324px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
169</tspan>
170 <tspan x="10px" y="1342px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;` and `std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;: Iterator` trivially holds</tspan>
171</tspan>
172 <tspan x="10px" y="1360px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
173</tspan>
174 <tspan x="10px" y="1378px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- </tspan><tspan> ts.into_iter()</tspan>
175</tspan>
176 <tspan x="10px" y="1396px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- .map(|t| (is_true, t))</tspan>
177</tspan>
178 <tspan x="10px" y="1414px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">+ </tspan><tspan> ts.into_iter()</tspan>
179</tspan>
180 <tspan x="10px" y="1432px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
181</tspan>
182 <tspan x="10px" y="1450px">
183</tspan>
184 <tspan x="10px" y="1468px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
185</tspan>
186 <tspan x="10px" y="1486px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:28:2</tspan>
187</tspan>
188 <tspan x="10px" y="1504px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
189</tspan>
190 <tspan x="10px" y="1522px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">/</tspan><tspan> hm.into_iter()</tspan>
191</tspan>
192 <tspan x="10px" y="1540px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
193</tspan>
194 <tspan x="10px" y="1558px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ts.into_iter()</tspan>
195</tspan>
196 <tspan x="10px" y="1576px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|t| (is_true, t))</tspan>
197</tspan>
198 <tspan x="10px" y="1594px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .flatten()</tspan>
199</tspan>
200 <tspan x="10px" y="1612px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> })</tspan>
201</tspan>
202 <tspan x="10px" y="1630px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|__________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
203</tspan>
204 <tspan x="10px" y="1648px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
205</tspan>
206 <tspan x="10px" y="1666px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet&lt;u8&gt;)`</tspan>
207</tspan>
208 <tspan x="10px" y="1684px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet&lt;u8&gt;)` to implement `IntoIterator`</tspan>
209</tspan>
210 <tspan x="10px" y="1702px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
211</tspan>
212 <tspan x="10px" y="1720px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
213</tspan>
214 <tspan x="10px" y="1738px">
215</tspan>
216 <tspan x="10px" y="1756px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@multiline-removal-suggestion.rs:29:8}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
217</tspan>
218 <tspan x="10px" y="1774px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:35:4</tspan>
219</tspan>
220 <tspan x="10px" y="1792px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
221</tspan>
222 <tspan x="10px" y="1810px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">/</tspan><tspan> hm.into_iter()</tspan>
223</tspan>
224 <tspan x="10px" y="1828px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
225</tspan>
226 <tspan x="10px" y="1846px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ts.into_iter()</tspan>
227</tspan>
228 <tspan x="10px" y="1864px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|t| (is_true, t))</tspan>
229</tspan>
230 <tspan x="10px" y="1882px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
231</tspan>
232 <tspan x="10px" y="1900px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan>
233</tspan>
234 <tspan x="10px" y="1918px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .collect()</tspan>
235</tspan>
236 <tspan x="10px" y="1936px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">-</tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">method cannot be called due to unsatisfied trait bounds</tspan>
237</tspan>
238 <tspan x="10px" y="1954px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________|</tspan>
239</tspan>
240 <tspan x="10px" y="1972px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
241</tspan>
242 <tspan x="10px" y="1990px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
243</tspan>
244 <tspan x="10px" y="2008px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
245</tspan>
246 <tspan x="10px" y="2026px"><tspan> `&lt;Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}&gt;&gt; as IntoIterator&gt;::IntoIter = _`</tspan>
247</tspan>
248 <tspan x="10px" y="2044px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}&gt;&gt;: Iterator`</tspan>
249</tspan>
250 <tspan x="10px" y="2062px"><tspan> `&lt;Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}&gt;&gt; as IntoIterator&gt;::Item = _`</tspan>
251</tspan>
252 <tspan x="10px" y="2080px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}&gt;&gt;: Iterator`</tspan>
253</tspan>
254 <tspan x="10px" y="2098px"><tspan> `Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}&gt;&gt;: IntoIterator`</tspan>
255</tspan>
256 <tspan x="10px" y="2116px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}&gt;&gt;: Iterator`</tspan>
257</tspan>
258 <tspan x="10px" y="2134px"><tspan> `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}&gt;&gt;: Iterator`</tspan>
259</tspan>
260 <tspan x="10px" y="2152px"><tspan> which is required by `&amp;mut Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}&gt;&gt;: Iterator`</tspan>
261</tspan>
262 <tspan x="10px" y="2170px">
263</tspan>
264 <tspan x="10px" y="2188px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
265</tspan>
266 <tspan x="10px" y="2206px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:43:7</tspan>
267</tspan>
268 <tspan x="10px" y="2224px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
269</tspan>
270 <tspan x="10px" y="2242px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> }).flatten()</tspan>
271</tspan>
272 <tspan x="10px" y="2260px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
273</tspan>
274 <tspan x="10px" y="2278px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
275</tspan>
276 <tspan x="10px" y="2296px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet&lt;u8&gt;)`</tspan>
277</tspan>
278 <tspan x="10px" y="2314px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet&lt;u8&gt;)` to implement `IntoIterator`</tspan>
279</tspan>
280 <tspan x="10px" y="2332px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
281</tspan>
282 <tspan x="10px" y="2350px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
283</tspan>
284 <tspan x="10px" y="2368px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;` and `std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;: Iterator` trivially holds</tspan>
285</tspan>
286 <tspan x="10px" y="2386px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
287</tspan>
288 <tspan x="10px" y="2404px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- </tspan><tspan> ts.into_iter()</tspan><tspan class="fg-ansi256-009">.map(|t| {</tspan>
289</tspan>
290 <tspan x="10px" y="2422px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- (is_true, t)</tspan>
291</tspan>
292 <tspan x="10px" y="2440px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- })</tspan><tspan>.flatten()</tspan>
293</tspan>
294 <tspan x="10px" y="2458px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">+ </tspan><tspan> ts.into_iter().flatten()</tspan>
295</tspan>
296 <tspan x="10px" y="2476px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
297</tspan>
298 <tspan x="10px" y="2494px">
299</tspan>
300 <tspan x="10px" y="2512px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
301</tspan>
302 <tspan x="10px" y="2530px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:39:2</tspan>
303</tspan>
304 <tspan x="10px" y="2548px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
305</tspan>
306 <tspan x="10px" y="2566px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">/</tspan><tspan> hm.into_iter()</tspan>
307</tspan>
308 <tspan x="10px" y="2584px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
309</tspan>
310 <tspan x="10px" y="2602px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ts.into_iter().map(|t| {</tspan>
311</tspan>
312 <tspan x="10px" y="2620px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> (is_true, t)</tspan>
313</tspan>
314 <tspan x="10px" y="2638px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> }).flatten()</tspan>
315</tspan>
316 <tspan x="10px" y="2656px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> })</tspan>
317</tspan>
318 <tspan x="10px" y="2674px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|__________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
319</tspan>
320 <tspan x="10px" y="2692px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
321</tspan>
322 <tspan x="10px" y="2710px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet&lt;u8&gt;)`</tspan>
323</tspan>
324 <tspan x="10px" y="2728px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet&lt;u8&gt;)` to implement `IntoIterator`</tspan>
325</tspan>
326 <tspan x="10px" y="2746px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
327</tspan>
328 <tspan x="10px" y="2764px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
329</tspan>
330 <tspan x="10px" y="2782px">
331</tspan>
332 <tspan x="10px" y="2800px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@multiline-removal-suggestion.rs:40:8}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
333</tspan>
334 <tspan x="10px" y="2818px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:46:4</tspan>
335</tspan>
336 <tspan x="10px" y="2836px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
337</tspan>
338 <tspan x="10px" y="2854px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">/</tspan><tspan> hm.into_iter()</tspan>
339</tspan>
340 <tspan x="10px" y="2872px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
341</tspan>
342 <tspan x="10px" y="2890px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ts.into_iter().map(|t| {</tspan>
343</tspan>
344 <tspan x="10px" y="2908px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> (is_true, t)</tspan>
345</tspan>
346 <tspan x="10px" y="2926px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
347</tspan>
348 <tspan x="10px" y="2944px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan>
349</tspan>
350 <tspan x="10px" y="2962px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .collect()</tspan>
351</tspan>
352 <tspan x="10px" y="2980px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">-</tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">method cannot be called due to unsatisfied trait bounds</tspan>
353</tspan>
354 <tspan x="10px" y="2998px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________|</tspan>
355</tspan>
356 <tspan x="10px" y="3016px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
357</tspan>
358 <tspan x="10px" y="3034px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
359</tspan>
360 <tspan x="10px" y="3052px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
361</tspan>
362 <tspan x="10px" y="3070px"><tspan> `&lt;Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}&gt;&gt; as IntoIterator&gt;::IntoIter = _`</tspan>
363</tspan>
364 <tspan x="10px" y="3088px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}&gt;&gt;: Iterator`</tspan>
365</tspan>
366 <tspan x="10px" y="3106px"><tspan> `&lt;Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}&gt;&gt; as IntoIterator&gt;::Item = _`</tspan>
367</tspan>
368 <tspan x="10px" y="3124px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}&gt;&gt;: Iterator`</tspan>
369</tspan>
370 <tspan x="10px" y="3142px"><tspan> `Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}&gt;&gt;: IntoIterator`</tspan>
371</tspan>
372 <tspan x="10px" y="3160px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}&gt;&gt;: Iterator`</tspan>
373</tspan>
374 <tspan x="10px" y="3178px"><tspan> `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}&gt;&gt;: Iterator`</tspan>
375</tspan>
376 <tspan x="10px" y="3196px"><tspan> which is required by `&amp;mut Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}&gt;&gt;: Iterator`</tspan>
377</tspan>
378 <tspan x="10px" y="3214px">
379</tspan>
380 <tspan x="10px" y="3232px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
381</tspan>
382 <tspan x="10px" y="3250px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:53:28</tspan>
383</tspan>
384 <tspan x="10px" y="3268px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
385</tspan>
386 <tspan x="10px" y="3286px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan>
387</tspan>
388 <tspan x="10px" y="3304px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
389</tspan>
390 <tspan x="10px" y="3322px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
391</tspan>
392 <tspan x="10px" y="3340px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet&lt;u8&gt;)`</tspan>
393</tspan>
394 <tspan x="10px" y="3358px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet&lt;u8&gt;)` to implement `IntoIterator`</tspan>
395</tspan>
396 <tspan x="10px" y="3376px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `flatten`</tspan>
397</tspan>
398 <tspan x="10px" y="3394px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan>
399</tspan>
400 <tspan x="10px" y="3412px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;` and `std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;: Iterator` trivially holds</tspan>
401</tspan>
402 <tspan x="10px" y="3430px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
403</tspan>
404 <tspan x="10px" y="3448px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- </tspan><tspan> ts.into_iter()</tspan>
405</tspan>
406 <tspan x="10px" y="3466px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- .map(|t| (is_true, t))</tspan><tspan>.flatten()</tspan>
407</tspan>
408 <tspan x="10px" y="3484px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">+ </tspan><tspan> ts.into_iter().flatten()</tspan>
409</tspan>
410 <tspan x="10px" y="3502px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
411</tspan>
412 <tspan x="10px" y="3520px">
413</tspan>
414 <tspan x="10px" y="3538px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
415</tspan>
416 <tspan x="10px" y="3556px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:50:2</tspan>
417</tspan>
418 <tspan x="10px" y="3574px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
419</tspan>
420 <tspan x="10px" y="3592px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">/</tspan><tspan> hm.into_iter()</tspan>
421</tspan>
422 <tspan x="10px" y="3610px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
423</tspan>
424 <tspan x="10px" y="3628px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ts.into_iter()</tspan>
425</tspan>
426 <tspan x="10px" y="3646px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan>
427</tspan>
428 <tspan x="10px" y="3664px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> })</tspan>
429</tspan>
430 <tspan x="10px" y="3682px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|__________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet&lt;u8&gt;)` is not an iterator</tspan>
431</tspan>
432 <tspan x="10px" y="3700px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
433</tspan>
434 <tspan x="10px" y="3718px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet&lt;u8&gt;)`</tspan>
435</tspan>
436 <tspan x="10px" y="3736px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet&lt;u8&gt;)` to implement `IntoIterator`</tspan>
437</tspan>
438 <tspan x="10px" y="3754px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan>
439</tspan>
440 <tspan x="10px" y="3772px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan>
441</tspan>
442 <tspan x="10px" y="3790px">
443</tspan>
444 <tspan x="10px" y="3808px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@multiline-removal-suggestion.rs:51:8}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
445</tspan>
446 <tspan x="10px" y="3826px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:56:4</tspan>
447</tspan>
448 <tspan x="10px" y="3844px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
449</tspan>
450 <tspan x="10px" y="3862px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">/</tspan><tspan> hm.into_iter()</tspan>
451</tspan>
452 <tspan x="10px" y="3880px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan>
453</tspan>
454 <tspan x="10px" y="3898px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ts.into_iter()</tspan>
455</tspan>
456 <tspan x="10px" y="3916px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan>
457</tspan>
458 <tspan x="10px" y="3934px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> })</tspan>
459</tspan>
460 <tspan x="10px" y="3952px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan>
461</tspan>
462 <tspan x="10px" y="3970px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .collect()</tspan>
463</tspan>
464 <tspan x="10px" y="3988px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">-</tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">method cannot be called due to unsatisfied trait bounds</tspan>
465</tspan>
466 <tspan x="10px" y="4006px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________|</tspan>
467</tspan>
468 <tspan x="10px" y="4024px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
469</tspan>
470 <tspan x="10px" y="4042px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
471</tspan>
472 <tspan x="10px" y="4060px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan>
473</tspan>
474 <tspan x="10px" y="4078px"><tspan> `&lt;Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}&gt;&gt; as IntoIterator&gt;::IntoIter = _`</tspan>
475</tspan>
476 <tspan x="10px" y="4096px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}&gt;&gt;: Iterator`</tspan>
477</tspan>
478 <tspan x="10px" y="4114px"><tspan> `&lt;Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}&gt;&gt; as IntoIterator&gt;::Item = _`</tspan>
479</tspan>
480 <tspan x="10px" y="4132px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}&gt;&gt;: Iterator`</tspan>
481</tspan>
482 <tspan x="10px" y="4150px"><tspan> `Flatten&lt;Map&lt;std::vec::IntoIter&lt;HashSet&lt;u8&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}&gt;&gt;: IntoIterator`</tspan>
483</tspan>
484 <tspan x="10px" y="4168px"><tspan> which is required by `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}&gt;&gt;: Iterator`</tspan>
485</tspan>
486 <tspan x="10px" y="4186px"><tspan> `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}&gt;&gt;: Iterator`</tspan>
487</tspan>
488 <tspan x="10px" y="4204px"><tspan> which is required by `&amp;mut Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}&gt;&gt;: Iterator`</tspan>
489</tspan>
490 <tspan x="10px" y="4222px">
491</tspan>
492 <tspan x="10px" y="4240px"><tspan class="fg-ansi256-009 bold">error</tspan><tspan class="bold">: aborting due to 12 previous errors</tspan>
493</tspan>
494 <tspan x="10px" y="4258px">
495</tspan>
496 <tspan x="10px" y="4276px"><tspan class="bold">Some errors have detailed explanations: E0277, E0599.</tspan>
497</tspan>
498 <tspan x="10px" y="4294px"><tspan class="bold">For more information about an error, try `rustc --explain E0277`.</tspan>
499</tspan>
500 <tspan x="10px" y="4312px">
501</tspan>
502 </text>
503
504</svg>
tests/ui/panics/issue-47429-short-backtraces.rs+2
...@@ -9,6 +9,8 @@...@@ -9,6 +9,8 @@
9// This is needed to avoid test output differences across std being built with v0 symbols vs legacy9// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
10// symbols.10// symbols.
11//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"11//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
12// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997)
13//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
12// And this is for differences between std with and without debuginfo.14// And this is for differences between std with and without debuginfo.
13//@ normalize-stderr-test: "\n +at [^\n]+" -> ""15//@ normalize-stderr-test: "\n +at [^\n]+" -> ""
1416
tests/ui/panics/issue-47429-short-backtraces.run.stderr+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:24:5:1thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:26:5:
2explicit panic2explicit panic
3stack backtrace:3stack backtrace:
4 0: std::panicking::begin_panic4 0: std::panicking::begin_panic
tests/ui/panics/runtime-switch.rs+2
...@@ -9,6 +9,8 @@...@@ -9,6 +9,8 @@
9// This is needed to avoid test output differences across std being built with v0 symbols vs legacy9// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
10// symbols.10// symbols.
11//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"11//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
12// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997)
13//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
12// And this is for differences between std with and without debuginfo.14// And this is for differences between std with and without debuginfo.
13//@ normalize-stderr-test: "\n +at [^\n]+" -> ""15//@ normalize-stderr-test: "\n +at [^\n]+" -> ""
1416
tests/ui/panics/runtime-switch.run.stderr+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1thread 'main' panicked at $DIR/runtime-switch.rs:27:5:1thread 'main' panicked at $DIR/runtime-switch.rs:29:5:
2explicit panic2explicit panic
3stack backtrace:3stack backtrace:
4 0: std::panicking::begin_panic4 0: std::panicking::begin_panic
tests/ui/panics/short-ice-remove-middle-frames-2.rs+2
...@@ -12,6 +12,8 @@...@@ -12,6 +12,8 @@
12// This is needed to avoid test output differences across std being built with v0 symbols vs legacy12// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
13// symbols.13// symbols.
14//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"14//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
15// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997)
16//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
15// And this is for differences between std with and without debuginfo.17// And this is for differences between std with and without debuginfo.
16//@ normalize-stderr-test: "\n +at [^\n]+" -> ""18//@ normalize-stderr-test: "\n +at [^\n]+" -> ""
1719
tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:61:5:1thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:63:5:
2debug!!!2debug!!!
3stack backtrace:3stack backtrace:
4 0: std::panicking::begin_panic4 0: std::panicking::begin_panic
tests/ui/panics/short-ice-remove-middle-frames.rs+2
...@@ -13,6 +13,8 @@...@@ -13,6 +13,8 @@
13// This is needed to avoid test output differences across std being built with v0 symbols vs legacy13// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
14// symbols.14// symbols.
15//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"15//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
16// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997)
17//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
16// And this is for differences between std with and without debuginfo.18// And this is for differences between std with and without debuginfo.
17//@ normalize-stderr-test: "\n +at [^\n]+" -> ""19//@ normalize-stderr-test: "\n +at [^\n]+" -> ""
1820
tests/ui/panics/short-ice-remove-middle-frames.run.stderr+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:57:5:1thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:59:5:
2debug!!!2debug!!!
3stack backtrace:3stack backtrace:
4 0: std::panicking::begin_panic4 0: std::panicking::begin_panic