about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-02 18:13:53 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-03 11:08:55 +0300
commit4916d44b59a2b5347506b4551b389fe902bdf54b (patch)
treec213e08f35d129db237fe99fb5c80b90b2f55971
parent4d649906900cd833b0680f53b8c197b087711a4a (diff)
downloadrust-4916d44b59a2b5347506b4551b389fe902bdf54b.tar.gz
rust-4916d44b59a2b5347506b4551b389fe902bdf54b.zip
Fix up tests on wasm and msvc, and rebase conflicts
Can be fixed properly later by adding a new flag for non-exhaustive line annotation checking

-rw-r--r--tests/ui/cfg/cfg_false_no_std-2.rs7
-rw-r--r--tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs8
-rw-r--r--tests/ui/panic-runtime/two-panic-runtimes.rs8
-rw-r--r--tests/ui/panic-runtime/unwind-tables-target-required.rs3
-rw-r--r--tests/ui/panic-runtime/want-abort-got-unwind.rs10
-rw-r--r--tests/ui/panic-runtime/want-abort-got-unwind2.rs10
-rw-r--r--tests/ui/print-request/stability.rs2
7 files changed, 35 insertions, 13 deletions
diff --git a/tests/ui/cfg/cfg_false_no_std-2.rs b/tests/ui/cfg/cfg_false_no_std-2.rs
index fa6042f5892..35e545aae34 100644
--- a/tests/ui/cfg/cfg_false_no_std-2.rs
+++ b/tests/ui/cfg/cfg_false_no_std-2.rs
@@ -1,5 +1,7 @@
 // Error, the linked empty library is `no_std` and doesn't provide a panic handler.
 
+//@ compile-flags: --error-format=human
+//@ error-pattern: `#[panic_handler]` function required, but not found
 //@ dont-check-compiler-stderr
 //@ aux-build: cfg_false_lib_no_std_before.rs
 
@@ -9,5 +11,6 @@ extern crate cfg_false_lib_no_std_before as _;
 
 fn main() {}
 
-//~? ERROR `#[panic_handler]` function required, but not found
-//~? ERROR unwinding panics are not supported without std
+// FIXME: The second error is target-dependent.
+//FIXME~? ERROR `#[panic_handler]` function required, but not found
+//FIXME~? ERROR unwinding panics are not supported without std
diff --git a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs
index e9b021e4f48..b79b5ff6fdb 100644
--- a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs
+++ b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs
@@ -1,11 +1,12 @@
-//~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
+//FIXME~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
 // Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
 // causes a layout error.
 // This version of the test already ICE'd before the commit that introduce the ICE described in
 // https://github.com/rust-lang/rust/issues/94961.
 
-//@ compile-flags:-C debuginfo=2
+//@ compile-flags:-C debuginfo=2 --error-format=human
 //@ build-fail
+//@ error-pattern: values of the type `[u8; usize::MAX]` are too big for the target architecture
 
 #![crate_type = "rlib"]
 
@@ -16,3 +17,6 @@ pub enum Foo<T> {
 pub fn foo() -> usize {
     std::mem::size_of::<Foo<u8>>()
 }
+
+// FIXME: the error is reported on different lines on different targets
+//FIXME~? ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
diff --git a/tests/ui/panic-runtime/two-panic-runtimes.rs b/tests/ui/panic-runtime/two-panic-runtimes.rs
index 37d041a8c7b..15c08cbe30d 100644
--- a/tests/ui/panic-runtime/two-panic-runtimes.rs
+++ b/tests/ui/panic-runtime/two-panic-runtimes.rs
@@ -1,4 +1,7 @@
+// ignore-tidy-linelength
 //@ build-fail
+//@ compile-flags: --error-format=human
+//@ error-pattern: cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
 //@ dont-check-compiler-stderr
 //@ aux-build:panic-runtime-unwind.rs
 //@ aux-build:panic-runtime-unwind2.rs
@@ -13,4 +16,7 @@ extern crate panic_runtime_lang_items;
 
 fn main() {}
 
-//~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
+// FIXME: The second and third errors are target-dependent.
+//FIXME~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
+//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind2` is not compiled with this crate's panic strategy `abort`
+//FIXME~? ERROR the crate `panic_runtime_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
diff --git a/tests/ui/panic-runtime/unwind-tables-target-required.rs b/tests/ui/panic-runtime/unwind-tables-target-required.rs
index 5c6ec19c16d..ff8df284f6b 100644
--- a/tests/ui/panic-runtime/unwind-tables-target-required.rs
+++ b/tests/ui/panic-runtime/unwind-tables-target-required.rs
@@ -5,7 +5,8 @@
 //@ compile-flags: -C force-unwind-tables=no
 //
 //@ dont-check-compiler-stderr
-//@ error-pattern: target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no`
 
 pub fn main() {
 }
+
+//~? ERROR target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no`
diff --git a/tests/ui/panic-runtime/want-abort-got-unwind.rs b/tests/ui/panic-runtime/want-abort-got-unwind.rs
index 76e15a1e16e..ed61c2613df 100644
--- a/tests/ui/panic-runtime/want-abort-got-unwind.rs
+++ b/tests/ui/panic-runtime/want-abort-got-unwind.rs
@@ -1,4 +1,7 @@
+// ignore-tidy-linelength
 //@ build-fail
+//@ compile-flags: --error-format=human
+//@ error-pattern: the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
 //@ dont-check-compiler-stderr
 //@ aux-build:panic-runtime-unwind.rs
 //@ compile-flags:-C panic=abort
@@ -7,6 +10,7 @@ extern crate panic_runtime_unwind;
 
 fn main() {}
 
-//~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
-//~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
-//~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
+// FIXME: The first and third errors are target-dependent.
+//FIXME~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
+//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
+//FIXME~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
diff --git a/tests/ui/panic-runtime/want-abort-got-unwind2.rs b/tests/ui/panic-runtime/want-abort-got-unwind2.rs
index 53cba457424..504fd779e09 100644
--- a/tests/ui/panic-runtime/want-abort-got-unwind2.rs
+++ b/tests/ui/panic-runtime/want-abort-got-unwind2.rs
@@ -1,4 +1,7 @@
+// ignore-tidy-linelength
 //@ build-fail
+//@ compile-flags: --error-format=human
+//@ error-pattern: the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
 //@ dont-check-compiler-stderr
 //@ aux-build:panic-runtime-unwind.rs
 //@ aux-build:wants-panic-runtime-unwind.rs
@@ -8,6 +11,7 @@ extern crate wants_panic_runtime_unwind;
 
 fn main() {}
 
-//~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
-//~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
-//~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
+// FIXME: The first and third errors are target-dependent.
+//FIXME~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
+//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
+//FIXME~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
diff --git a/tests/ui/print-request/stability.rs b/tests/ui/print-request/stability.rs
index 22f279802cd..54142ce78ce 100644
--- a/tests/ui/print-request/stability.rs
+++ b/tests/ui/print-request/stability.rs
@@ -19,7 +19,6 @@
 
 //@ revisions: crate_root_lint_levels
 //@[crate_root_lint_levels] compile-flags: --print=crate-root-lint-levels
-//@[crate_root_lint_levels] error-pattern: the `-Z unstable-options` flag must also be passed
 
 //@ revisions: check_cfg
 //@[check_cfg] compile-flags: --print=check-cfg
@@ -107,6 +106,7 @@
 fn main() {}
 
 //[all_target_specs_json]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `all-target-specs-json` print option
+//[crate_root_lint_levels]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `crate-root-lint-levels` print option
 //[check_cfg]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `check-cfg` print option
 //[supported_crate_types]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `supported-crate-types` print option
 //[target_spec_json]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `target-spec-json` print option