File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,13 @@ use crate::ops::{Deref, DerefMut};
1818/// stabilized, it is recommended to use a newtype wrapper around an empty
1919/// byte array. See the [Nomicon] for details.
2020///
21+ /// One could use `std::os::raw::c_void` if they want to support old Rust
22+ /// compiler down to 1.1.0. After Rust 1.30.0, it was re-exported by
23+ /// this definition. For more information, please read [RFC 2521].
24+ ///
2125/// [pointer]: ../../std/primitive.pointer.html
2226/// [Nomicon]: https://doc.rust-lang.org/nomicon/ffi.html#representing-opaque-structs
27+ /// [RFC 2521]: https://github.com/rust-lang/rfcs/blob/master/text/2521-c_void-reunification.md
2328// N.B., for LLVM to recognize the void pointer type and by extension
2429// functions like malloc(), we need to have it represented as i8* in
2530// LLVM bitcode. The enum used here ensures this and prevents misuse
@@ -29,7 +34,7 @@ use crate::ops::{Deref, DerefMut};
2934// would be uninhabited and at least dereferencing such pointers would
3035// be UB.
3136#[ repr( u8 ) ]
32- #[ stable( feature = "raw_os " , since = "1.1 .0" ) ]
37+ #[ stable( feature = "core_c_void " , since = "1.30 .0" ) ]
3338pub enum c_void {
3439 #[ unstable( feature = "c_void_variant" , reason = "temporary implementation detail" ,
3540 issue = "0" ) ]
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ pub use self::c_str::{FromBytesWithNulError};
163163#[ stable( feature = "rust1" , since = "1.0.0" ) ]
164164pub use self :: os_str:: { OsString , OsStr } ;
165165
166- #[ stable( feature = "raw_os " , since = "1.1 .0" ) ]
166+ #[ stable( feature = "core_c_void " , since = "1.30 .0" ) ]
167167pub use core:: ffi:: c_void;
168168
169169#[ unstable( feature = "c_variadic" ,
You can’t perform that action at this time.
0 commit comments