Skip to content

Commit

Permalink
fix E0081 error message due to lit_to_const behavior change
Browse files Browse the repository at this point in the history
  • Loading branch information
light4 committed Feb 25, 2022
1 parent 261765f commit 5b58c6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/test/ui/error-codes/E0081.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ enum Enum {
#[repr(u8)]
enum EnumOverflowRepr {
P = 257,
//~^ NOTE first use of `1` (overflowed from `257`)
//~^ NOTE first use of `255` (overflowed from `257`)
X = 513,
//~^ ERROR discriminant value `1` already exists
//~| NOTE enum already has `1` (overflowed from `513`)
//~^ ERROR discriminant value `255` already exists
//~| NOTE enum already has `255` (overflowed from `513`)
}

fn main() {
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/error-codes/E0081.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ LL |
LL | X = 3,
| ^ enum already has `3`

error[E0081]: discriminant value `1` already exists
error[E0081]: discriminant value `255` already exists
--> $DIR/E0081.rs:14:9
|
LL | P = 257,
| --- first use of `1` (overflowed from `257`)
| --- first use of `255` (overflowed from `257`)
LL |
LL | X = 513,
| ^^^ enum already has `1` (overflowed from `513`)
| ^^^ enum already has `255` (overflowed from `513`)

error: aborting due to 2 previous errors

Expand Down

0 comments on commit 5b58c6f

Please sign in to comment.