Skip to content

Commit 411e645

Browse files
committed
adjust how closure/generator types and rvalues are printed
1 parent 5ede940 commit 411e645

File tree

192 files changed

+477
-477
lines changed

Some content is hidden

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

192 files changed

+477
-477
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
@@ -2174,11 +2174,11 @@ impl<'tcx> Debug for Rvalue<'tcx> {
21742174
AggregateKind::Closure(def_id, args) => ty::tls::with(|tcx| {
21752175
let name = if tcx.sess.opts.unstable_opts.span_free_formats {
21762176
let args = tcx.lift(args).unwrap();
2177-
format!("[closure@{}]", tcx.def_path_str_with_args(def_id, args),)
2177+
format!("{{closure@{}}}", tcx.def_path_str_with_args(def_id, args),)
21782178
} else {
21792179
let span = tcx.def_span(def_id);
21802180
format!(
2181-
"[closure@{}]",
2181+
"{{closure@{}}}",
21822182
tcx.sess.source_map().span_to_diagnostic_string(span)
21832183
)
21842184
};
@@ -2202,7 +2202,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
22022202
}),
22032203

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

22082208
// 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
@@ -797,7 +797,7 @@ pub trait PrettyPrinter<'tcx>:
797797
}
798798
ty::Str => p!("str"),
799799
ty::Generator(did, args, movability) => {
800-
p!(write("["));
800+
p!(write("{{"));
801801
let generator_kind = self.tcx().generator_kind(did).unwrap();
802802
let should_print_movability =
803803
self.should_print_verbose() || generator_kind == hir::GeneratorKind::Gen;
@@ -838,13 +838,13 @@ pub trait PrettyPrinter<'tcx>:
838838
}
839839
}
840840

841-
p!("]")
841+
p!("}}")
842842
}
843843
ty::GeneratorWitness(types) => {
844844
p!(in_binder(&types));
845845
}
846846
ty::GeneratorWitnessMIR(did, args) => {
847-
p!(write("["));
847+
p!(write("{{"));
848848
if !self.tcx().sess.verbose() {
849849
p!("generator witness");
850850
// FIXME(eddyb) should use `def_span`.
@@ -863,10 +863,10 @@ pub trait PrettyPrinter<'tcx>:
863863
p!(print_def_path(did, args));
864864
}
865865

866-
p!("]")
866+
p!("}}")
867867
}
868868
ty::Closure(did, args) => {
869-
p!(write("["));
869+
p!(write("{{"));
870870
if !self.should_print_verbose() {
871871
p!(write("closure"));
872872
// FIXME(eddyb) should use `def_span`.
@@ -906,7 +906,7 @@ pub trait PrettyPrinter<'tcx>:
906906
p!(")");
907907
}
908908
}
909-
p!("]");
909+
p!("}}");
910910
}
911911
ty::Array(ty, sz) => p!("[", print(ty), "; ", print(sz), "]"),
912912
ty::Slice(ty) => p!("[", print(ty), "]"),
@@ -1063,7 +1063,7 @@ pub trait PrettyPrinter<'tcx>:
10631063
}
10641064

10651065
for (assoc_item_def_id, term) in assoc_items {
1066-
// Skip printing `<[generator@] as Generator<_>>::Return` from async blocks,
1066+
// Skip printing `<{generator@} as Generator<_>>::Return` from async blocks,
10671067
// unless we can find out what generator return type it comes from.
10681068
let term = if let Some(ty) = term.skip_binder().ty()
10691069
&& 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
@@ -2536,7 +2536,7 @@ impl<'tcx> Ty<'tcx> {
25362536

25372537
/// Checks whether a type recursively contains any closure
25382538
///
2539-
/// Example: `Option<[[email protected]:4:20]>` returns true
2539+
/// Example: `Option<{[email protected]:4:20}>` returns true
25402540
pub fn contains_closure(self) -> bool {
25412541
struct ContainsClosureVisitor;
25422542

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)