diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-08 03:09:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-08 03:09:58 +0200 |
| commit | 65dded838703fddfb8f3f9b3e4741cb4e34b9f06 (patch) | |
| tree | dd2724360e192b72ad4a694c414a5b267ded15e2 /tests/ui | |
| parent | 1a45ab116d242a4348748eeef9a7fe9ac4c4cd4e (diff) | |
| parent | 1a6eff747fa5152e6fae64c8ee1167a0c587dc98 (diff) | |
| download | rust-65dded838703fddfb8f3f9b3e4741cb4e34b9f06.tar.gz rust-65dded838703fddfb8f3f9b3e4741cb4e34b9f06.zip | |
Rollup merge of #143589 - RalfJung:const-pat, r=compiler-errors
const-block-as-pattern: do not refer to no-longer-existing nightly feature Surely everyone who used this nightly feature has fixed their code by now. So let's not confused people on stable that try to use a const block as a pattern by referring to some dead nightly feature.
Diffstat (limited to 'tests/ui')
| -rw-r--r-- | tests/ui/inline-const/in-pat-recovery.rs | 2 | ||||
| -rw-r--r-- | tests/ui/inline-const/in-pat-recovery.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/inline-const/in-pat-recovery.rs b/tests/ui/inline-const/in-pat-recovery.rs index e9e60116ff4..a46e56e3be6 100644 --- a/tests/ui/inline-const/in-pat-recovery.rs +++ b/tests/ui/inline-const/in-pat-recovery.rs @@ -4,7 +4,7 @@ fn main() { match 1 { const { 1 + 7 } => {} - //~^ ERROR `inline_const_pat` has been removed + //~^ ERROR const blocks cannot be used as patterns 2 => {} _ => {} } diff --git a/tests/ui/inline-const/in-pat-recovery.stderr b/tests/ui/inline-const/in-pat-recovery.stderr index e1f2e681e77..0698cff1480 100644 --- a/tests/ui/inline-const/in-pat-recovery.stderr +++ b/tests/ui/inline-const/in-pat-recovery.stderr @@ -1,10 +1,10 @@ -error: `inline_const_pat` has been removed +error: const blocks cannot be used as patterns --> $DIR/in-pat-recovery.rs:6:15 | LL | const { 1 + 7 } => {} | ^^^^^^^^^ | - = help: use a named `const`-item or an `if`-guard instead + = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead error: aborting due to 1 previous error |
