about summary refs log tree commit diff
path: root/library/alloc/src/ffi
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-04-06 17:04:18 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-04-14 21:53:11 +0300
commit7f3cc2fbbfbbc257a8763ae817a69452b9a7e31d (patch)
tree4a07d582513528e76f45291d166f5da25f5f09dd /library/alloc/src/ffi
parent5bee741a08a267f68ac6c3d24dadfe927bd45008 (diff)
library: Use type aliases to make `CStr(ing)` in libcore/liballoc unstable
Diffstat (limited to 'library/alloc/src/ffi')
-rw-r--r--library/alloc/src/ffi/c_str.rs8
-rw-r--r--library/alloc/src/ffi/mod.rs4
2 files changed, 6 insertions, 6 deletions
diff --git a/library/alloc/src/ffi/c_str.rs b/library/alloc/src/ffi/c_str.rs
index 21433a3baa9..6a522c0cada 100644
--- a/library/alloc/src/ffi/c_str.rs
+++ b/library/alloc/src/ffi/c_str.rs
@@ -106,7 +106,7 @@ use core::str::{self, Utf8Error};
 /// and other memory errors.
 #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone)]
 #[cfg_attr(not(test), rustc_diagnostic_item = "cstring_type")]
-#[stable(feature = "rust1", since = "1.0.0")]
+#[unstable(feature = "alloc_c_string", issue = "94079")]
 pub struct CString {
     // Invariant 1: the slice ends with a zero byte and has a length of at least one.
     // Invariant 2: the slice contains only one zero byte.
@@ -130,7 +130,7 @@ pub struct CString {
 /// let _: NulError = CString::new(b"f\0oo".to_vec()).unwrap_err();
 /// ```
 #[derive(Clone, PartialEq, Eq, Debug)]
-#[stable(feature = "rust1", since = "1.0.0")]
+#[unstable(feature = "alloc_c_string", issue = "94079")]
 pub struct NulError(usize, Vec<u8>);
 
 #[derive(Clone, PartialEq, Eq, Debug)]
@@ -155,7 +155,7 @@ enum FromBytesWithNulErrorKind {
 /// let _: FromVecWithNulError = CString::from_vec_with_nul(b"f\0oo".to_vec()).unwrap_err();
 /// ```
 #[derive(Clone, PartialEq, Eq, Debug)]
-#[stable(feature = "cstring_from_vec_with_nul", since = "1.58.0")]
+#[unstable(feature = "alloc_c_string", issue = "94079")]
 pub struct FromVecWithNulError {
     error_kind: FromBytesWithNulErrorKind,
     bytes: Vec<u8>,
@@ -221,7 +221,7 @@ impl FromVecWithNulError {
 /// This `struct` is created by [`CString::into_string()`]. See
 /// its documentation for more.
 #[derive(Clone, PartialEq, Eq, Debug)]
-#[stable(feature = "cstring_into", since = "1.7.0")]
+#[unstable(feature = "alloc_c_string", issue = "94079")]
 pub struct IntoStringError {
     inner: CString,
     error: Utf8Error,
diff --git a/library/alloc/src/ffi/mod.rs b/library/alloc/src/ffi/mod.rs
index 6b2e4af45b2..eed2851c153 100644
--- a/library/alloc/src/ffi/mod.rs
+++ b/library/alloc/src/ffi/mod.rs
@@ -83,9 +83,9 @@
 #[cfg(bootstrap)]
 #[unstable(feature = "cstr_internals", issue = "none")]
 pub use self::c_str::CStrExt;
-#[stable(feature = "cstring_from_vec_with_nul", since = "1.58.0")]
+#[unstable(feature = "alloc_c_string", issue = "94079")]
 pub use self::c_str::FromVecWithNulError;
-#[stable(feature = "rust1", since = "1.0.0")]
+#[unstable(feature = "alloc_c_string", issue = "94079")]
 pub use self::c_str::{CString, IntoStringError, NulError};
 
 mod c_str;