diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-11-20 02:37:56 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-12-04 20:29:35 +0000 |
| commit | cc492edc9d65125a25a42446bbffefb8087dedf1 (patch) | |
| tree | 7c598aa8fd7463f6f6aa6f126286260758dd60e6 /tests/ui/consts/const-eval/const-eval-overflow-2.rs | |
| parent | c6205055e085a1210c1503978225d34147a0d8bd (diff) | |
| download | rust-cc492edc9d65125a25a42446bbffefb8087dedf1.tar.gz rust-cc492edc9d65125a25a42446bbffefb8087dedf1.zip | |
Tweak unevaluated constant in pattern error
Silence errors that are implied by the errors in the `const` item definition. Add a primary span label.
Diffstat (limited to 'tests/ui/consts/const-eval/const-eval-overflow-2.rs')
| -rw-r--r-- | tests/ui/consts/const-eval/const-eval-overflow-2.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-2.rs b/tests/ui/consts/const-eval/const-eval-overflow-2.rs index c19a0c443ec..bae8a7ce243 100644 --- a/tests/ui/consts/const-eval/const-eval-overflow-2.rs +++ b/tests/ui/consts/const-eval/const-eval-overflow-2.rs @@ -12,8 +12,7 @@ const NEG_NEG_128: i8 = -NEG_128; //~ ERROR constant fn main() { match -128i8 { - NEG_NEG_128 => println!("A"), - //~^ ERROR could not evaluate constant pattern + NEG_NEG_128 => println!("A"), // ok, `const` error already emitted _ => println!("B"), } } |
