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