about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-09 09:51:50 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-09 09:51:50 +0300
commit12829122bf2216e492e2befb0c1305b5efbfee7d (patch)
tree99f3344a32d14593962270caabc4547f20ffe884
parentcffc5c21fc49e86859ea5601a4f80d4446b594e9 (diff)
downloadrust-12829122bf2216e492e2befb0c1305b5efbfee7d.tar.gz
rust-12829122bf2216e492e2befb0c1305b5efbfee7d.zip
Migrate some tests to `dont-require-annotations`
-rw-r--r--tests/ui/cfg/cfg_false_no_std-2.rs8
-rw-r--r--tests/ui/panic-runtime/two-panic-runtimes.rs8
-rw-r--r--tests/ui/panic-runtime/want-abort-got-unwind.rs8
-rw-r--r--tests/ui/panic-runtime/want-abort-got-unwind2.rs8
4 files changed, 16 insertions, 16 deletions
diff --git a/tests/ui/cfg/cfg_false_no_std-2.rs b/tests/ui/cfg/cfg_false_no_std-2.rs
index 35e545aae34..349c49412ff 100644
--- a/tests/ui/cfg/cfg_false_no_std-2.rs
+++ b/tests/ui/cfg/cfg_false_no_std-2.rs
@@ -1,7 +1,6 @@
 // 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-require-annotations:ERROR
 //@ dont-check-compiler-stderr
 //@ aux-build: cfg_false_lib_no_std_before.rs
 
@@ -11,6 +10,7 @@ extern crate cfg_false_lib_no_std_before as _;
 
 fn main() {}
 
-// FIXME: The second error is target-dependent.
-//FIXME~? ERROR `#[panic_handler]` function required, but not found
+//~? ERROR `#[panic_handler]` function required, but not found
+// FIXME: This error is target-dependent, could be served by some "optional error" annotation
+// instead of `dont-require-annotations`.
 //FIXME~? ERROR unwinding panics are not supported without std
diff --git a/tests/ui/panic-runtime/two-panic-runtimes.rs b/tests/ui/panic-runtime/two-panic-runtimes.rs
index 15c08cbe30d..7add07ef600 100644
--- a/tests/ui/panic-runtime/two-panic-runtimes.rs
+++ b/tests/ui/panic-runtime/two-panic-runtimes.rs
@@ -1,7 +1,6 @@
 // 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-require-annotations:ERROR
 //@ dont-check-compiler-stderr
 //@ aux-build:panic-runtime-unwind.rs
 //@ aux-build:panic-runtime-unwind2.rs
@@ -16,7 +15,8 @@ extern crate panic_runtime_lang_items;
 
 fn main() {}
 
-// FIXME: The second and third errors are target-dependent.
-//FIXME~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
+//~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
+// FIXME: These errors are target-dependent, could be served by some "optional error" annotation
+// instead of `dont-require-annotations`.
 //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/want-abort-got-unwind.rs b/tests/ui/panic-runtime/want-abort-got-unwind.rs
index ed61c2613df..1ae2e623f10 100644
--- a/tests/ui/panic-runtime/want-abort-got-unwind.rs
+++ b/tests/ui/panic-runtime/want-abort-got-unwind.rs
@@ -1,7 +1,6 @@
 // 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-require-annotations:ERROR
 //@ dont-check-compiler-stderr
 //@ aux-build:panic-runtime-unwind.rs
 //@ compile-flags:-C panic=abort
@@ -10,7 +9,8 @@ extern crate panic_runtime_unwind;
 
 fn main() {}
 
-// FIXME: The first and third errors are target-dependent.
+//~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
+// FIXME: These errors are target-dependent, could be served by some "optional error" annotation
+// instead of `dont-require-annotations`.
 //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 504fd779e09..dc4d3ea86d8 100644
--- a/tests/ui/panic-runtime/want-abort-got-unwind2.rs
+++ b/tests/ui/panic-runtime/want-abort-got-unwind2.rs
@@ -1,7 +1,6 @@
 // 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-require-annotations:ERROR
 //@ dont-check-compiler-stderr
 //@ aux-build:panic-runtime-unwind.rs
 //@ aux-build:wants-panic-runtime-unwind.rs
@@ -11,7 +10,8 @@ extern crate wants_panic_runtime_unwind;
 
 fn main() {}
 
-// FIXME: The first and third errors are target-dependent.
+//~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
+// FIXME: These errors are target-dependent, could be served by some "optional error" annotation
+// instead of `dont-require-annotations`.
 //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`