Don't make opaque types like FILE and DIR copyable.

Also, locale_t is a typedef for a pointer to an opaque struct, so
represent it that way explicitly.
This commit is contained in:
Dan Gohman 2019-04-19 12:29:59 -07:00
parent 49c0dc98d0
commit 6b524b36c8
1 changed files with 6 additions and 19 deletions

View File

@ -68,30 +68,17 @@ pub type __wasi_userdata_t = u64;
pub type __wasi_whence_t = u8;
pub type __wasi_preopentype_t = u8;
#[allow(missing_copy_implementations)]
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum FILE {}
impl ::Copy for FILE {}
impl ::Clone for FILE {
fn clone(&self) -> FILE {
*self
}
}
#[allow(missing_copy_implementations)]
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum DIR {}
impl ::Copy for DIR {}
impl ::Clone for DIR {
fn clone(&self) -> DIR {
*self
}
}
#[allow(missing_copy_implementations)]
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum locale_t {}
impl ::Copy for locale_t {}
impl ::Clone for locale_t {
fn clone(&self) -> locale_t {
*self
}
}
pub enum __locale_struct {}
pub type locale_t = *mut __locale_struct;
s! {
#[repr(align(8))]