Add a test against Result<(), ()>
This commit is contained in:
parent
014ddac9c9
commit
b3f6511755
@ -170,7 +170,8 @@ extern "C" {
|
||||
//~^ ERROR `extern` block uses type
|
||||
fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
|
||||
//~^ ERROR `extern` block uses type
|
||||
|
||||
fn result_unit_t_e(x: Result<(), ()>);
|
||||
//~^ ERROR `extern` block uses type
|
||||
}
|
||||
|
||||
pub fn main() {}
|
||||
|
@ -237,5 +237,14 @@ LL | fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
|
||||
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
||||
= note: enum has no representation hint
|
||||
|
||||
error: aborting due to 25 previous errors
|
||||
error: `extern` block uses type `Result<(), ()>`, which is not FFI-safe
|
||||
--> $DIR/lint-ctypes-enum.rs:174:27
|
||||
|
|
||||
LL | fn result_unit_t_e(x: Result<(), ()>);
|
||||
| ^^^^^^^^^^^^^^ not FFI-safe
|
||||
|
|
||||
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
||||
= note: enum has no representation hint
|
||||
|
||||
error: aborting due to 26 previous errors
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user