about summary refs log tree commit diff
path: root/src/libcore/ptr
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-22 02:40:04 +0100
committerGitHub <noreply@github.com>2019-12-22 02:40:04 +0100
commiteaeb1138c6e4956a416e161ffc03eaf7db832101 (patch)
tree38ba6a99e4e17147adca35c2543c1adf065a0ead /src/libcore/ptr
parent877dc9daa8eebee7a6e4dc5fc7df6770a086df59 (diff)
parent62714f8b170dadc381fd9883031d42ba2ee8ece9 (diff)
downloadrust-eaeb1138c6e4956a416e161ffc03eaf7db832101.tar.gz
rust-eaeb1138c6e4956a416e161ffc03eaf7db832101.zip
Rollup merge of #67480 - rossmacarthur:fix-41260-avoid-issue-0-part-2, r=Centril
Require issue = "none" over issue = "0" in unstable attributes

These changes make the use of `issue = "none"` required in unstable attributes throughout the compiler.

Notes:
- #66299 is now in beta so `issue = "none"` is accepted.
- The `tidy` tool now fails on `issue = "0"`.
- Tests that used `issue = "0"` were changed to use `issue = "none"`, except for _one_ that asserts `issue = "0"` can still be used.
- The compiler still allows `issue = "0"` because some submodules require it, this could be disallowed once these are updated.

Resolves #41260

r? @varkor
Diffstat (limited to 'src/libcore/ptr')
-rw-r--r--src/libcore/ptr/mod.rs2
-rw-r--r--src/libcore/ptr/non_null.rs4
-rw-r--r--src/libcore/ptr/unique.rs28
3 files changed, 17 insertions, 17 deletions
diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs
index 924563fc44f..d42b673ff65 100644
--- a/src/libcore/ptr/mod.rs
+++ b/src/libcore/ptr/mod.rs
@@ -89,7 +89,7 @@ mod non_null;
 pub use non_null::NonNull;
 
 mod unique;
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 pub use unique::Unique;
 
 mod const_ptr;
diff --git a/src/libcore/ptr/non_null.rs b/src/libcore/ptr/non_null.rs
index 6946fd2413e..626e58d4930 100644
--- a/src/libcore/ptr/non_null.rs
+++ b/src/libcore/ptr/non_null.rs
@@ -149,7 +149,7 @@ impl<T: ?Sized> Copy for NonNull<T> {}
 #[unstable(feature = "coerce_unsized", issue = "27732")]
 impl<T: ?Sized, U: ?Sized> CoerceUnsized<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
 
-#[unstable(feature = "dispatch_from_dyn", issue = "0")]
+#[unstable(feature = "dispatch_from_dyn", issue = "none")]
 impl<T: ?Sized, U: ?Sized> DispatchFromDyn<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
 
 #[stable(feature = "nonnull", since = "1.25.0")]
@@ -201,7 +201,7 @@ impl<T: ?Sized> hash::Hash for NonNull<T> {
     }
 }
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized> From<Unique<T>> for NonNull<T> {
     #[inline]
     fn from(unique: Unique<T>) -> Self {
diff --git a/src/libcore/ptr/unique.rs b/src/libcore/ptr/unique.rs
index 546b7c9d777..87b56d951c6 100644
--- a/src/libcore/ptr/unique.rs
+++ b/src/libcore/ptr/unique.rs
@@ -29,7 +29,7 @@ use crate::ptr::NonNull;
 /// for any type which upholds Unique's aliasing requirements.
 #[unstable(
     feature = "ptr_internals",
-    issue = "0",
+    issue = "none",
     reason = "use `NonNull` instead and consider `PhantomData<T>` \
               (if you also use `#[may_dangle]`), `Send`, and/or `Sync`"
 )]
@@ -50,17 +50,17 @@ pub struct Unique<T: ?Sized> {
 /// reference is unaliased. Note that this aliasing invariant is
 /// unenforced by the type system; the abstraction using the
 /// `Unique` must enforce it.
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 unsafe impl<T: Send + ?Sized> Send for Unique<T> {}
 
 /// `Unique` pointers are `Sync` if `T` is `Sync` because the data they
 /// reference is unaliased. Note that this aliasing invariant is
 /// unenforced by the type system; the abstraction using the
 /// `Unique` must enforce it.
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 unsafe impl<T: Sync + ?Sized> Sync for Unique<T> {}
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: Sized> Unique<T> {
     /// Creates a new `Unique` that is dangling, but well-aligned.
     ///
@@ -78,7 +78,7 @@ impl<T: Sized> Unique<T> {
     }
 }
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized> Unique<T> {
     /// Creates a new `Unique`.
     ///
@@ -133,7 +133,7 @@ impl<T: ?Sized> Unique<T> {
     }
 }
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized> Clone for Unique<T> {
     #[inline]
     fn clone(&self) -> Self {
@@ -141,30 +141,30 @@ impl<T: ?Sized> Clone for Unique<T> {
     }
 }
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized> Copy for Unique<T> {}
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized, U: ?Sized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> {}
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized, U: ?Sized> DispatchFromDyn<Unique<U>> for Unique<T> where T: Unsize<U> {}
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized> fmt::Debug for Unique<T> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         fmt::Pointer::fmt(&self.as_ptr(), f)
     }
 }
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized> fmt::Pointer for Unique<T> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         fmt::Pointer::fmt(&self.as_ptr(), f)
     }
 }
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized> From<&mut T> for Unique<T> {
     #[inline]
     fn from(reference: &mut T) -> Self {
@@ -172,7 +172,7 @@ impl<T: ?Sized> From<&mut T> for Unique<T> {
     }
 }
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized> From<&T> for Unique<T> {
     #[inline]
     fn from(reference: &T) -> Self {
@@ -180,7 +180,7 @@ impl<T: ?Sized> From<&T> for Unique<T> {
     }
 }
 
-#[unstable(feature = "ptr_internals", issue = "0")]
+#[unstable(feature = "ptr_internals", issue = "none")]
 impl<T: ?Sized> From<NonNull<T>> for Unique<T> {
     #[inline]
     fn from(p: NonNull<T>) -> Self {