Skip to content

Commit ac7a752

Browse files
committed
Auto merge of #2723 - RalfJung:rustup, r=RalfJung
Rustup
2 parents a64c1fd + 69214c6 commit ac7a752

File tree

67 files changed

+83
-81
lines changed

Some content is hidden

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

67 files changed

+83
-81
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7701a7e7d4eed74a106f39fa64899dffd1e1025f
1+
e1c91213ff80af5b87a197b784b40bcbc8cf3add

src/diagnostics.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,9 @@ fn report_msg<'tcx>(
364364
if is_local && idx > 0 {
365365
err.span_note(frame_info.span, &frame_info.to_string());
366366
} else {
367-
err.note(&frame_info.to_string());
367+
let sm = sess.source_map();
368+
let span = sm.span_to_embeddable_string(frame_info.span);
369+
err.note(format!("{frame_info} at {span}"));
368370
}
369371
}
370372

tests/fail/abort-terminator.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | | }
1010
| |_^ the program aborted execution
1111
|
1212
= note: inside `panic_abort` at $DIR/abort-terminator.rs:LL:CC
13-
note: inside `main` at $DIR/abort-terminator.rs:LL:CC
13+
note: inside `main`
1414
--> $DIR/abort-terminator.rs:LL:CC
1515
|
1616
LL | panic_abort();

tests/fail/alloc/deallocate-bad-alignment.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
99
= note: BACKTRACE:
1010
= note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
11-
note: inside `main` at $DIR/deallocate-bad-alignment.rs:LL:CC
11+
note: inside `main`
1212
--> $DIR/deallocate-bad-alignment.rs:LL:CC
1313
|
1414
LL | dealloc(x, Layout::from_size_align_unchecked(1, 2));

tests/fail/alloc/deallocate-bad-size.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
99
= note: BACKTRACE:
1010
= note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
11-
note: inside `main` at $DIR/deallocate-bad-size.rs:LL:CC
11+
note: inside `main`
1212
--> $DIR/deallocate-bad-size.rs:LL:CC
1313
|
1414
LL | dealloc(x, Layout::from_size_align_unchecked(2, 1));

tests/fail/alloc/deallocate-twice.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
99
= note: BACKTRACE:
1010
= note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
11-
note: inside `main` at $DIR/deallocate-twice.rs:LL:CC
11+
note: inside `main`
1212
--> $DIR/deallocate-twice.rs:LL:CC
1313
|
1414
LL | dealloc(x, Layout::from_size_align_unchecked(1, 1));

tests/fail/alloc/global_system_mixup.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | FREE();
99
= note: BACKTRACE:
1010
= note: inside `std::sys::PLATFORM::alloc::<impl std::alloc::GlobalAlloc for std::alloc::System>::dealloc` at RUSTLIB/std/src/sys/PLATFORM/alloc.rs:LL:CC
1111
= note: inside `<std::alloc::System as std::alloc::Allocator>::deallocate` at RUSTLIB/std/src/alloc.rs:LL:CC
12-
note: inside `main` at $DIR/global_system_mixup.rs:LL:CC
12+
note: inside `main`
1313
--> $DIR/global_system_mixup.rs:LL:CC
1414
|
1515
LL | System.deallocate(ptr, l);

tests/fail/alloc/reallocate-bad-size.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) }
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
99
= note: BACKTRACE:
1010
= note: inside `std::alloc::realloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
11-
note: inside `main` at $DIR/reallocate-bad-size.rs:LL:CC
11+
note: inside `main`
1212
--> $DIR/reallocate-bad-size.rs:LL:CC
1313
|
1414
LL | let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1);

tests/fail/alloc/reallocate-dangling.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) }
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
99
= note: BACKTRACE:
1010
= note: inside `std::alloc::realloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
11-
note: inside `main` at $DIR/reallocate-dangling.rs:LL:CC
11+
note: inside `main`
1212
--> $DIR/reallocate-dangling.rs:LL:CC
1313
|
1414
LL | let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1);

tests/fail/alloc/stack_free.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
1212
= note: inside `alloc::alloc::box_free::<i32, std::alloc::Global>` at RUSTLIB/alloc/src/alloc.rs:LL:CC
1313
= note: inside `std::ptr::drop_in_place::<std::boxed::Box<i32>> - shim(Some(std::boxed::Box<i32>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
1414
= note: inside `std::mem::drop::<std::boxed::Box<i32>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC
15-
note: inside `main` at $DIR/stack_free.rs:LL:CC
15+
note: inside `main`
1616
--> $DIR/stack_free.rs:LL:CC
1717
|
1818
LL | drop(bad_box);

0 commit comments

Comments
 (0)