about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/compile-test.rs2
-rw-r--r--tests/ui/checked_unwrap/simple_conditionals.stderr3
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/compile-test.rs b/tests/compile-test.rs
index 0f75914335b..6d391bd622a 100644
--- a/tests/compile-test.rs
+++ b/tests/compile-test.rs
@@ -14,6 +14,7 @@ use pulldown_cmark::{Options, Parser, html};
 use serde::Deserialize;
 use test_utils::IS_RUSTC_TEST_SUITE;
 use ui_test::custom_flags::Flag;
+use ui_test::custom_flags::edition::Edition;
 use ui_test::custom_flags::rustfix::RustfixMode;
 use ui_test::spanned::Spanned;
 use ui_test::{Args, CommandBuilder, Config, Match, error_on_output_conflict, status_emitter};
@@ -156,6 +157,7 @@ impl TestContext {
             ..Config::rustc(Path::new("tests").join(test_dir))
         };
         let defaults = config.comment_defaults.base();
+        defaults.set_custom("edition", Edition("2024".into()));
         defaults.exit_status = None.into();
         if mandatory_annotations {
             defaults.require_annotations = Some(Spanned::dummy(true)).into();
diff --git a/tests/ui/checked_unwrap/simple_conditionals.stderr b/tests/ui/checked_unwrap/simple_conditionals.stderr
index c17eaef2326..bdac1e42309 100644
--- a/tests/ui/checked_unwrap/simple_conditionals.stderr
+++ b/tests/ui/checked_unwrap/simple_conditionals.stderr
@@ -244,8 +244,7 @@ LL |         if X.is_some() {
    |
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
-   = note: `-D static-mut-refs` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(static_mut_refs)]`
+   = note: `#[deny(static_mut_refs)]` on by default
 
 error: aborting due to 26 previous errors