Skip to content

Commit 959b2c7

Browse files
committed
Auto merge of #115696 - RalfJung:closure-ty-print, r=oli-obk
adjust how closure/generator types are printed I saw `&[closure@$DIR/issue-20862.rs:2:5]` and I thought it is a slice type, because that's usually what `&[_]` is... it took me a while to realize that this is just a confusing printer and actually there's no slice. Let's use something that cannot be mistaken for a regular type.
2 parents 0190394 + c4ec12f commit 959b2c7

File tree

191 files changed

+475
-475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+475
-475
lines changed

Diff for: compiler/rustc_infer/src/infer/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
16161616
// | expected `()`, found closure
16171617
// |
16181618
// = note: expected unit type `()`
1619-
// found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]`
1619+
// found closure `{closure@$DIR/issue-20862.rs:2:5: 2:14 x:_}`
16201620
//
16211621
// Also ignore opaque `Future`s that come from async fns.
16221622
if !self.ignore_span.overlaps(span)

Diff for: compiler/rustc_middle/src/mir/pretty.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1001,11 +1001,11 @@ impl<'tcx> Debug for Rvalue<'tcx> {
10011001
AggregateKind::Closure(def_id, args) => ty::tls::with(|tcx| {
10021002
let name = if tcx.sess.opts.unstable_opts.span_free_formats {
10031003
let args = tcx.lift(args).unwrap();
1004-
format!("[closure@{}]", tcx.def_path_str_with_args(def_id, args),)
1004+
format!("{{closure@{}}}", tcx.def_path_str_with_args(def_id, args),)
10051005
} else {
10061006
let span = tcx.def_span(def_id);
10071007
format!(
1008-
"[closure@{}]",
1008+
"{{closure@{}}}",
10091009
tcx.sess.source_map().span_to_diagnostic_string(span)
10101010
)
10111011
};
@@ -1029,7 +1029,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
10291029
}),
10301030

10311031
AggregateKind::Generator(def_id, _, _) => ty::tls::with(|tcx| {
1032-
let name = format!("[generator@{:?}]", tcx.def_span(def_id));
1032+
let name = format!("{{generator@{:?}}}", tcx.def_span(def_id));
10331033
let mut struct_fmt = fmt.debug_struct(&name);
10341034

10351035
// FIXME(project-rfc-2229#48): This should be a list of capture names/places

Diff for: compiler/rustc_middle/src/ty/print/pretty.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ pub trait PrettyPrinter<'tcx>:
795795
}
796796
ty::Str => p!("str"),
797797
ty::Generator(did, args, movability) => {
798-
p!(write("["));
798+
p!(write("{{"));
799799
let generator_kind = self.tcx().generator_kind(did).unwrap();
800800
let should_print_movability =
801801
self.should_print_verbose() || generator_kind == hir::GeneratorKind::Gen;
@@ -836,13 +836,13 @@ pub trait PrettyPrinter<'tcx>:
836836
}
837837
}
838838

839-
p!("]")
839+
p!("}}")
840840
}
841841
ty::GeneratorWitness(types) => {
842842
p!(in_binder(&types));
843843
}
844844
ty::GeneratorWitnessMIR(did, args) => {
845-
p!(write("["));
845+
p!(write("{{"));
846846
if !self.tcx().sess.verbose() {
847847
p!("generator witness");
848848
// FIXME(eddyb) should use `def_span`.
@@ -861,10 +861,10 @@ pub trait PrettyPrinter<'tcx>:
861861
p!(print_def_path(did, args));
862862
}
863863

864-
p!("]")
864+
p!("}}")
865865
}
866866
ty::Closure(did, args) => {
867-
p!(write("["));
867+
p!(write("{{"));
868868
if !self.should_print_verbose() {
869869
p!(write("closure"));
870870
// FIXME(eddyb) should use `def_span`.
@@ -904,7 +904,7 @@ pub trait PrettyPrinter<'tcx>:
904904
p!(")");
905905
}
906906
}
907-
p!("]");
907+
p!("}}");
908908
}
909909
ty::Array(ty, sz) => p!("[", print(ty), "; ", print(sz), "]"),
910910
ty::Slice(ty) => p!("[", print(ty), "]"),
@@ -1061,7 +1061,7 @@ pub trait PrettyPrinter<'tcx>:
10611061
}
10621062

10631063
for (assoc_item_def_id, term) in assoc_items {
1064-
// Skip printing `<[generator@] as Generator<_>>::Return` from async blocks,
1064+
// Skip printing `<{generator@} as Generator<_>>::Return` from async blocks,
10651065
// unless we can find out what generator return type it comes from.
10661066
let term = if let Some(ty) = term.skip_binder().ty()
10671067
&& let ty::Alias(ty::Projection, proj) = ty.kind()

Diff for: compiler/rustc_middle/src/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2550,7 +2550,7 @@ impl<'tcx> Ty<'tcx> {
25502550

25512551
/// Checks whether a type recursively contains any closure
25522552
///
2553-
/// Example: `Option<[[email protected]:4:20]>` returns true
2553+
/// Example: `Option<{[email protected]:4:20}>` returns true
25542554
pub fn contains_closure(self) -> bool {
25552555
struct ContainsClosureVisitor;
25562556

Diff for: src/tools/clippy/tests/ui/box_default.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn main() {
3636
issue_10381();
3737

3838
// `Box::<Option<_>>::default()` would be valid here, but not `Box::default()` or
39-
// `Box::<Option<[closure@...]>::default()`
39+
// `Box::<Option<{closure@...}>::default()`
4040
//
4141
// Would have a suggestion after https://github.com/rust-lang/rust/blob/fdd030127cc68afec44a8d3f6341525dd34e50ae/compiler/rustc_middle/src/ty/diagnostics.rs#L554-L563
4242
let mut unnameable = Box::new(Option::default());

Diff for: src/tools/clippy/tests/ui/box_default.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn main() {
3636
issue_10381();
3737

3838
// `Box::<Option<_>>::default()` would be valid here, but not `Box::default()` or
39-
// `Box::<Option<[closure@...]>::default()`
39+
// `Box::<Option<{closure@...}>::default()`
4040
//
4141
// Would have a suggestion after https://github.com/rust-lang/rust/blob/fdd030127cc68afec44a8d3f6341525dd34e50ae/compiler/rustc_middle/src/ty/diagnostics.rs#L554-L563
4242
let mut unnameable = Box::new(Option::default());

Diff for: src/tools/clippy/tests/ui/crashes/ice-6251.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ LL | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| x }]> {
2727
| ^^^^^^^^^^^ expected `usize`, found closure
2828
|
2929
= note: expected type `usize`
30-
found closure `[closure@$DIR/ice-6251.rs:4:44: 4:53]`
30+
found closure `{closure@$DIR/ice-6251.rs:4:44: 4:53}`
3131

3232
error: aborting due to 3 previous errors
3333

Diff for: src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ note: inside closure
2424
|
2525
LL | || drop(Box::from_raw(ptr)),
2626
| ^^^^^^^^^^^^^^^^^^
27-
note: inside `dealloc_while_running::<[closure@$DIR/newtype_pair_retagging.rs:LL:CC]>`
27+
note: inside `dealloc_while_running::<{closure@$DIR/newtype_pair_retagging.rs:LL:CC}>`
2828
--> $DIR/newtype_pair_retagging.rs:LL:CC
2929
|
3030
LL | dealloc();

Diff for: src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ note: inside closure
3535
|
3636
LL | || drop(Box::from_raw(ptr)),
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^
38-
note: inside `dealloc_while_running::<[closure@$DIR/newtype_pair_retagging.rs:LL:CC]>`
38+
note: inside `dealloc_while_running::<{closure@$DIR/newtype_pair_retagging.rs:LL:CC}>`
3939
--> $DIR/newtype_pair_retagging.rs:LL:CC
4040
|
4141
LL | dealloc();

Diff for: src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ note: inside closure
2424
|
2525
LL | || drop(Box::from_raw(ptr)),
2626
| ^^^^^^^^^^^^^^^^^^
27-
note: inside `dealloc_while_running::<[closure@$DIR/newtype_retagging.rs:LL:CC]>`
27+
note: inside `dealloc_while_running::<{closure@$DIR/newtype_retagging.rs:LL:CC}>`
2828
--> $DIR/newtype_retagging.rs:LL:CC
2929
|
3030
LL | dealloc();

Diff for: src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ note: inside closure
3535
|
3636
LL | || drop(Box::from_raw(ptr)),
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^
38-
note: inside `dealloc_while_running::<[closure@$DIR/newtype_retagging.rs:LL:CC]>`
38+
note: inside `dealloc_while_running::<{closure@$DIR/newtype_retagging.rs:LL:CC}>`
3939
--> $DIR/newtype_retagging.rs:LL:CC
4040
|
4141
LL | dealloc();

Diff for: src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LL | ABORT();
1414
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
1515
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1616
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
17-
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
17+
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
1818
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
1919
= note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC
2020
= note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC

Diff for: src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LL | ABORT();
1414
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
1515
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1616
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
17-
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
17+
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
1818
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
1919
= note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC
2020
= note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC

Diff for: src/tools/miri/tests/fail/generator-pinned-moved.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ LL | }; // *deallocate* generator_iterator
1818
| ^
1919
= note: BACKTRACE (of the first span):
2020
= note: inside closure at $DIR/generator-pinned-moved.rs:LL:CC
21-
note: inside `<GeneratorIteratorAdapter<[static generator@$DIR/generator-pinned-moved.rs:LL:CC]> as std::iter::Iterator>::next`
21+
note: inside `<GeneratorIteratorAdapter<{static generator@$DIR/generator-pinned-moved.rs:LL:CC}> as std::iter::Iterator>::next`
2222
--> $DIR/generator-pinned-moved.rs:LL:CC
2323
|
2424
LL | match me.resume(()) {
2525
| ^^^^^^^^^^^^^
26-
= note: inside `<std::boxed::Box<GeneratorIteratorAdapter<[static generator@$DIR/generator-pinned-moved.rs:LL:CC]>> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC
26+
= note: inside `<std::boxed::Box<GeneratorIteratorAdapter<{static generator@$DIR/generator-pinned-moved.rs:LL:CC}>> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC
2727
note: inside `main`
2828
--> $DIR/generator-pinned-moved.rs:LL:CC
2929
|

Diff for: src/tools/miri/tests/fail/intrinsics/uninit_uninhabited_type.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | ABORT();
1111
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
1212
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1313
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
14-
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
14+
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
1515
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
1616
= note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC
1717
note: inside `main`

Diff for: src/tools/miri/tests/fail/intrinsics/zero_fn_ptr.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | ABORT();
1111
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
1212
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1313
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
14-
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
14+
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
1515
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
1616
= note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC
1717
note: inside `main`

Diff for: src/tools/miri/tests/fail/panic/bad_unwind.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ LL | std::panic::catch_unwind(|| unwind()).unwrap_err();
1111
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
1212
= note: BACKTRACE:
1313
= note: inside closure at $DIR/bad_unwind.rs:LL:CC
14-
= note: inside `std::panicking::r#try::do_call::<[closure@$DIR/bad_unwind.rs:LL:CC], ()>` at RUSTLIB/std/src/panicking.rs:LL:CC
15-
= note: inside `std::panicking::r#try::<(), [closure@$DIR/bad_unwind.rs:LL:CC]>` at RUSTLIB/std/src/panicking.rs:LL:CC
16-
= note: inside `std::panic::catch_unwind::<[closure@$DIR/bad_unwind.rs:LL:CC], ()>` at RUSTLIB/std/src/panic.rs:LL:CC
14+
= note: inside `std::panicking::r#try::do_call::<{closure@$DIR/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC
15+
= note: inside `std::panicking::r#try::<(), {closure@$DIR/bad_unwind.rs:LL:CC}>` at RUSTLIB/std/src/panicking.rs:LL:CC
16+
= note: inside `std::panic::catch_unwind::<{closure@$DIR/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panic.rs:LL:CC
1717
note: inside `main`
1818
--> $DIR/bad_unwind.rs:LL:CC
1919
|

Diff for: src/tools/miri/tests/fail/panic/double_panic.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LL | ABORT();
1616
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
1717
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1818
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
19-
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
19+
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
2020
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
2121
= note: inside `core::panicking::panic_nounwind_nobacktrace` at RUSTLIB/core/src/panicking.rs:LL:CC
2222
= note: inside `core::panicking::panic_in_cleanup` at RUSTLIB/core/src/panicking.rs:LL:CC

Diff for: src/tools/miri/tests/fail/panic/panic_abort1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | ABORT();
1212
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
1313
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1414
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
15-
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
15+
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
1616
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
1717
note: inside `main`
1818
--> $DIR/panic_abort1.rs:LL:CC

Diff for: src/tools/miri/tests/fail/panic/panic_abort2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | ABORT();
1212
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
1313
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1414
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
15-
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
15+
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
1616
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
1717
note: inside `main`
1818
--> $DIR/panic_abort2.rs:LL:CC

Diff for: src/tools/miri/tests/fail/panic/panic_abort3.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | ABORT();
1212
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
1313
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1414
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
15-
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
15+
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
1616
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
1717
note: inside `main`
1818
--> $DIR/panic_abort3.rs:LL:CC

Diff for: src/tools/miri/tests/fail/panic/panic_abort4.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | ABORT();
1212
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
1313
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1414
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
15-
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
15+
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
1616
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
1717
note: inside `main`
1818
--> $DIR/panic_abort4.rs:LL:CC

Diff for: src/tools/miri/tests/fail/shims/fs/isolated_file.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode a
88
= help: or pass `-Zmiri-isolation-error=warn` to configure Miri to return an error code from isolated operations (if supported for that operation) and continue with a warning
99
= note: BACKTRACE:
1010
= note: inside closure at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC
11-
= note: inside `std::sys::PLATFORM::cvt_r::<i32, [closure@std::sys::PLATFORM::fs::File::open_c::{closure#0}]>` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
11+
= note: inside `std::sys::PLATFORM::cvt_r::<i32, {closure@std::sys::PLATFORM::fs::File::open_c::{closure#0}}>` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
1212
= note: inside `std::sys::PLATFORM::fs::File::open_c` at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC
1313
= note: inside closure at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC
14-
= note: inside `std::sys::PLATFORM::small_c_string::run_with_cstr::<std::sys::PLATFORM::fs::File, [closure@std::sys::PLATFORM::fs::File::open::{closure#0}]>` at RUSTLIB/std/src/sys/PLATFORM/small_c_string.rs:LL:CC
15-
= note: inside `std::sys::PLATFORM::small_c_string::run_path_with_cstr::<std::sys::PLATFORM::fs::File, [closure@std::sys::PLATFORM::fs::File::open::{closure#0}]>` at RUSTLIB/std/src/sys/PLATFORM/small_c_string.rs:LL:CC
14+
= note: inside `std::sys::PLATFORM::small_c_string::run_with_cstr::<std::sys::PLATFORM::fs::File, {closure@std::sys::PLATFORM::fs::File::open::{closure#0}}>` at RUSTLIB/std/src/sys/PLATFORM/small_c_string.rs:LL:CC
15+
= note: inside `std::sys::PLATFORM::small_c_string::run_path_with_cstr::<std::sys::PLATFORM::fs::File, {closure@std::sys::PLATFORM::fs::File::open::{closure#0}}>` at RUSTLIB/std/src/sys/PLATFORM/small_c_string.rs:LL:CC
1616
= note: inside `std::sys::PLATFORM::fs::File::open` at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC
1717
= note: inside `std::fs::OpenOptions::_open` at RUSTLIB/std/src/fs.rs:LL:CC
1818
= note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at RUSTLIB/std/src/fs.rs:LL:CC

Diff for: src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ note: inside closure
1717
|
1818
LL | drop(unsafe { Box::from_raw(raw) });
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20-
= note: inside `<[closure@$DIR/deallocate_against_protector1.rs:LL:CC] as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
20+
= note: inside `<{closure@$DIR/deallocate_against_protector1.rs:LL:CC} as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
2121
note: inside `inner`
2222
--> $DIR/deallocate_against_protector1.rs:LL:CC
2323
|

0 commit comments

Comments
 (0)