Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_errors/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,7 @@ impl HumanEmitter {
if let Some(width) = self.diagnostic_width {
width.saturating_sub(code_offset)
} else if self.ui_testing || cfg!(miri) {
DEFAULT_COLUMN_WIDTH
DEFAULT_COLUMN_WIDTH.saturating_sub(code_offset)
} else {
termize::dimensions()
.map(|(w, _)| w.saturating_sub(code_offset))
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/tests/ui/option_env_unwrap.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LL | let _ = option_env!("PATH").expect("environment variable PATH isn't set
error: this will panic at run-time if the environment variable doesn't exist at compile-time
--> tests/ui/option_env_unwrap.rs:14:13
|
LL | let _ = option_env!("__Y__do_not_use").unwrap(); // This test only works if you don't have a __Y__do_not_use env variable in your env...
LL | let _ = option_env!("__Y__do_not_use").unwrap(); // This test only works if you don't have a __Y__do_not_use env variable in you...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using the `env!` macro instead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LL | | /// gravida non lacinia at, rhoncus eu lacus.
error: first doc comment paragraph is too long
--> tests/ui/too_long_first_doc_paragraph.rs:65:1
|
LL | / /// Some function. This doc-string paragraph is too long. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lore...
LL | / /// Some function. This doc-string paragraph is too long. Lorem Ipsum is simply dummy text of the printing and typesetting industr...
LL | |
LL | | ///
LL | | /// Here's a second paragraph. It would be preferable to put the details here.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: trying to join an already joined thread
--> tests/fail-dep/concurrency/libc_pthread_join_joined.rs:LL:CC
|
LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
LL | ... assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: trying to join a detached thread
--> tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC
|
LL | assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
LL | ... assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
Expand Down
14 changes: 7 additions & 7 deletions src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC
--> tests/fail/data_race/dealloc_read_race1.rs:LL:CC
|
LL | / __rust_dealloc(
LL | |
LL | | ptr.0 as *mut _,
LL | | std::mem::size_of::<usize>(),
LL | | std::mem::align_of::<usize>(),
LL | | );
| |_____________^ (2) just happened here
LL | / ... __rust_dealloc(
LL | | ...
LL | | ... ptr.0 as *mut _,
LL | | ... std::mem::size_of::<usize>(),
LL | | ... std::mem::align_of::<usize>(),
LL | | ... );
| |_______^ (2) just happened here
|
help: and (1) occurred earlier here
--> tests/fail/data_race/dealloc_read_race1.rs:LL:CC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC
--> tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC
|
LL | }
| ^ (2) just happened here
LL | ... }
| ^ (2) just happened here
|
help: and (1) occurred earlier here
--> tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC
Expand Down
14 changes: 7 additions & 7 deletions src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC
--> tests/fail/data_race/dealloc_write_race1.rs:LL:CC
|
LL | / __rust_dealloc(
LL | |
LL | | ptr.0 as *mut _,
LL | | std::mem::size_of::<usize>(),
LL | | std::mem::align_of::<usize>(),
LL | | );
| |_____________^ (2) just happened here
LL | / ... __rust_dealloc(
LL | | ...
LL | | ... ptr.0 as *mut _,
LL | | ... std::mem::size_of::<usize>(),
LL | | ... std::mem::align_of::<usize>(),
LL | | ... );
| |_______^ (2) just happened here
|
help: and (1) occurred earlier here
--> tests/fail/data_race/dealloc_write_race1.rs:LL:CC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC
--> tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC
|
LL | }
| ^ (2) just happened here
LL | ... }
| ^ (2) just happened here
|
help: and (1) occurred earlier here
--> tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC
Expand Down
4 changes: 2 additions & 2 deletions src/tools/miri/tests/fail/intrinsics/copy_unaligned.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: accessing memory with alignment ALIGN, but alignment ALIGN is required
--> tests/fail/intrinsics/copy_unaligned.rs:LL:CC
|
LL | std::intrinsics::copy_nonoverlapping(&data[5], ptr, 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
LL | ... std::intrinsics::copy_nonoverlapping(&data[5], ptr, 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
Expand Down
4 changes: 2 additions & 2 deletions src/tools/miri/tests/fail/intrinsics/simd-float-to-int.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: `simd_cast` intrinsic called on 3.40282347E+38f32 which cannot be represented in target type `i32`
--> tests/fail/intrinsics/simd-float-to-int.rs:LL:CC
|
LL | let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
LL | ... let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: Data race detected between (1) retag read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC
--> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC
|
LL | *p = 5;
| ^^^^^^ (2) just happened here
LL | ... *p = 5;
| ^^^^^^ (2) just happened here
|
help: and (1) occurred earlier here
--> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/async-await/async-drop/ex-ice1.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
error[E0423]: expected function, found module `core::future::async_drop`
--> $DIR/ex-ice1.rs:9:35
|
LL | let async_drop_fut = pin!(core::future::async_drop(async {}));
| ^^^^^^^^^^^^^^^^^^^^^^^^ not a function
LL | ... let async_drop_fut = pin!(core::future::async_drop(async {}));
| ^^^^^^^^^^^^^^^^^^^^^^^^ not a function

error[E0603]: module `async_drop` is private
--> $DIR/ex-ice1.rs:9:49
|
LL | let async_drop_fut = pin!(core::future::async_drop(async {}));
| ^^^^^^^^^^ private module
LL | ... let async_drop_fut = pin!(core::future::async_drop(async {}));
| ^^^^^^^^^^ private module
|
note: the module `async_drop` is defined here
--> $SRC_DIR/core/src/future/mod.rs:LL:COL
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/cast/func-pointer-issue-140491.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0605]: non-primitive cast: `&for<'a, 'b> fn(&'a Event<'b>) {my_fn}` as `&for<'a, 'b> fn(&'a Event<'b>)`
--> $DIR/func-pointer-issue-140491.rs:6:34
|
LL | ..._>) = &my_fn as _;
| ^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
LL | ... = &my_fn as _;
| ^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
|
= note: casting reference expression `&my_fn` because `&` binds tighter than `as`

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/consts/offset_ub.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ LL | pub const UNDERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (1 as *const u8).of
error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got ALLOC3-0x2 which points to before the beginning of the allocation
--> $DIR/offset_ub.rs:16:49
|
LL | ...*const u8 = unsafe { [0u8; 1].as_ptr().wrapping_offset(-2).offset(-2) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `NEGATIVE_OFFSET` failed here
LL | ...nst u8 = unsafe { [0u8; 1].as_ptr().wrapping_offset(-2).offset(-2) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `NEGATIVE_OFFSET` failed here

error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by 1 byte, but got ALLOC4 which is at or beyond the end of the allocation of size $BYTES bytes
--> $DIR/offset_ub.rs:18:50
Expand Down
24 changes: 12 additions & 12 deletions tests/ui/deprecation/deprecation-lint.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ LL | let _ = nested::DeprecatedStruct {
error: use of deprecated unit struct `deprecation_lint::nested::DeprecatedUnitStruct`: text
--> $DIR/deprecation-lint.rs:48:25
|
LL | let _ = nested::DeprecatedUnitStruct;
| ^^^^^^^^^^^^^^^^^^^^
LL | ... let _ = nested::DeprecatedUnitStruct;
| ^^^^^^^^^^^^^^^^^^^^

error: use of deprecated unit variant `deprecation_lint::nested::Enum::DeprecatedVariant`: text
--> $DIR/deprecation-lint.rs:50:31
Expand All @@ -97,8 +97,8 @@ LL | macro_test_arg!(deprecated_text());
error: use of deprecated function `deprecation_lint::deprecated_text`: text
--> $DIR/deprecation-lint.rs:60:41
|
LL | macro_test_arg!(macro_test_arg!(deprecated_text()));
| ^^^^^^^^^^^^^^^
LL | ... macro_test_arg!(macro_test_arg!(deprecated_text()));
| ^^^^^^^^^^^^^^^

error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text
--> $DIR/deprecation-lint.rs:65:16
Expand Down Expand Up @@ -211,8 +211,8 @@ LL | Trait::trait_deprecated_text(&foo);
error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/deprecation-lint.rs:261:25
|
LL | <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | ... <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^

error: use of deprecated function `this_crate::deprecated_future`: text
--> $DIR/deprecation-lint.rs:264:9
Expand Down Expand Up @@ -295,8 +295,8 @@ LL | Trait::trait_deprecated_text(&foo);
error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/deprecation-lint.rs:299:25
|
LL | <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | ... <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^

error: use of deprecated function `this_crate::test_fn_closure_body::{closure#0}::bar`
--> $DIR/deprecation-lint.rs:317:13
Expand Down Expand Up @@ -391,8 +391,8 @@ LL | foo.method_deprecated_text();
error: use of deprecated method `deprecation_lint::MethodTester::method_deprecated_text`: text
--> $DIR/deprecation-lint.rs:27:14
|
LL | Foo::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^
LL | ... Foo::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^

error: use of deprecated method `deprecation_lint::MethodTester::method_deprecated_text`: text
--> $DIR/deprecation-lint.rs:28:16
Expand Down Expand Up @@ -589,8 +589,8 @@ LL | Foo::method_deprecated_text(&foo);
error: use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text
--> $DIR/deprecation-lint.rs:257:16
|
LL | <Foo>::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^
LL | ... <Foo>::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^

error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/deprecation-lint.rs:258:13
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0369]: cannot add `&str` to `&str`
--> $DIR/non-1-width-unicode-multiline-label.rs:7:237
--> $DIR/non-1-width-unicode-multiline-label.rs:8:237
|
LL | ...👨👩👧👦👨👩👧👦👨👩👧👦👨👩👧👦👨👩👧👦"; let _a = unicode_is_fun + " really fun!";
| -------------- ^ -------------- &str
Expand All @@ -14,7 +14,7 @@ LL | let _ = "👨👩👧👦👨👩👧👦👨👩👧👦👨👩👧
| +++++++++++

error[E0369]: cannot add `&str` to `&str`
--> $DIR/non-1-width-unicode-multiline-label.rs:9:384
--> $DIR/non-1-width-unicode-multiline-label.rs:10:384
|
LL | ...👧👦👨👩👧👦👨👩👧👦"; let _a = unicode_is_fun + " really fun!";
| -------------- ^ -------------- &str
Expand All @@ -29,7 +29,7 @@ LL | let _ = "👨👩👧👦👨👩👧👦👨👩👧👦👨👩👧
| +++++++++++

error[E0369]: cannot add `&str` to `&str`
--> $DIR/non-1-width-unicode-multiline-label.rs:11:260
--> $DIR/non-1-width-unicode-multiline-label.rs:12:260
|
LL | ...࿇࿈࿉࿊࿋࿌࿍࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun + " really fun!";
| -------------- ^ -------------- &str
Expand All @@ -44,7 +44,7 @@ LL | let _ = "ༀ༁༂༃༄༅༆༇༈༉༊་༌།༎༏༐༑༒༓
| +++++++++++

error[E0369]: cannot add `&str` to `&str`
--> $DIR/non-1-width-unicode-multiline-label.rs:13:219
--> $DIR/non-1-width-unicode-multiline-label.rs:14:219
|
LL | ...xxxxxxxxxxxxxxxxxxxx"; let _a = unicode_is_fun + " really fun!";
| -------------- ^ -------------- &str
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ revisions: ascii unicode
//@ compile-flags: --diagnostic-width=145
//@[unicode] compile-flags: -Zunstable-options --error-format=human-unicode
// ignore-tidy-linelength

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0369]: cannot add `&str` to `&str`
╭▸ $DIR/non-1-width-unicode-multiline-label.rs:7:237
╭▸ $DIR/non-1-width-unicode-multiline-label.rs:8:237
LL │ …👧👦👨👩👧👦👨👩👧👦👨👩👧👦👨👩👧👦👨👩👧👦"; let _a = unicode_is_fun + " really fun!";
│ ┬───────────── ┯ ────────────── &str
Expand All @@ -14,7 +14,7 @@ LL │ let _ = "👨👩👧👦👨👩👧👦👨👩👧👦👨👩👧
╰╴ +++++++++++

error[E0369]: cannot add `&str` to `&str`
╭▸ $DIR/non-1-width-unicode-multiline-label.rs:9:384
╭▸ $DIR/non-1-width-unicode-multiline-label.rs:10:384
LL │ …👨👩👧👦👨👩👧👦👨👩👧👦"; let _a = unicode_is_fun + " really fun!";
│ ┬───────────── ┯ ────────────── &str
Expand All @@ -29,7 +29,7 @@ LL │ let _ = "👨👩👧👦👨👩👧👦👨👩👧👦👨👩👧
╰╴ +++++++++++

error[E0369]: cannot add `&str` to `&str`
╭▸ $DIR/non-1-width-unicode-multiline-label.rs:11:260
╭▸ $DIR/non-1-width-unicode-multiline-label.rs:12:260
LL │ …࿅࿆࿇࿈࿉࿊࿋࿌࿍࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun + " really fun!";
│ ┬───────────── ┯ ────────────── &str
Expand All @@ -44,7 +44,7 @@ LL │ let _ = "ༀ༁༂༃༄༅༆༇༈༉༊་༌།༎༏༐༑༒༓
╰╴ +++++++++++

error[E0369]: cannot add `&str` to `&str`
╭▸ $DIR/non-1-width-unicode-multiline-label.rs:13:219
╭▸ $DIR/non-1-width-unicode-multiline-label.rs:14:219
LL │ …xxxxxxxxxxxxxxxxxxxxxx"; let _a = unicode_is_fun + " really fun!";
│ ┬───────────── ┯ ────────────── &str
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/non-whitespace-trimming-2.rs:6:311
--> $DIR/non-whitespace-trimming-2.rs:7:311
|
LL | ...13; let _: usize = 14; let _: usize = 15; let _: () = 42; let _: usize = 0; let _: usize = 1; let _: usize = 2; let _: usize = 3; let ...
| -- ^^ expected `()`, found integer
Expand Down
1 change: 1 addition & 0 deletions tests/ui/diagnostic-width/non-whitespace-trimming-2.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ revisions: ascii unicode
//@ compile-flags: --diagnostic-width=145
//@[unicode] compile-flags: -Zunstable-options --error-format=human-unicode
// ignore-tidy-linelength

Expand Down
Loading
Loading