Skip to content

Commit 446d96c

Browse files
committed
Auto merge of #140588 - jieyouxu:opt-error, r=<try>
[EXPERIMENTAL] Alternative test adjustments r? `@ghost` try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: aarch64-apple try-job: x86_64-apple-1
2 parents f97b3c6 + b7ef8f6 commit 446d96c

File tree

5 files changed

+9
-24
lines changed

5 files changed

+9
-24
lines changed

tests/ui/cfg/cfg_false_no_std-2.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Error, the linked empty library is `no_std` and doesn't provide a panic handler.
22

3-
//@ dont-require-annotations: ERROR
43
//@ dont-check-compiler-stderr
4+
//@ compile-flags: -Cpanic=abort
55
//@ aux-build: cfg_false_lib_no_std_before.rs
66

77
#![no_std]
@@ -11,6 +11,3 @@ extern crate cfg_false_lib_no_std_before as _;
1111
fn main() {}
1212

1313
//~? ERROR `#[panic_handler]` function required, but not found
14-
// FIXME: This error is target-dependent, could be served by some "optional error" annotation
15-
// instead of `dont-require-annotations`.
16-
//FIXME~? ERROR unwinding panics are not supported without std
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
//FIXME~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
1+
//~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
2+
23
// Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
34
// causes a layout error.
45
// This version of the test already ICE'd before the commit that introduce the ICE described in
56
// https://github.com/rust-lang/rust/issues/94961.
67

7-
//@ compile-flags:-C debuginfo=2 --error-format=human
8+
//@ compile-flags:-C debuginfo=2
89
//@ build-fail
910
//@ error-pattern: values of the type `[u8; usize::MAX]` are too big for the target architecture
1011

@@ -17,6 +18,3 @@ pub enum Foo<T> {
1718
pub fn foo() -> usize {
1819
std::mem::size_of::<Foo<u8>>()
1920
}
20-
21-
// FIXME: the error is reported on different lines on different targets
22-
//FIXME~? ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// ignore-tidy-linelength
22
//@ build-fail
3-
//@ dont-require-annotations: ERROR
43
//@ dont-check-compiler-stderr
54
//@ aux-build:panic-runtime-unwind.rs
65
//@ aux-build:panic-runtime-unwind2.rs
76
//@ aux-build:panic-runtime-lang-items.rs
7+
//@ compile-flags: -Cpanic=unwind
88

99
#![no_std]
1010
#![no_main]
@@ -16,7 +16,3 @@ extern crate panic_runtime_lang_items;
1616
fn main() {}
1717

1818
//~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
19-
// FIXME: These errors are target-dependent, could be served by some "optional error" annotation
20-
// instead of `dont-require-annotations`.
21-
//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind2` is not compiled with this crate's panic strategy `abort`
22-
//FIXME~? ERROR the crate `panic_runtime_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// ignore-tidy-linelength
22
//@ build-fail
3-
//@ dont-require-annotations: ERROR
43
//@ dont-check-compiler-stderr
54
//@ aux-build:panic-runtime-unwind.rs
65
//@ compile-flags:-C panic=abort
@@ -10,7 +9,5 @@ extern crate panic_runtime_unwind;
109
fn main() {}
1110

1211
//~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
13-
// FIXME: These errors are target-dependent, could be served by some "optional error" annotation
14-
// instead of `dont-require-annotations`.
15-
//FIXME~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
16-
//FIXME~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
12+
//~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
13+
//~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// ignore-tidy-linelength
22
//@ build-fail
3-
//@ dont-require-annotations: ERROR
43
//@ dont-check-compiler-stderr
54
//@ aux-build:panic-runtime-unwind.rs
65
//@ aux-build:wants-panic-runtime-unwind.rs
@@ -11,7 +10,5 @@ extern crate wants_panic_runtime_unwind;
1110
fn main() {}
1211

1312
//~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
14-
// FIXME: These errors are target-dependent, could be served by some "optional error" annotation
15-
// instead of `dont-require-annotations`.
16-
//FIXME~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
17-
//FIXME~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
13+
//~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
14+
//~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`

0 commit comments

Comments
 (0)