Skip to content

Commit aa50cde

Browse files
committed
adjust how closure/generator types and rvalues are printed
1 parent 42dead4 commit aa50cde

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

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)

compiler/rustc_middle/src/mir/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2215,11 +2215,11 @@ impl<'tcx> Debug for Rvalue<'tcx> {
22152215
AggregateKind::Closure(def_id, args) => ty::tls::with(|tcx| {
22162216
let name = if tcx.sess.opts.unstable_opts.span_free_formats {
22172217
let args = tcx.lift(args).unwrap();
2218-
format!("[closure@{}]", tcx.def_path_str_with_args(def_id, args),)
2218+
format!("{{closure@{}}}", tcx.def_path_str_with_args(def_id, args),)
22192219
} else {
22202220
let span = tcx.def_span(def_id);
22212221
format!(
2222-
"[closure@{}]",
2222+
"{{closure@{}}}",
22232223
tcx.sess.source_map().span_to_diagnostic_string(span)
22242224
)
22252225
};
@@ -2243,7 +2243,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
22432243
}),
22442244

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

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

compiler/rustc_middle/src/ty/print/pretty.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ pub trait PrettyPrinter<'tcx>:
800800
}
801801
ty::Str => p!("str"),
802802
ty::Generator(did, args, movability) => {
803-
p!(write("["));
803+
p!(write("{{"));
804804
let generator_kind = self.tcx().generator_kind(did).unwrap();
805805
let should_print_movability =
806806
self.should_print_verbose() || generator_kind == hir::GeneratorKind::Gen;
@@ -841,13 +841,13 @@ pub trait PrettyPrinter<'tcx>:
841841
}
842842
}
843843

844-
p!("]")
844+
p!("}}")
845845
}
846846
ty::GeneratorWitness(types) => {
847847
p!(in_binder(&types));
848848
}
849849
ty::GeneratorWitnessMIR(did, args) => {
850-
p!(write("["));
850+
p!(write("{{"));
851851
if !self.tcx().sess.verbose() {
852852
p!("generator witness");
853853
// FIXME(eddyb) should use `def_span`.
@@ -866,10 +866,10 @@ pub trait PrettyPrinter<'tcx>:
866866
p!(print_def_path(did, args));
867867
}
868868

869-
p!("]")
869+
p!("}}")
870870
}
871871
ty::Closure(did, args) => {
872-
p!(write("["));
872+
p!(write("{{"));
873873
if !self.should_print_verbose() {
874874
p!(write("closure"));
875875
// FIXME(eddyb) should use `def_span`.
@@ -909,7 +909,7 @@ pub trait PrettyPrinter<'tcx>:
909909
p!(")");
910910
}
911911
}
912-
p!("]");
912+
p!("}}");
913913
}
914914
ty::Array(ty, sz) => p!("[", print(ty), "; ", print(sz), "]"),
915915
ty::Slice(ty) => p!("[", print(ty), "]"),
@@ -1066,7 +1066,7 @@ pub trait PrettyPrinter<'tcx>:
10661066
}
10671067

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

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

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());

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());

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

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();

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();

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();

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();

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

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

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
|

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`

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`

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
|

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

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

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

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

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

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

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)