Add failing test of extern enum used as struct field

Currently fails with:

    error[cxxbridge]: needs a cxx::ExternType impl in order to be used as a field of `Second`
        ┌─ lib.rs:222:9
        │
    222 │         type COwnedEnum;
        │         ^^^^^^^^^^^^^^^ needs a cxx::ExternType impl in order to be used as a field of `Second`

which is wrong because the bridge should know it's producing a
compatible ExternType impl for this type.
This commit is contained in:
David Tolnay 2020-11-19 14:39:43 -08:00
parent f35a22d119
commit 468063fb69
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -113,6 +113,7 @@ pub mod ffi {
#[namespace = "second"]
struct Second {
i: i32,
e: COwnedEnum,
}
unsafe extern "C++" {