Test inconsistent suffix on enum discriminants

This commit is contained in:
David Tolnay 2020-05-10 23:29:12 -07:00
parent f85431239d
commit b24f52e289
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#[cxx::bridge]
mod ffi {
enum Bad {
A = 1u16,
B = 2i64,
}
}
fn main() {}

View File

@ -0,0 +1,5 @@
error: expected u16, found i64
--> $DIR/enum_inconsistent.rs:5:9
|
5 | B = 2i64,
| ^^^^^^^^