Skip to content

Commit eaeb113

Browse files
authored
Rollup merge of rust-lang#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: - rust-lang#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 rust-lang#41260 r? @varkor
2 parents 877dc9d + 62714f8 commit eaeb113

File tree

112 files changed

+384
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+384
-385
lines changed

src/liballoc/boxed.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ impl<T: ?Sized> Box<T> {
476476
Box::into_unique(b).into()
477477
}
478478

479-
#[unstable(feature = "ptr_internals", issue = "0", reason = "use into_raw_non_null instead")]
479+
#[unstable(feature = "ptr_internals", issue = "none", reason = "use into_raw_non_null instead")]
480480
#[inline]
481481
#[doc(hidden)]
482482
pub fn into_unique(b: Box<T>) -> Unique<T> {
@@ -830,7 +830,7 @@ impl From<Box<str>> for Box<[u8]> {
830830
}
831831
}
832832

833-
#[unstable(feature = "boxed_slice_try_from", issue = "0")]
833+
#[unstable(feature = "boxed_slice_try_from", issue = "none")]
834834
impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]>
835835
where
836836
[T; N]: LengthAtMost32,
@@ -946,7 +946,7 @@ impl<T: ?Sized> DerefMut for Box<T> {
946946
}
947947
}
948948

949-
#[unstable(feature = "receiver_trait", issue = "0")]
949+
#[unstable(feature = "receiver_trait", issue = "none")]
950950
impl<T: ?Sized> Receiver for Box<T> {}
951951

952952
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1040,7 +1040,7 @@ impl<A, F: Fn<A> + ?Sized> Fn<A> for Box<F> {
10401040
#[unstable(feature = "coerce_unsized", issue = "27732")]
10411041
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}
10421042

1043-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
1043+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
10441044
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Box<U>> for Box<T> {}
10451045

10461046
#[stable(feature = "boxed_slice_from_iter", since = "1.32.0")]

src/liballoc/collections/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub enum TryReserveError {
5757
layout: Layout,
5858

5959
#[doc(hidden)]
60-
#[unstable(feature = "container_error_extra", issue = "0", reason = "\
60+
#[unstable(feature = "container_error_extra", issue = "none", reason = "\
6161
Enable exposing the allocator’s custom error value \
6262
if an associated type is added in the future: \
6363
https://github.com/rust-lang/wg-allocators/issues/23")]

src/liballoc/fmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@
514514
515515
#![stable(feature = "rust1", since = "1.0.0")]
516516

517-
#[unstable(feature = "fmt_internals", issue = "0")]
517+
#[unstable(feature = "fmt_internals", issue = "none")]
518518
pub use core::fmt::rt;
519519
#[stable(feature = "fmt_flags_align", since = "1.28.0")]
520520
pub use core::fmt::Alignment;

src/liballoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ mod std {
171171
}
172172

173173
#[doc(hidden)]
174-
#[unstable(feature = "liballoc_internals", issue = "0", reason = "implementation detail")]
174+
#[unstable(feature = "liballoc_internals", issue = "none", reason = "implementation detail")]
175175
pub mod __export {
176176
pub use core::format_args;
177177
}

src/liballoc/raw_vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "0")]
1+
#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "none")]
22
#![doc(hidden)]
33

44
use core::cmp;

src/liballoc/rc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ impl<T: ?Sized> !marker::Sync for Rc<T> {}
291291
#[unstable(feature = "coerce_unsized", issue = "27732")]
292292
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {}
293293

294-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
294+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
295295
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Rc<U>> for Rc<T> {}
296296

297297
impl<T: ?Sized> Rc<T> {
@@ -1090,7 +1090,7 @@ impl<T: ?Sized> Deref for Rc<T> {
10901090
}
10911091
}
10921092

1093-
#[unstable(feature = "receiver_trait", issue = "0")]
1093+
#[unstable(feature = "receiver_trait", issue = "none")]
10941094
impl<T: ?Sized> Receiver for Rc<T> {}
10951095

10961096
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1471,7 +1471,7 @@ impl<T> From<Vec<T>> for Rc<[T]> {
14711471
}
14721472
}
14731473

1474-
#[unstable(feature = "boxed_slice_try_from", issue = "0")]
1474+
#[unstable(feature = "boxed_slice_try_from", issue = "none")]
14751475
impl<T, const N: usize> TryFrom<Rc<[T]>> for Rc<[T; N]>
14761476
where
14771477
[T; N]: LengthAtMost32,
@@ -1621,7 +1621,7 @@ impl<T: ?Sized> !marker::Sync for Weak<T> {}
16211621
#[unstable(feature = "coerce_unsized", issue = "27732")]
16221622
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
16231623

1624-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
1624+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
16251625
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Weak<U>> for Weak<T> {}
16261626

16271627
impl<T> Weak<T> {

src/liballoc/sync.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ unsafe impl<T: ?Sized + Sync + Send> Sync for Arc<T> {}
206206
#[unstable(feature = "coerce_unsized", issue = "27732")]
207207
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
208208

209-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
209+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
210210
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Arc<U>> for Arc<T> {}
211211

212212
impl<T: ?Sized> Arc<T> {
@@ -263,7 +263,7 @@ unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> {}
263263

264264
#[unstable(feature = "coerce_unsized", issue = "27732")]
265265
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
266-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
266+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
267267
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Weak<U>> for Weak<T> {}
268268

269269
#[stable(feature = "arc_weak", since = "1.4.0")]
@@ -993,7 +993,7 @@ impl<T: ?Sized> Deref for Arc<T> {
993993
}
994994
}
995995

996-
#[unstable(feature = "receiver_trait", issue = "0")]
996+
#[unstable(feature = "receiver_trait", issue = "none")]
997997
impl<T: ?Sized> Receiver for Arc<T> {}
998998

999999
impl<T: Clone> Arc<T> {
@@ -2032,7 +2032,7 @@ impl<T> From<Vec<T>> for Arc<[T]> {
20322032
}
20332033
}
20342034

2035-
#[unstable(feature = "boxed_slice_try_from", issue = "0")]
2035+
#[unstable(feature = "boxed_slice_try_from", issue = "none")]
20362036
impl<T, const N: usize> TryFrom<Arc<[T]>> for Arc<[T; N]>
20372037
where
20382038
[T; N]: LengthAtMost32,

src/libcore/array/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl TryFromSliceError {
7474
#[unstable(feature = "array_error_internals",
7575
reason = "available through Error trait and this method should not \
7676
be exposed publicly",
77-
issue = "0")]
77+
issue = "none")]
7878
#[inline]
7979
#[doc(hidden)]
8080
pub fn __description(&self) -> &str {
@@ -388,14 +388,14 @@ where
388388
#[rustc_on_unimplemented(
389389
message="arrays only have std trait implementations for lengths 0..=32",
390390
)]
391-
#[unstable(feature = "const_generic_impls_guard", issue = "0",
391+
#[unstable(feature = "const_generic_impls_guard", issue = "none",
392392
reason = "will never be stable, just a temporary step until const generics are stable")]
393393
pub trait LengthAtMost32 {}
394394

395395
macro_rules! array_impls {
396396
($($N:literal)+) => {
397397
$(
398-
#[unstable(feature = "const_generic_impls_guard", issue = "0")]
398+
#[unstable(feature = "const_generic_impls_guard", issue = "none")]
399399
impl<T> LengthAtMost32 for [T; $N] {}
400400
)+
401401
}

src/libcore/char/convert.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl ParseCharError {
169169
#[unstable(
170170
feature = "char_error_internals",
171171
reason = "this method should not be available publicly",
172-
issue = "0"
172+
issue = "none"
173173
)]
174174
#[doc(hidden)]
175175
pub fn __description(&self) -> &str {

src/libcore/clone.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ pub macro Clone($item:item) {
150150
#[unstable(
151151
feature = "derive_clone_copy",
152152
reason = "deriving hack, should not be public",
153-
issue = "0"
153+
issue = "none"
154154
)]
155155
pub struct AssertParamIsClone<T: Clone + ?Sized> {
156156
_field: crate::marker::PhantomData<T>,
@@ -160,7 +160,7 @@ pub struct AssertParamIsClone<T: Clone + ?Sized> {
160160
#[unstable(
161161
feature = "derive_clone_copy",
162162
reason = "deriving hack, should not be public",
163-
issue = "0"
163+
issue = "none"
164164
)]
165165
pub struct AssertParamIsCopy<T: Copy + ?Sized> {
166166
_field: crate::marker::PhantomData<T>,

src/libcore/cmp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ pub macro Eq($item:item) { /* compiler built-in */ }
288288
#[allow(missing_debug_implementations)]
289289
#[unstable(feature = "derive_eq",
290290
reason = "deriving hack, should not be public",
291-
issue = "0")]
291+
issue = "none")]
292292
pub struct AssertParamIsEq<T: Eq + ?Sized> { _field: crate::marker::PhantomData<T> }
293293

294294
/// An `Ordering` is the result of a comparison between two values.

src/libcore/ffi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ pub enum c_void {
3838
#[unstable(
3939
feature = "c_void_variant",
4040
reason = "temporary implementation detail",
41-
issue = "0"
41+
issue = "none"
4242
)]
4343
#[doc(hidden)]
4444
__variant1,
4545
#[unstable(
4646
feature = "c_void_variant",
4747
reason = "temporary implementation detail",
48-
issue = "0"
48+
issue = "none"
4949
)]
5050
#[doc(hidden)]
5151
__variant2,

src/libcore/fmt/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub enum Alignment {
3535
#[stable(feature = "debug_builders", since = "1.2.0")]
3636
pub use self::builders::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple};
3737

38-
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
38+
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
3939
#[doc(hidden)]
4040
pub mod rt {
4141
pub mod v1;
@@ -259,7 +259,7 @@ struct Void {
259259
/// types, and then this struct is used to canonicalize arguments to one type.
260260
#[derive(Copy, Clone)]
261261
#[allow(missing_debug_implementations)]
262-
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
262+
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
263263
#[doc(hidden)]
264264
pub struct ArgumentV1<'a> {
265265
value: &'a Void,
@@ -273,13 +273,13 @@ impl<'a> ArgumentV1<'a> {
273273
}
274274

275275
#[doc(hidden)]
276-
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
276+
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
277277
pub fn new<'b, T>(x: &'b T, f: fn(&T, &mut Formatter<'_>) -> Result) -> ArgumentV1<'b> {
278278
unsafe { ArgumentV1 { formatter: mem::transmute(f), value: mem::transmute(x) } }
279279
}
280280

281281
#[doc(hidden)]
282-
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
282+
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
283283
pub fn from_usize(x: &usize) -> ArgumentV1<'_> {
284284
ArgumentV1::new(x, ArgumentV1::show_usize)
285285
}
@@ -309,7 +309,7 @@ impl<'a> Arguments<'a> {
309309
/// Arguments structure.
310310
#[doc(hidden)]
311311
#[inline]
312-
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
312+
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
313313
pub fn new_v1(pieces: &'a [&'a str], args: &'a [ArgumentV1<'a>]) -> Arguments<'a> {
314314
Arguments { pieces, fmt: None, args }
315315
}
@@ -322,7 +322,7 @@ impl<'a> Arguments<'a> {
322322
/// unsafety, but will ignore invalid .
323323
#[doc(hidden)]
324324
#[inline]
325-
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
325+
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
326326
pub fn new_v1_formatted(
327327
pieces: &'a [&'a str],
328328
args: &'a [ArgumentV1<'a>],
@@ -337,7 +337,7 @@ impl<'a> Arguments<'a> {
337337
/// when using `format!`. Note: this is neither the lower nor upper bound.
338338
#[doc(hidden)]
339339
#[inline]
340-
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
340+
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
341341
pub fn estimated_capacity(&self) -> usize {
342342
let pieces_length: usize = self.pieces.iter().map(|x| x.len()).sum();
343343

src/libcore/hash/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ use crate::marker;
9090
#[allow(deprecated)]
9191
pub use self::sip::SipHasher;
9292

93-
#[unstable(feature = "hashmap_internals", issue = "0")]
93+
#[unstable(feature = "hashmap_internals", issue = "none")]
9494
#[allow(deprecated)]
9595
#[doc(hidden)]
9696
pub use self::sip::SipHasher13;

src/libcore/hash/sip.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::ptr;
1515
/// (e.g., `collections::HashMap` uses it by default).
1616
///
1717
/// See: <https://131002.net/siphash>
18-
#[unstable(feature = "hashmap_internals", issue = "0")]
18+
#[unstable(feature = "hashmap_internals", issue = "none")]
1919
#[rustc_deprecated(
2020
since = "1.13.0",
2121
reason = "use `std::collections::hash_map::DefaultHasher` instead"
@@ -29,7 +29,7 @@ pub struct SipHasher13 {
2929
/// An implementation of SipHash 2-4.
3030
///
3131
/// See: <https://131002.net/siphash/>
32-
#[unstable(feature = "hashmap_internals", issue = "0")]
32+
#[unstable(feature = "hashmap_internals", issue = "none")]
3333
#[rustc_deprecated(
3434
since = "1.13.0",
3535
reason = "use `std::collections::hash_map::DefaultHasher` instead"
@@ -172,7 +172,7 @@ impl SipHasher {
172172
impl SipHasher13 {
173173
/// Creates a new `SipHasher13` with the two initial keys set to 0.
174174
#[inline]
175-
#[unstable(feature = "hashmap_internals", issue = "0")]
175+
#[unstable(feature = "hashmap_internals", issue = "none")]
176176
#[rustc_deprecated(
177177
since = "1.13.0",
178178
reason = "use `std::collections::hash_map::DefaultHasher` instead"
@@ -183,7 +183,7 @@ impl SipHasher13 {
183183

184184
/// Creates a `SipHasher13` that is keyed off the provided keys.
185185
#[inline]
186-
#[unstable(feature = "hashmap_internals", issue = "0")]
186+
#[unstable(feature = "hashmap_internals", issue = "none")]
187187
#[rustc_deprecated(
188188
since = "1.13.0",
189189
reason = "use `std::collections::hash_map::DefaultHasher` instead"
@@ -264,7 +264,7 @@ impl super::Hasher for SipHasher {
264264
}
265265
}
266266

267-
#[unstable(feature = "hashmap_internals", issue = "0")]
267+
#[unstable(feature = "hashmap_internals", issue = "none")]
268268
impl super::Hasher for SipHasher13 {
269269
#[inline]
270270
fn write(&mut self, msg: &[u8]) {

src/libcore/internal_macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ macro_rules! forward_ref_op_assign {
7777
}
7878

7979
/// Create a zero-size type similar to a closure type, but named.
80-
#[unstable(feature = "std_internals", issue = "0")]
80+
#[unstable(feature = "std_internals", issue = "none")]
8181
macro_rules! impl_fn_for_zst {
8282
($(
8383
$( #[$attr: meta] )*

src/libcore/intrinsics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
reason = "intrinsics are unlikely to ever be stabilized, instead \
3434
they should be used through stabilized interfaces \
3535
in the rest of the standard library",
36-
issue = "0")]
36+
issue = "none")]
3737
#![allow(missing_docs)]
3838

3939
use crate::mem;
@@ -709,7 +709,7 @@ extern "rust-intrinsic" {
709709
reason = "intrinsics are unlikely to ever be stabilized, instead \
710710
they should be used through stabilized interfaces \
711711
in the rest of the standard library",
712-
issue = "0")]
712+
issue = "none")]
713713
#[rustc_deprecated(reason = "superseded by MaybeUninit, removal planned",
714714
since = "1.38.0")]
715715
pub fn init<T>() -> T;
@@ -725,7 +725,7 @@ extern "rust-intrinsic" {
725725
reason = "intrinsics are unlikely to ever be stabilized, instead \
726726
they should be used through stabilized interfaces \
727727
in the rest of the standard library",
728-
issue = "0")]
728+
issue = "none")]
729729
#[rustc_deprecated(reason = "superseded by MaybeUninit, removal planned",
730730
since = "1.38.0")]
731731
pub fn uninit<T>() -> T;

src/libcore/macros/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ pub(crate) mod builtin {
799799
/// Same as `format_args`, but adds a newline in the end.
800800
#[unstable(
801801
feature = "format_args_nl",
802-
issue = "0",
802+
issue = "none",
803803
reason = "`format_args_nl` is only for internal \
804804
language use and is subject to change"
805805
)]

0 commit comments

Comments
 (0)