diff options
| author | bors <bors@rust-lang.org> | 2022-05-18 20:12:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-18 20:12:07 +0000 |
| commit | cd282d7f75da9080fda0f1740a729516e7fbec68 (patch) | |
| tree | 7e55bf30bbcb3318fd38faec8a3490506d1bf4f8 /src | |
| parent | 07ae142d77f56dd48f2736605e0a6c015f2aecc6 (diff) | |
| parent | 96b36d6eb21daaca2c2d04fd8d7c27bef5eb90c6 (diff) | |
| download | rust-cd282d7f75da9080fda0f1740a729516e7fbec68.tar.gz rust-cd282d7f75da9080fda0f1740a729516e7fbec68.zip | |
Auto merge of #97019 - b-naber:transition-to-valtrees-pt1, r=oli-obk
Transition to valtrees pt1 Compartmentalising https://github.com/rust-lang/rust/pull/96591 as much as possible. r? `@oli-obk`
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/inline-const/const-match-pat-generic.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/inline-const/const-match-pat-generic.stderr | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/test/ui/inline-const/const-match-pat-generic.rs b/src/test/ui/inline-const/const-match-pat-generic.rs index e1946467583..7c0d83516ea 100644 --- a/src/test/ui/inline-const/const-match-pat-generic.rs +++ b/src/test/ui/inline-const/const-match-pat-generic.rs @@ -6,7 +6,8 @@ fn foo<const V: usize>() { match 0 { const { V } => {}, - //~^ ERROR const parameters cannot be referenced in patterns [E0158] + //~^ ERROR constant pattern depends on a generic parameter + //~| ERROR constant pattern depends on a generic parameter _ => {}, } } diff --git a/src/test/ui/inline-const/const-match-pat-generic.stderr b/src/test/ui/inline-const/const-match-pat-generic.stderr index ade200d99ba..77267f12fb1 100644 --- a/src/test/ui/inline-const/const-match-pat-generic.stderr +++ b/src/test/ui/inline-const/const-match-pat-generic.stderr @@ -1,21 +1,26 @@ -error[E0158]: const parameters cannot be referenced in patterns +error: constant pattern depends on a generic parameter --> $DIR/const-match-pat-generic.rs:8:9 | LL | const { V } => {}, | ^^^^^^^^^^^ error: constant pattern depends on a generic parameter - --> $DIR/const-match-pat-generic.rs:20:9 + --> $DIR/const-match-pat-generic.rs:21:9 | LL | const { f(V) } => {}, | ^^^^^^^^^^^^^^ error: constant pattern depends on a generic parameter - --> $DIR/const-match-pat-generic.rs:20:9 + --> $DIR/const-match-pat-generic.rs:8:9 + | +LL | const { V } => {}, + | ^^^^^^^^^^^ + +error: constant pattern depends on a generic parameter + --> $DIR/const-match-pat-generic.rs:21:9 | LL | const { f(V) } => {}, | ^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0158`. |
