1
Fork 0

Stabilize min_match_ergonomics_2024

This commit is contained in:
Nadrieril 2024-10-07 23:47:21 +02:00
parent 575033c50c
commit 4aaada42d0
10 changed files with 104 additions and 46 deletions

View file

@ -57,7 +57,7 @@ pub(super) fn pat_from_hir<'a, 'tcx>(
let result = pcx.lower_pattern(pat);
debug!("pat_from_hir({:?}) = {:?}", pat, result);
if let Some(sugg) = pcx.rust_2024_migration_suggestion {
if tcx.features().min_match_ergonomics_2024 && sugg.is_hard_error {
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",