about summary refs log tree commit diff
path: root/tests/ui/rust-2024
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2024-11-28 09:47:37 -0800
committerEric Huss <eric@huss.org>2024-11-28 14:32:45 -0800
commit6005d1c9f792f402afa6e355bf25615d05954a00 (patch)
tree1c594a9c8d9ac6f000096a4b0242b8c0ec16a651 /tests/ui/rust-2024
parenta2545fd6fc66b4323f555223a860c451885d1d2b (diff)
downloadrust-6005d1c9f792f402afa6e355bf25615d05954a00.tar.gz
rust-6005d1c9f792f402afa6e355bf25615d05954a00.zip
Update more 2024 tests to remove -Zunstable-options
Diffstat (limited to 'tests/ui/rust-2024')
-rw-r--r--tests/ui/rust-2024/prelude-migration/future-poll-already-future.rs1
-rw-r--r--tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.fixed1
-rw-r--r--tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.stderr4
-rw-r--r--tests/ui/rust-2024/prelude-migration/future-poll-async-block.rs1
-rw-r--r--tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.fixed1
-rw-r--r--tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.stderr4
-rw-r--r--tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.rs1
-rw-r--r--tests/ui/rust-2024/prelude-migration/future-poll-not-future.rs1
-rw-r--r--tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.fixed1
-rw-r--r--tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.stderr4
-rw-r--r--tests/ui/rust-2024/prelude-migration/into-future-adt.rs1
-rw-r--r--tests/ui/rust-2024/prelude-migration/into-future-already-into-future.rs1
-rw-r--r--tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.fixed1
-rw-r--r--tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.stderr4
-rw-r--r--tests/ui/rust-2024/prelude-migration/into-future-not-into-future.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-attributes/unsafe-attribute-marked.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.edition2024.stderr2
-rw-r--r--tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-before_exec.e2024.stderr2
-rw-r--r--tests/ui/rust-2024/unsafe-before_exec.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-env.e2021.stderr12
-rw-r--r--tests/ui/rust-2024/unsafe-env.e2024.stderr20
-rw-r--r--tests/ui/rust-2024/unsafe-env.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2021.stderr4
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2024.stderr4
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/extern-items.edition2024.stderr2
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/extern-items.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/safe-items.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr4
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr6
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2021.stderr4
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2024.stderr4
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.rs1
36 files changed, 40 insertions, 61 deletions
diff --git a/tests/ui/rust-2024/prelude-migration/future-poll-already-future.rs b/tests/ui/rust-2024/prelude-migration/future-poll-already-future.rs
index 7bf5118c340..0f0120b721f 100644
--- a/tests/ui/rust-2024/prelude-migration/future-poll-already-future.rs
+++ b/tests/ui/rust-2024/prelude-migration/future-poll-already-future.rs
@@ -1,7 +1,6 @@
 //@ revisions: e2021 e2024
 //@[e2021] edition: 2021
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@ check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.fixed b/tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.fixed
index 44850c8c45b..ff8c4beca6b 100644
--- a/tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.fixed
+++ b/tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.fixed
@@ -2,7 +2,6 @@
 //@[e2021] edition: 2021
 //@[e2021] run-rustfix
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@[e2024] check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.stderr b/tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.stderr
index 496b3197c34..15a3fa11414 100644
--- a/tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.stderr
+++ b/tests/ui/rust-2024/prelude-migration/future-poll-async-block.e2021.stderr
@@ -1,5 +1,5 @@
 error: trait method `poll` will become ambiguous in Rust 2024
-  --> $DIR/future-poll-async-block.rs:14:5
+  --> $DIR/future-poll-async-block.rs:13:5
    |
 LL |     core::pin::pin!(async {}).poll(&mut context());
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `Meow::poll(&core::pin::pin!(async {}), &mut context())`
@@ -7,7 +7,7 @@ LL |     core::pin::pin!(async {}).poll(&mut context());
    = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/prelude.html>
 note: the lint level is defined here
-  --> $DIR/future-poll-async-block.rs:8:9
+  --> $DIR/future-poll-async-block.rs:7:9
    |
 LL | #![deny(rust_2024_prelude_collisions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2024/prelude-migration/future-poll-async-block.rs b/tests/ui/rust-2024/prelude-migration/future-poll-async-block.rs
index 614e4c786c5..60b0b2689c2 100644
--- a/tests/ui/rust-2024/prelude-migration/future-poll-async-block.rs
+++ b/tests/ui/rust-2024/prelude-migration/future-poll-async-block.rs
@@ -2,7 +2,6 @@
 //@[e2021] edition: 2021
 //@[e2021] run-rustfix
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@[e2024] check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.fixed b/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.fixed
index c96d1dcecc2..f68729e483a 100644
--- a/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.fixed
+++ b/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.fixed
@@ -2,7 +2,6 @@
 //@[e2021] edition: 2021
 //@[e2021] run-rustfix
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@[e2024] check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.stderr b/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.stderr
index 020a00ccdec..633731c2a5a 100644
--- a/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.stderr
+++ b/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.e2021.stderr
@@ -1,5 +1,5 @@
 error: trait method `poll` will become ambiguous in Rust 2024
-  --> $DIR/future-poll-not-future-pinned.rs:18:5
+  --> $DIR/future-poll-not-future-pinned.rs:17:5
    |
 LL |     core::pin::pin!(()).poll();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `Meow::poll(&core::pin::pin!(()))`
@@ -7,7 +7,7 @@ LL |     core::pin::pin!(()).poll();
    = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/prelude.html>
 note: the lint level is defined here
-  --> $DIR/future-poll-not-future-pinned.rs:8:9
+  --> $DIR/future-poll-not-future-pinned.rs:7:9
    |
 LL | #![deny(rust_2024_prelude_collisions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.rs b/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.rs
index 21b170a5f1d..4845ef779e0 100644
--- a/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.rs
+++ b/tests/ui/rust-2024/prelude-migration/future-poll-not-future-pinned.rs
@@ -2,7 +2,6 @@
 //@[e2021] edition: 2021
 //@[e2021] run-rustfix
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@[e2024] check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/future-poll-not-future.rs b/tests/ui/rust-2024/prelude-migration/future-poll-not-future.rs
index 899b69ebfc2..36578e28b80 100644
--- a/tests/ui/rust-2024/prelude-migration/future-poll-not-future.rs
+++ b/tests/ui/rust-2024/prelude-migration/future-poll-not-future.rs
@@ -1,7 +1,6 @@
 //@ revisions: e2021 e2024
 //@[e2021] edition: 2021
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@ check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.fixed b/tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.fixed
index 0b0873eb238..03bf4ab19c1 100644
--- a/tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.fixed
+++ b/tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.fixed
@@ -2,7 +2,6 @@
 //@[e2021] edition: 2021
 //@[e2021] run-rustfix
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@[e2024] check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.stderr b/tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.stderr
index b74e80e2a4a..e67f07b4e46 100644
--- a/tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.stderr
+++ b/tests/ui/rust-2024/prelude-migration/into-future-adt.e2021.stderr
@@ -1,5 +1,5 @@
 error: trait method `into_future` will become ambiguous in Rust 2024
-  --> $DIR/into-future-adt.rs:26:5
+  --> $DIR/into-future-adt.rs:25:5
    |
 LL |     Cat.into_future();
    |     ^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `Meow::into_future(&Cat)`
@@ -7,7 +7,7 @@ LL |     Cat.into_future();
    = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/prelude.html>
 note: the lint level is defined here
-  --> $DIR/into-future-adt.rs:8:9
+  --> $DIR/into-future-adt.rs:7:9
    |
 LL | #![deny(rust_2024_prelude_collisions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2024/prelude-migration/into-future-adt.rs b/tests/ui/rust-2024/prelude-migration/into-future-adt.rs
index 0db70930bc7..65edc88baab 100644
--- a/tests/ui/rust-2024/prelude-migration/into-future-adt.rs
+++ b/tests/ui/rust-2024/prelude-migration/into-future-adt.rs
@@ -2,7 +2,6 @@
 //@[e2021] edition: 2021
 //@[e2021] run-rustfix
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@[e2024] check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/into-future-already-into-future.rs b/tests/ui/rust-2024/prelude-migration/into-future-already-into-future.rs
index 6bc2ea31705..16ac89759f3 100644
--- a/tests/ui/rust-2024/prelude-migration/into-future-already-into-future.rs
+++ b/tests/ui/rust-2024/prelude-migration/into-future-already-into-future.rs
@@ -1,7 +1,6 @@
 //@ revisions: e2021 e2024
 //@[e2021] edition: 2021
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@ check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.fixed b/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.fixed
index a798014d93d..4e082883395 100644
--- a/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.fixed
+++ b/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.fixed
@@ -2,7 +2,6 @@
 //@[e2021] edition: 2021
 //@[e2021] run-rustfix
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@[e2024] check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.stderr b/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.stderr
index 6ea4580ca72..0588f5bf3f5 100644
--- a/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.stderr
+++ b/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.e2021.stderr
@@ -1,5 +1,5 @@
 error: trait method `into_future` will become ambiguous in Rust 2024
-  --> $DIR/into-future-not-into-future.rs:20:5
+  --> $DIR/into-future-not-into-future.rs:19:5
    |
 LL |     Cat.into_future();
    |     ^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `Meow::into_future(&Cat)`
@@ -7,7 +7,7 @@ LL |     Cat.into_future();
    = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/prelude.html>
 note: the lint level is defined here
-  --> $DIR/into-future-not-into-future.rs:8:9
+  --> $DIR/into-future-not-into-future.rs:7:9
    |
 LL | #![deny(rust_2024_prelude_collisions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.rs b/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.rs
index 23e81cfe6b4..f640d9b50bb 100644
--- a/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.rs
+++ b/tests/ui/rust-2024/prelude-migration/into-future-not-into-future.rs
@@ -2,7 +2,6 @@
 //@[e2021] edition: 2021
 //@[e2021] run-rustfix
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 //@[e2024] check-pass
 
 #![deny(rust_2024_prelude_collisions)]
diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attribute-marked.rs b/tests/ui/rust-2024/unsafe-attributes/unsafe-attribute-marked.rs
index 7c919fed976..79fba46c77f 100644
--- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attribute-marked.rs
+++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attribute-marked.rs
@@ -1,7 +1,6 @@
 //@ revisions: edition2021 edition2024
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
-//@[edition2024] compile-flags: -Zunstable-options
 //@ check-pass
 
 
diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
index 4f369a8305b..e2c504e708c 100644
--- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
+++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
@@ -5,7 +5,6 @@
 //@ check-pass
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
-//@[edition2024] compile-flags: -Zunstable-options
 //@ proc-macro: unsafe-attributes-pm.rs
 
 unsafe_attributes_pm::missing_unsafe!();
diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.edition2024.stderr b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.edition2024.stderr
index fb697e14ef1..5c3927a0928 100644
--- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.edition2024.stderr
+++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.edition2024.stderr
@@ -1,5 +1,5 @@
 error: unsafe attribute used without unsafe
-  --> $DIR/unsafe-attributes.rs:8:3
+  --> $DIR/unsafe-attributes.rs:7:3
    |
 LL | #[no_mangle]
    |   ^^^^^^^^^ usage of unsafe attribute
diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.rs b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.rs
index f6f2994bb6d..4b161bc34ea 100644
--- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.rs
+++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.rs
@@ -2,7 +2,6 @@
 //@[edition2021] edition:2021
 //@[edition2021] check-pass
 //@[edition2024] edition:2024
-//@[edition2024] compile-flags: -Zunstable-options
 
 
 #[no_mangle] //[edition2024]~ ERROR: unsafe attribute used without unsafe
diff --git a/tests/ui/rust-2024/unsafe-before_exec.e2024.stderr b/tests/ui/rust-2024/unsafe-before_exec.e2024.stderr
index 2798ccdefd0..10d0e8b830c 100644
--- a/tests/ui/rust-2024/unsafe-before_exec.e2024.stderr
+++ b/tests/ui/rust-2024/unsafe-before_exec.e2024.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `before_exec` is unsafe and requires unsafe block
-  --> $DIR/unsafe-before_exec.rs:14:5
+  --> $DIR/unsafe-before_exec.rs:13:5
    |
 LL |     cmd.before_exec(|| Ok(()));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/rust-2024/unsafe-before_exec.rs b/tests/ui/rust-2024/unsafe-before_exec.rs
index 540394da80e..44a955e229d 100644
--- a/tests/ui/rust-2024/unsafe-before_exec.rs
+++ b/tests/ui/rust-2024/unsafe-before_exec.rs
@@ -3,7 +3,6 @@
 //@[e2021] edition: 2021
 //@[e2021] check-pass
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 
 use std::process::Command;
 use std::os::unix::process::CommandExt;
diff --git a/tests/ui/rust-2024/unsafe-env.e2021.stderr b/tests/ui/rust-2024/unsafe-env.e2021.stderr
index 90c1df192aa..6f9618eb14b 100644
--- a/tests/ui/rust-2024/unsafe-env.e2021.stderr
+++ b/tests/ui/rust-2024/unsafe-env.e2021.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `unsafe_fn` is unsafe and requires unsafe block
-  --> $DIR/unsafe-env.rs:15:9
+  --> $DIR/unsafe-env.rs:14:9
    |
 LL |         unsafe_fn();
    |         ^^^^^^^^^^^ call to unsafe function
@@ -7,18 +7,18 @@ LL |         unsafe_fn();
    = note: for more information, see issue #71668 <https://github.com/rust-lang/rust/issues/71668>
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/unsafe-env.rs:9:1
+  --> $DIR/unsafe-env.rs:8:1
    |
 LL | unsafe fn unsafe_fn() {
    | ^^^^^^^^^^^^^^^^^^^^^
 note: the lint level is defined here
-  --> $DIR/unsafe-env.rs:8:8
+  --> $DIR/unsafe-env.rs:7:8
    |
 LL | #[deny(unsafe_op_in_unsafe_fn)]
    |        ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0133]: call to unsafe function `unsafe_fn` is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-env.rs:33:5
+  --> $DIR/unsafe-env.rs:32:5
    |
 LL |     unsafe_fn();
    |     ^^^^^^^^^^^ call to unsafe function
@@ -26,13 +26,13 @@ LL |     unsafe_fn();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error: unnecessary `unsafe` block
-  --> $DIR/unsafe-env.rs:36:5
+  --> $DIR/unsafe-env.rs:35:5
    |
 LL |     unsafe {
    |     ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/unsafe-env.rs:21:8
+  --> $DIR/unsafe-env.rs:20:8
    |
 LL | #[deny(unused_unsafe)]
    |        ^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2024/unsafe-env.e2024.stderr b/tests/ui/rust-2024/unsafe-env.e2024.stderr
index 5ecdf3cd7a7..04a35933c79 100644
--- a/tests/ui/rust-2024/unsafe-env.e2024.stderr
+++ b/tests/ui/rust-2024/unsafe-env.e2024.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `std::env::set_var` is unsafe and requires unsafe block
-  --> $DIR/unsafe-env.rs:10:5
+  --> $DIR/unsafe-env.rs:9:5
    |
 LL |     env::set_var("FOO", "BAR");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
@@ -7,18 +7,18 @@ LL |     env::set_var("FOO", "BAR");
    = note: for more information, see issue #71668 <https://github.com/rust-lang/rust/issues/71668>
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/unsafe-env.rs:9:1
+  --> $DIR/unsafe-env.rs:8:1
    |
 LL | unsafe fn unsafe_fn() {
    | ^^^^^^^^^^^^^^^^^^^^^
 note: the lint level is defined here
-  --> $DIR/unsafe-env.rs:8:8
+  --> $DIR/unsafe-env.rs:7:8
    |
 LL | #[deny(unsafe_op_in_unsafe_fn)]
    |        ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0133]: call to unsafe function `std::env::remove_var` is unsafe and requires unsafe block
-  --> $DIR/unsafe-env.rs:12:5
+  --> $DIR/unsafe-env.rs:11:5
    |
 LL |     env::remove_var("FOO");
    |     ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
@@ -27,7 +27,7 @@ LL |     env::remove_var("FOO");
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `unsafe_fn` is unsafe and requires unsafe block
-  --> $DIR/unsafe-env.rs:15:9
+  --> $DIR/unsafe-env.rs:14:9
    |
 LL |         unsafe_fn();
    |         ^^^^^^^^^^^ call to unsafe function
@@ -36,7 +36,7 @@ LL |         unsafe_fn();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block
-  --> $DIR/unsafe-env.rs:23:5
+  --> $DIR/unsafe-env.rs:22:5
    |
 LL |     env::set_var("FOO", "BAR");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
@@ -44,7 +44,7 @@ LL |     env::set_var("FOO", "BAR");
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `remove_var` is unsafe and requires unsafe block
-  --> $DIR/unsafe-env.rs:25:5
+  --> $DIR/unsafe-env.rs:24:5
    |
 LL |     env::remove_var("FOO");
    |     ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
@@ -52,7 +52,7 @@ LL |     env::remove_var("FOO");
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `unsafe_fn` is unsafe and requires unsafe block
-  --> $DIR/unsafe-env.rs:33:5
+  --> $DIR/unsafe-env.rs:32:5
    |
 LL |     unsafe_fn();
    |     ^^^^^^^^^^^ call to unsafe function
@@ -60,13 +60,13 @@ LL |     unsafe_fn();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error: unnecessary `unsafe` block
-  --> $DIR/unsafe-env.rs:36:5
+  --> $DIR/unsafe-env.rs:35:5
    |
 LL |     unsafe {
    |     ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/unsafe-env.rs:21:8
+  --> $DIR/unsafe-env.rs:20:8
    |
 LL | #[deny(unused_unsafe)]
    |        ^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2024/unsafe-env.rs b/tests/ui/rust-2024/unsafe-env.rs
index 601f44e1d3e..4a7c646323a 100644
--- a/tests/ui/rust-2024/unsafe-env.rs
+++ b/tests/ui/rust-2024/unsafe-env.rs
@@ -1,7 +1,6 @@
 //@ revisions: e2021 e2024
 //@[e2021] edition: 2021
 //@[e2024] edition: 2024
-//@[e2024] compile-flags: -Zunstable-options
 
 use std::env;
 
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2021.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2021.stderr
index 77554da10e6..50201140cda 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2021.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2021.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `test1` is unsafe and requires unsafe function or block
-  --> $DIR/extern-items-unsafe.rs:12:5
+  --> $DIR/extern-items-unsafe.rs:11:5
    |
 LL |     test1(TEST1);
    |     ^^^^^^^^^^^^ call to unsafe function
@@ -7,7 +7,7 @@ LL |     test1(TEST1);
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/extern-items-unsafe.rs:12:11
+  --> $DIR/extern-items-unsafe.rs:11:11
    |
 LL |     test1(TEST1);
    |           ^^^^^ use of extern static
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2024.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2024.stderr
index 33b752782d5..fa79d76546a 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2024.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.edition2024.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `test1` is unsafe and requires unsafe block
-  --> $DIR/extern-items-unsafe.rs:12:5
+  --> $DIR/extern-items-unsafe.rs:11:5
    |
 LL |     test1(TEST1);
    |     ^^^^^^^^^^^^ call to unsafe function
@@ -7,7 +7,7 @@ LL |     test1(TEST1);
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: use of extern static is unsafe and requires unsafe block
-  --> $DIR/extern-items-unsafe.rs:12:11
+  --> $DIR/extern-items-unsafe.rs:11:11
    |
 LL |     test1(TEST1);
    |           ^^^^^ use of extern static
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.rs b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.rs
index 721e07acca5..7bb4f666924 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.rs
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items-unsafe.rs
@@ -1,7 +1,6 @@
 //@ revisions: edition2021 edition2024
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
-//@[edition2024] compile-flags: -Zunstable-options
 
 unsafe extern "C" {
     static TEST1: i32;
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items.edition2024.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items.edition2024.stderr
index 8ef7c2caf21..17b49d8ed5c 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items.edition2024.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items.edition2024.stderr
@@ -1,5 +1,5 @@
 error: extern blocks must be unsafe
-  --> $DIR/extern-items.rs:7:1
+  --> $DIR/extern-items.rs:6:1
    |
 LL | / extern "C" {
 LL | |
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items.rs b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items.rs
index 08805c36347..8c0b8bc8899 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/extern-items.rs
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/extern-items.rs
@@ -2,7 +2,6 @@
 //@[edition2021] edition:2021
 //@[edition2021] check-pass
 //@[edition2024] edition:2024
-//@[edition2024] compile-flags: -Zunstable-options
 
 extern "C" {
     //[edition2024]~^ ERROR extern blocks must be unsafe
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/safe-items.rs b/tests/ui/rust-2024/unsafe-extern-blocks/safe-items.rs
index b0b8a8b012a..2b2d58c3eb3 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/safe-items.rs
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/safe-items.rs
@@ -1,7 +1,6 @@
 //@ revisions: edition2021 edition2024
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
-//@[edition2024] compile-flags: -Zunstable-options
 //@ check-pass
 
 unsafe extern "C" {
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr
index ddc5477116f..07d934da24b 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr
@@ -1,5 +1,5 @@
 error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
-  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:8:5
+  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:7:5
    |
 LL |     safe static TEST1: i32;
    |     ^^^^^^^^^^^^^^^^^^^^^^^
@@ -10,7 +10,7 @@ LL | unsafe extern "C" {
    | ++++++
 
 error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
-  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:10:5
+  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:9:5
    |
 LL |     safe fn test1(i: i32);
    |     ^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr
index ae7b4cd47c0..cceb3bddef4 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr
@@ -1,5 +1,5 @@
 error: extern blocks must be unsafe
-  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:6:1
+  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:5:1
    |
 LL | / extern "C" {
 LL | |
@@ -11,7 +11,7 @@ LL | | }
    | |_^
 
 error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
-  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:8:5
+  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:7:5
    |
 LL |     safe static TEST1: i32;
    |     ^^^^^^^^^^^^^^^^^^^^^^^
@@ -22,7 +22,7 @@ LL | unsafe extern "C" {
    | ++++++
 
 error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
-  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:10:5
+  --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:9:5
    |
 LL |     safe fn test1(i: i32);
    |     ^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs
index 89415a69f08..a5a6ccdffa0 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs
@@ -1,7 +1,6 @@
 //@ revisions: edition2021 edition2024
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
-//@[edition2024] compile-flags: -Zunstable-options
 
 extern "C" {
     //[edition2024]~^ ERROR extern blocks must be unsafe
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2021.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2021.stderr
index e3626bb497e..9433dd1f2e5 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2021.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2021.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `test1` is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-items.rs:18:5
+  --> $DIR/unsafe-items.rs:17:5
    |
 LL |     test1(TEST1);
    |     ^^^^^^^^^^^^ call to unsafe function
@@ -7,7 +7,7 @@ LL |     test1(TEST1);
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-items.rs:18:11
+  --> $DIR/unsafe-items.rs:17:11
    |
 LL |     test1(TEST1);
    |           ^^^^^ use of extern static
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2024.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2024.stderr
index 89bc501b7b5..af86b4c5805 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2024.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.edition2024.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `test1` is unsafe and requires unsafe block
-  --> $DIR/unsafe-items.rs:18:5
+  --> $DIR/unsafe-items.rs:17:5
    |
 LL |     test1(TEST1);
    |     ^^^^^^^^^^^^ call to unsafe function
@@ -7,7 +7,7 @@ LL |     test1(TEST1);
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: use of extern static is unsafe and requires unsafe block
-  --> $DIR/unsafe-items.rs:18:11
+  --> $DIR/unsafe-items.rs:17:11
    |
 LL |     test1(TEST1);
    |           ^^^^^ use of extern static
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.rs b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.rs
index dc2bae892a9..50c97b51768 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.rs
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-items.rs
@@ -1,7 +1,6 @@
 //@ revisions: edition2021 edition2024
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
-//@[edition2024] compile-flags: -Zunstable-options
 
 unsafe extern "C" {
     unsafe static TEST1: i32;