mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
Test inconsistent suffix on enum discriminants
This commit is contained in:
parent
f85431239d
commit
b24f52e289
9
tests/ui/enum_inconsistent.rs
Normal file
9
tests/ui/enum_inconsistent.rs
Normal file
@ -0,0 +1,9 @@
|
||||
#[cxx::bridge]
|
||||
mod ffi {
|
||||
enum Bad {
|
||||
A = 1u16,
|
||||
B = 2i64,
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
5
tests/ui/enum_inconsistent.stderr
Normal file
5
tests/ui/enum_inconsistent.stderr
Normal file
@ -0,0 +1,5 @@
|
||||
error: expected u16, found i64
|
||||
--> $DIR/enum_inconsistent.rs:5:9
|
||||
|
|
||||
5 | B = 2i64,
|
||||
| ^^^^^^^^
|
Loading…
Reference in New Issue
Block a user