about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/thir/pattern
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2024-10-08 00:14:35 +0200
committerNadrieril <nadrieril+git@gmail.com>2024-10-08 00:23:28 +0200
commit2ef0a8fdfd5142e8a524f4dc9fff8c65d0bd7cc2 (patch)
treee749cf28ef98ab0807569e3b2040f112b8ebee25 /compiler/rustc_mir_build/src/thir/pattern
parent4aaada42d0b59c3294908f9996277c60d9e13917 (diff)
Change error message
Diffstat (limited to 'compiler/rustc_mir_build/src/thir/pattern')
-rw-r--r--compiler/rustc_mir_build/src/thir/pattern/mod.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/mod.rs b/compiler/rustc_mir_build/src/thir/pattern/mod.rs
index bb02ee37733..16b7cac4e4d 100644
--- a/compiler/rustc_mir_build/src/thir/pattern/mod.rs
+++ b/compiler/rustc_mir_build/src/thir/pattern/mod.rs
@@ -25,6 +25,7 @@ use tracing::{debug, instrument};
 
 pub(crate) use self::check_match::check_match;
 use crate::errors::*;
+use crate::fluent_generated as fluent;
 use crate::thir::util::UserAnnotatedTyHelpers;
 
 struct PatCtxt<'a, 'tcx> {
@@ -58,10 +59,8 @@ pub(super) fn pat_from_hir<'a, 'tcx>(
     debug!("pat_from_hir({:?}) = {:?}", pat, result);
     if let Some(sugg) = pcx.rust_2024_migration_suggestion {
         if sugg.is_hard_error {
-            let mut err = tcx.dcx().struct_span_err(
-                pat.span,
-                "patterns are not allowed to reset the default binding mode in rust 2024",
-            );
+            let mut err =
+                tcx.dcx().struct_span_err(pat.span, fluent::mir_build_rust_2024_incompatible_pat);
             err.subdiagnostic(sugg);
             err.emit();
         } else {