Auto merge of #27931 - tbu-:pr_liblibc_void, r=alexcrichton
This commit is contained in:
commit
2375743037
@ -192,14 +192,15 @@ pub mod types {
|
||||
/// C. Use the unit type `()` or omit the return type instead.
|
||||
///
|
||||
/// For LLVM to recognize the void pointer type and by extension
|
||||
/// functions like malloc(), we need to have it represented as i8* in
|
||||
/// LLVM bitcode. The enum used here ensures this and prevents misuse
|
||||
/// of the "raw" type by only having private variants.. We need two
|
||||
/// variants, because the compiler complains about the repr attribute
|
||||
/// otherwise.
|
||||
/// functions like malloc(), we need to have it represented as i8*
|
||||
/// in LLVM bitcode. The enum used here ensures this. We need two
|
||||
/// variants, because the compiler complains about the `repr`
|
||||
/// attribute otherwise.
|
||||
#[repr(u8)]
|
||||
pub enum c_void {
|
||||
#[doc(hidden)]
|
||||
__variant1,
|
||||
#[doc(hidden)]
|
||||
__variant2,
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user