2019-09-20 15:39:34 -07:00
|
|
|
//@ check-pass
|
|
|
|
#![deny(improper_ctypes)]
|
|
|
|
|
2024-02-22 14:59:52 +01:00
|
|
|
pub struct Error(std::num::NonZero<u32>);
|
2019-09-20 15:39:34 -07:00
|
|
|
|
|
|
|
extern "Rust" {
|
|
|
|
fn foo(dest: &mut [u8]) -> Result<(), Error>;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = unsafe { foo(&mut []) };
|
|
|
|
}
|