From 5f625620b5e4e29919400a0ee863942e5bf3d970 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 13 Aug 2015 10:12:38 -0700 Subject: std: Add issues to all unstable features --- src/libstd/sys/common/remutex.rs | 4 ++- src/libstd/sys/common/thread_local.rs | 2 +- src/libstd/sys/unix/ext/fs.rs | 47 +++++++++++++++++++---------------- src/libstd/sys/unix/ext/io.rs | 3 ++- src/libstd/sys/unix/ext/process.rs | 18 ++++++++------ src/libstd/sys/windows/ext/io.rs | 6 +++-- 6 files changed, 45 insertions(+), 35 deletions(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/common/remutex.rs b/src/libstd/sys/common/remutex.rs index 1676fe8220a..4df3441f87b 100644 --- a/src/libstd/sys/common/remutex.rs +++ b/src/libstd/sys/common/remutex.rs @@ -7,7 +7,9 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. -#![unstable(feature = "reentrant_mutex", reason = "new API")] + +#![unstable(feature = "reentrant_mutex", reason = "new API", + issue = "27738")] use prelude::v1::*; diff --git a/src/libstd/sys/common/thread_local.rs b/src/libstd/sys/common/thread_local.rs index f68c57c86ef..56885cdd56d 100644 --- a/src/libstd/sys/common/thread_local.rs +++ b/src/libstd/sys/common/thread_local.rs @@ -55,7 +55,7 @@ //! ``` #![allow(non_camel_case_types)] -#![unstable(feature = "thread_local_internals")] +#![unstable(feature = "thread_local_internals", issue = "0")] #![allow(dead_code)] // sys isn't exported yet use sync::atomic::{self, AtomicUsize, Ordering}; diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs index 9bcd62dbdd1..46ab83199f0 100644 --- a/src/libstd/sys/unix/ext/fs.rs +++ b/src/libstd/sys/unix/ext/fs.rs @@ -22,43 +22,43 @@ use sys::fs::MetadataExt as UnixMetadataExt; use sys; use sys_common::{FromInner, AsInner, AsInnerMut}; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const USER_READ: raw::mode_t = 0o400; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const USER_WRITE: raw::mode_t = 0o200; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const USER_EXECUTE: raw::mode_t = 0o100; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const USER_RWX: raw::mode_t = 0o700; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const GROUP_READ: raw::mode_t = 0o040; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const GROUP_WRITE: raw::mode_t = 0o020; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const GROUP_EXECUTE: raw::mode_t = 0o010; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const GROUP_RWX: raw::mode_t = 0o070; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const OTHER_READ: raw::mode_t = 0o004; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const OTHER_WRITE: raw::mode_t = 0o002; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const OTHER_EXECUTE: raw::mode_t = 0o001; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const OTHER_RWX: raw::mode_t = 0o007; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const ALL_READ: raw::mode_t = 0o444; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const ALL_WRITE: raw::mode_t = 0o222; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const ALL_EXECUTE: raw::mode_t = 0o111; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const ALL_RWX: raw::mode_t = 0o777; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const SETUID: raw::mode_t = 0o4000; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const SETGID: raw::mode_t = 0o2000; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const STICKY_BIT: raw::mode_t = 0o1000; /// Unix-specific extensions to `Permissions` @@ -178,7 +178,8 @@ impl MetadataExt for fs::Metadata { } /// Add special unix types (block/char device, fifo and socket) -#[unstable(feature = "file_type_ext", reason = "recently added API")] +#[unstable(feature = "file_type_ext", reason = "recently added API", + issue = "27796")] pub trait FileTypeExt { /// Returns whether this file type is a block device. fn is_block_device(&self) -> bool; @@ -190,7 +191,8 @@ pub trait FileTypeExt { fn is_socket(&self) -> bool; } -#[unstable(feature = "file_type_ext", reason = "recently added API")] +#[unstable(feature = "file_type_ext", reason = "recently added API", + issue = "27796")] impl FileTypeExt for fs::FileType { fn is_block_device(&self) -> bool { self.as_inner().is(libc::S_IFBLK) } fn is_char_device(&self) -> bool { self.as_inner().is(libc::S_IFCHR) } @@ -240,7 +242,8 @@ pub fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> sys::fs::symlink(src.as_ref(), dst.as_ref()) } -#[unstable(feature = "dir_builder", reason = "recently added API")] +#[unstable(feature = "dir_builder", reason = "recently added API", + issue = "27710")] /// An extension trait for `fs::DirBuilder` for unix-specific options. pub trait DirBuilderExt { /// Sets the mode to create new directories with. This option defaults to diff --git a/src/libstd/sys/unix/ext/io.rs b/src/libstd/sys/unix/ext/io.rs index 580d2dbcf74..f4184f6a5d5 100644 --- a/src/libstd/sys/unix/ext/io.rs +++ b/src/libstd/sys/unix/ext/io.rs @@ -61,7 +61,8 @@ pub trait FromRawFd { /// A trait to express the ability to consume an object and acquire ownership of /// its raw file descriptor. -#[unstable(feature = "into_raw_os", reason = "recently added API")] +#[unstable(feature = "into_raw_os", reason = "recently added API", + issue = "27797")] pub trait IntoRawFd { /// Consumes this object, returning the raw underlying file descriptor. /// diff --git a/src/libstd/sys/unix/ext/process.rs b/src/libstd/sys/unix/ext/process.rs index 4ff6daf84c1..81980ea25fb 100644 --- a/src/libstd/sys/unix/ext/process.rs +++ b/src/libstd/sys/unix/ext/process.rs @@ -32,15 +32,17 @@ pub trait CommandExt { #[stable(feature = "rust1", since = "1.0.0")] fn gid(&mut self, id: gid_t) -> &mut process::Command; - /// Create a new session (cf. `setsid(2)`) for the child process. This means that the child is - /// the leader of a new process group. The parent process remains the child reaper of the new - /// process. + /// Create a new session (cf. `setsid(2)`) for the child process. This means + /// that the child is the leader of a new process group. The parent process + /// remains the child reaper of the new process. /// - /// This is not enough to create a daemon process. The *init* process should be the child - /// reaper of a daemon. This can be achieved if the parent process exit. Moreover, a daemon - /// should not have a controlling terminal. To acheive this, a session leader (the child) must - /// spawn another process (the daemon) in the same session. - #[unstable(feature = "process_session_leader", reason = "recently added")] + /// This is not enough to create a daemon process. The *init* process should + /// be the child reaper of a daemon. This can be achieved if the parent + /// process exit. Moreover, a daemon should not have a controlling terminal. + /// To acheive this, a session leader (the child) must spawn another process + /// (the daemon) in the same session. + #[unstable(feature = "process_session_leader", reason = "recently added", + issue = "27811")] fn session_leader(&mut self, on: bool) -> &mut process::Command; } diff --git a/src/libstd/sys/windows/ext/io.rs b/src/libstd/sys/windows/ext/io.rs index 185f1abe64b..a203a23068e 100644 --- a/src/libstd/sys/windows/ext/io.rs +++ b/src/libstd/sys/windows/ext/io.rs @@ -52,7 +52,8 @@ pub trait FromRawHandle { /// A trait to express the ability to consume an object and acquire ownership of /// its raw `HANDLE`. -#[unstable(feature = "into_raw_os", reason = "recently added API")] +#[unstable(feature = "into_raw_os", reason = "recently added API", + issue = "27797")] pub trait IntoRawHandle { /// Consumes this object, returning the raw underlying handle. /// @@ -110,7 +111,8 @@ pub trait FromRawSocket { /// A trait to express the ability to consume an object and acquire ownership of /// its raw `SOCKET`. -#[unstable(feature = "into_raw_os", reason = "recently added API")] +#[unstable(feature = "into_raw_os", reason = "recently added API", + issue = "27797")] pub trait IntoRawSocket { /// Consumes this object, returning the raw underlying socket. /// -- cgit 1.4.1-3-g733a5 From 8ef1e3b77f0f0c365c6c11ebc5095997c8f0cd15 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 13 Aug 2015 13:06:25 -0700 Subject: test: Fix tests for requiring issues --- src/liballoc_jemalloc/lib.rs | 3 +- src/liballoc_system/lib.rs | 3 +- src/libstd/sys/windows/ext/fs.rs | 3 +- src/test/auxiliary/inherited_stability.rs | 4 +- src/test/auxiliary/internal_unstable.rs | 8 ++-- src/test/auxiliary/lint_output_format.rs | 6 +-- src/test/auxiliary/lint_stability.rs | 42 ++++++++++---------- src/test/auxiliary/lint_stability_fields.rs | 26 ++++++------ src/test/auxiliary/stability_cfg2.rs | 2 +- src/test/compile-fail/lint-stability-fields.rs | 24 +++++------ src/test/compile-fail/lint-stability.rs | 46 +++++++++++----------- src/test/compile-fail/missing-stability.rs | 2 +- .../compile-fail/stability-attribute-sanity.rs | 13 +++--- .../allow-warnings-cmdline-stability/bar.rs | 2 +- 14 files changed, 97 insertions(+), 87 deletions(-) (limited to 'src/libstd/sys') diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs index 2a30f88df49..4179cbe8a7b 100644 --- a/src/liballoc_jemalloc/lib.rs +++ b/src/liballoc_jemalloc/lib.rs @@ -16,7 +16,8 @@ #![cfg_attr(not(stage0), allocator)] #![unstable(feature = "alloc_jemalloc", reason = "this library is unlikely to be stabilized in its current \ - form or name")] + form or name", + issue = "27783")] #![feature(allocator)] #![feature(libc)] #![feature(no_std)] diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index 0687ced7da1..aff4bea19e0 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -16,7 +16,8 @@ #![cfg_attr(not(stage0), allocator)] #![unstable(feature = "alloc_system", reason = "this library is unlikely to be stabilized in its current \ - form or name")] + form or name", + issue = "27783")] #![feature(allocator)] #![feature(libc)] #![feature(no_std)] diff --git a/src/libstd/sys/windows/ext/fs.rs b/src/libstd/sys/windows/ext/fs.rs index 66f42db42cf..9fe6527d89e 100644 --- a/src/libstd/sys/windows/ext/fs.rs +++ b/src/libstd/sys/windows/ext/fs.rs @@ -20,7 +20,8 @@ use sys_common::{AsInnerMut, AsInner}; /// Windows-specific extensions to `OpenOptions` #[unstable(feature = "open_options_ext", - reason = "may require more thought/methods")] + reason = "may require more thought/methods", + issue = "27720")] pub trait OpenOptionsExt { /// Overrides the `dwDesiredAccess` argument to the call to `CreateFile` /// with the specified value. diff --git a/src/test/auxiliary/inherited_stability.rs b/src/test/auxiliary/inherited_stability.rs index c09cc53466d..f4e6f6d7511 100644 --- a/src/test/auxiliary/inherited_stability.rs +++ b/src/test/auxiliary/inherited_stability.rs @@ -9,7 +9,7 @@ // except according to those terms. #![crate_name="inherited_stability"] #![crate_type = "lib"] -#![unstable(feature = "test_feature")] +#![unstable(feature = "test_feature", issue = "0")] #![feature(staged_api)] #![staged_api] @@ -26,7 +26,7 @@ pub mod stable_mod { pub fn stable() {} } -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub mod unstable_mod { #[stable(feature = "test_feature", since = "1.0.0")] #[deprecated(since = "1.0.0")] diff --git a/src/test/auxiliary/internal_unstable.rs b/src/test/auxiliary/internal_unstable.rs index 7f682d5d8d1..d9335eb567f 100644 --- a/src/test/auxiliary/internal_unstable.rs +++ b/src/test/auxiliary/internal_unstable.rs @@ -12,24 +12,24 @@ #![staged_api] #![stable(feature = "stable", since = "1.0.0")] -#[unstable(feature = "function")] +#[unstable(feature = "function", issue = "0")] pub fn unstable() {} #[stable(feature = "stable", since = "1.0.0")] pub struct Foo { - #[unstable(feature = "struct_field")] + #[unstable(feature = "struct_field", issue = "0")] pub x: u8 } impl Foo { - #[unstable(feature = "method")] + #[unstable(feature = "method", issue = "0")] pub fn method(&self) {} } #[stable(feature = "stable", since = "1.0.0")] pub struct Bar { - #[unstable(feature = "struct2_field")] + #[unstable(feature = "struct2_field", issue = "0")] pub x: u8 } diff --git a/src/test/auxiliary/lint_output_format.rs b/src/test/auxiliary/lint_output_format.rs index 50a9202a87b..51fad3ce3cd 100644 --- a/src/test/auxiliary/lint_output_format.rs +++ b/src/test/auxiliary/lint_output_format.rs @@ -12,7 +12,7 @@ #![crate_type = "lib"] #![feature(staged_api)] #![staged_api] -#![unstable(feature = "test_feature")] +#![unstable(feature = "test_feature", issue = "0")] #[stable(feature = "test_feature", since = "1.0.0")] #[deprecated(since = "1.0.0")] @@ -20,12 +20,12 @@ pub fn foo() -> usize { 20 } -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub fn bar() -> usize { 40 } -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub fn baz() -> usize { 30 } diff --git a/src/test/auxiliary/lint_stability.rs b/src/test/auxiliary/lint_stability.rs index bb3b71bc244..60097393a25 100644 --- a/src/test/auxiliary/lint_stability.rs +++ b/src/test/auxiliary/lint_stability.rs @@ -20,16 +20,16 @@ pub fn deprecated() {} #[deprecated(since = "1.0.0", reason = "text")] pub fn deprecated_text() {} -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub fn deprecated_unstable() {} -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0", reason = "text")] pub fn deprecated_unstable_text() {} -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub fn unstable() {} -#[unstable(feature = "test_feature", reason = "text")] +#[unstable(feature = "test_feature", reason = "text", issue = "0")] pub fn unstable_text() {} #[stable(feature = "rust1", since = "1.0.0")] @@ -48,16 +48,16 @@ impl MethodTester { #[deprecated(since = "1.0.0", reason = "text")] pub fn method_deprecated_text(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub fn method_deprecated_unstable(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0", reason = "text")] pub fn method_deprecated_unstable_text(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub fn method_unstable(&self) {} - #[unstable(feature = "test_feature", reason = "text")] + #[unstable(feature = "test_feature", reason = "text", issue = "0")] pub fn method_unstable_text(&self) {} #[stable(feature = "rust1", since = "1.0.0")] @@ -75,16 +75,16 @@ pub trait Trait { #[deprecated(since = "1.0.0", reason = "text")] fn trait_deprecated_text(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] fn trait_deprecated_unstable(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0", reason = "text")] fn trait_deprecated_unstable_text(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] fn trait_unstable(&self) {} - #[unstable(feature = "test_feature", reason = "text")] + #[unstable(feature = "test_feature", reason = "text", issue = "0")] fn trait_unstable_text(&self) {} #[stable(feature = "rust1", since = "1.0.0")] @@ -95,7 +95,7 @@ pub trait Trait { impl Trait for MethodTester {} -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub trait UnstableTrait { fn dummy(&self) { } } #[stable(feature = "test_feature", since = "1.0.0")] @@ -103,12 +103,12 @@ pub trait UnstableTrait { fn dummy(&self) { } } pub struct DeprecatedStruct { #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize } -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub struct DeprecatedUnstableStruct { #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize } -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub struct UnstableStruct { #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize } @@ -120,10 +120,10 @@ pub struct StableStruct { #[stable(feature = "test_feature", since = "1.0.0")] #[deprecated(since = "1.0.0")] pub struct DeprecatedUnitStruct; -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub struct DeprecatedUnstableUnitStruct; -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub struct UnstableUnitStruct; #[stable(feature = "rust1", since = "1.0.0")] pub struct StableUnitStruct; @@ -133,10 +133,10 @@ pub enum Enum { #[stable(feature = "test_feature", since = "1.0.0")] #[deprecated(since = "1.0.0")] DeprecatedVariant, - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] DeprecatedUnstableVariant, - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] UnstableVariant, #[stable(feature = "rust1", since = "1.0.0")] @@ -146,10 +146,10 @@ pub enum Enum { #[stable(feature = "test_feature", since = "1.0.0")] #[deprecated(since = "1.0.0")] pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize); -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize); -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize); #[stable(feature = "rust1", since = "1.0.0")] pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize); diff --git a/src/test/auxiliary/lint_stability_fields.rs b/src/test/auxiliary/lint_stability_fields.rs index 66940ee0081..b45af89dd3b 100644 --- a/src/test/auxiliary/lint_stability_fields.rs +++ b/src/test/auxiliary/lint_stability_fields.rs @@ -16,45 +16,47 @@ pub struct Stable { #[stable(feature = "rust1", since = "1.0.0")] pub inherit: u8, // it's a lie (stable doesn't inherit) - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub override1: u8, #[deprecated(since = "1.0.0")] - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub override2: u8, } #[stable(feature = "rust1", since = "1.0.0")] pub struct Stable2(#[stable(feature = "rust1", since = "1.0.0")] pub u8, - #[unstable(feature = "test_feature")] pub u8, - #[unstable(feature = "test_feature")] #[deprecated(since = "1.0.0")] pub u8); + #[unstable(feature = "test_feature", issue = "0")] pub u8, + #[unstable(feature = "test_feature", issue = "0")] + #[deprecated(since = "1.0.0")] pub u8); -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub struct Unstable { pub inherit: u8, #[stable(feature = "rust1", since = "1.0.0")] pub override1: u8, #[deprecated(since = "1.0.0")] - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub override2: u8, } -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] pub struct Unstable2(pub u8, #[stable(feature = "rust1", since = "1.0.0")] pub u8, - #[unstable(feature = "test_feature")] #[deprecated(since = "1.0.0")] pub u8); + #[unstable(feature = "test_feature", issue = "0")] + #[deprecated(since = "1.0.0")] pub u8); -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] #[deprecated(feature = "rust1", since = "1.0.0")] pub struct Deprecated { pub inherit: u8, #[stable(feature = "rust1", since = "1.0.0")] pub override1: u8, - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub override2: u8, } -#[unstable(feature = "test_feature")] +#[unstable(feature = "test_feature", issue = "0")] #[deprecated(feature = "rust1", since = "1.0.0")] pub struct Deprecated2(pub u8, #[stable(feature = "rust1", since = "1.0.0")] pub u8, - #[unstable(feature = "test_feature")] pub u8); + #[unstable(feature = "test_feature", issue = "0")] pub u8); diff --git a/src/test/auxiliary/stability_cfg2.rs b/src/test/auxiliary/stability_cfg2.rs index d9ed76e5c58..8277280f069 100644 --- a/src/test/auxiliary/stability_cfg2.rs +++ b/src/test/auxiliary/stability_cfg2.rs @@ -10,7 +10,7 @@ // compile-flags:--cfg foo -#![cfg_attr(foo, unstable(feature = "test_feature"))] +#![cfg_attr(foo, unstable(feature = "test_feature", issue = "0"))] #![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))] #![feature(staged_api)] #![staged_api] diff --git a/src/test/compile-fail/lint-stability-fields.rs b/src/test/compile-fail/lint-stability-fields.rs index db58f930a02..7e675ca0bc4 100644 --- a/src/test/compile-fail/lint-stability-fields.rs +++ b/src/test/compile-fail/lint-stability-fields.rs @@ -187,48 +187,50 @@ mod this_crate { #[stable(feature = "rust1", since = "1.0.0")] struct Stable { inherit: u8, - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] override1: u8, #[deprecated(since = "1.0.0")] - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] override2: u8, } #[stable(feature = "rust1", since = "1.0.0")] struct Stable2(u8, #[stable(feature = "rust1", since = "1.0.0")] u8, - #[unstable(feature = "test_feature")] #[deprecated(since = "1.0.0")] u8); + #[unstable(feature = "test_feature", issue = "0")] + #[deprecated(since = "1.0.0")] u8); - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] struct Unstable { inherit: u8, #[stable(feature = "rust1", since = "1.0.0")] override1: u8, #[deprecated(since = "1.0.0")] - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] override2: u8, } - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] struct Unstable2(u8, #[stable(feature = "rust1", since = "1.0.0")] u8, - #[unstable(feature = "test_feature")] #[deprecated(since = "1.0.0")] u8); + #[unstable(feature = "test_feature", issue = "0")] + #[deprecated(since = "1.0.0")] u8); - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(feature = "rust1", since = "1.0.0")] struct Deprecated { inherit: u8, #[stable(feature = "rust1", since = "1.0.0")] override1: u8, - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] override2: u8, } - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(feature = "rust1", since = "1.0.0")] struct Deprecated2(u8, #[stable(feature = "rust1", since = "1.0.0")] u8, - #[unstable(feature = "test_feature")] u8); + #[unstable(feature = "test_feature", issue = "0")] u8); pub fn foo() { let x = Stable { diff --git a/src/test/compile-fail/lint-stability.rs b/src/test/compile-fail/lint-stability.rs index 4cba12d7b35..6cc73ded975 100644 --- a/src/test/compile-fail/lint-stability.rs +++ b/src/test/compile-fail/lint-stability.rs @@ -257,16 +257,16 @@ mod inheritance { } mod this_crate { - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub fn deprecated() {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0", reason = "text")] pub fn deprecated_text() {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub fn unstable() {} - #[unstable(feature = "test_feature", reason = "text")] + #[unstable(feature = "test_feature", reason = "text", issue = "0")] pub fn unstable_text() {} #[stable(feature = "rust1", since = "1.0.0")] @@ -278,16 +278,16 @@ mod this_crate { pub struct MethodTester; impl MethodTester { - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub fn method_deprecated(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0", reason = "text")] pub fn method_deprecated_text(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub fn method_unstable(&self) {} - #[unstable(feature = "test_feature", reason = "text")] + #[unstable(feature = "test_feature", reason = "text", issue = "0")] pub fn method_unstable_text(&self) {} #[stable(feature = "rust1", since = "1.0.0")] @@ -297,16 +297,16 @@ mod this_crate { } pub trait Trait { - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] fn trait_deprecated(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0", reason = "text")] fn trait_deprecated_text(&self) {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] fn trait_unstable(&self) {} - #[unstable(feature = "test_feature", reason = "text")] + #[unstable(feature = "test_feature", reason = "text", issue = "0")] fn trait_unstable_text(&self) {} #[stable(feature = "rust1", since = "1.0.0")] @@ -317,12 +317,12 @@ mod this_crate { impl Trait for MethodTester {} - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub struct DeprecatedStruct { #[stable(feature = "test_feature", since = "1.0.0")] i: isize } - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub struct UnstableStruct { #[stable(feature = "test_feature", since = "1.0.0")] i: isize } @@ -331,29 +331,29 @@ mod this_crate { #[stable(feature = "test_feature", since = "1.0.0")] i: isize } - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub struct DeprecatedUnitStruct; - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub struct UnstableUnitStruct; #[stable(feature = "rust1", since = "1.0.0")] pub struct StableUnitStruct; pub enum Enum { - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] DeprecatedVariant, - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] UnstableVariant, #[stable(feature = "rust1", since = "1.0.0")] StableVariant, } - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub struct DeprecatedTupleStruct(isize); - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] pub struct UnstableTupleStruct(isize); #[stable(feature = "rust1", since = "1.0.0")] pub struct StableTupleStruct(isize); @@ -471,7 +471,7 @@ mod this_crate { foo.trait_stable(); } - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] fn test_fn_body() { fn fn_in_body() {} @@ -479,7 +479,7 @@ mod this_crate { } impl MethodTester { - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] fn test_method_body(&self) { fn fn_in_body() {} @@ -487,7 +487,7 @@ mod this_crate { } } - #[unstable(feature = "test_feature")] + #[unstable(feature = "test_feature", issue = "0")] #[deprecated(since = "1.0.0")] pub trait DeprecatedTrait { fn dummy(&self) { } diff --git a/src/test/compile-fail/missing-stability.rs b/src/test/compile-fail/missing-stability.rs index cf7a8378b9a..1f68b7dbf5e 100644 --- a/src/test/compile-fail/missing-stability.rs +++ b/src/test/compile-fail/missing-stability.rs @@ -19,7 +19,7 @@ pub fn unmarked() { () } -#[unstable(feature = "foo")] +#[unstable(feature = "foo", issue = "0")] pub mod foo { // #[unstable] is inherited pub fn unmarked() {} diff --git a/src/test/compile-fail/stability-attribute-sanity.rs b/src/test/compile-fail/stability-attribute-sanity.rs index f0597d57b79..00c5be0f211 100644 --- a/src/test/compile-fail/stability-attribute-sanity.rs +++ b/src/test/compile-fail/stability-attribute-sanity.rs @@ -56,11 +56,14 @@ mod bogus_attribute_types_2 { } mod missing_feature_names { - #[unstable(since = "a")] //~ ERROR missing 'feature' + #[unstable(since = "a", issue = "0")] //~ ERROR missing 'feature' fn f1() { } + #[unstable(feature = "a")] + fn f2() { } //~ ERROR need to point to an issue + #[stable(since = "a")] //~ ERROR missing 'feature' - fn f2() { } + fn f3() { } } mod missing_version { @@ -72,12 +75,12 @@ mod missing_version { fn f2() { } } -#[unstable(feature = "a", since = "b")] +#[unstable(feature = "a", since = "b", issue = "0")] #[stable(feature = "a", since = "b")] fn multiple1() { } //~ ERROR multiple stability levels -#[unstable(feature = "a", since = "b")] -#[unstable(feature = "a", since = "b")] +#[unstable(feature = "a", since = "b", issue = "0")] +#[unstable(feature = "a", since = "b", issue = "0")] fn multiple2() { } //~ ERROR multiple stability levels #[stable(feature = "a", since = "b")] diff --git a/src/test/run-make/allow-warnings-cmdline-stability/bar.rs b/src/test/run-make/allow-warnings-cmdline-stability/bar.rs index 6a683d96b03..9c24694951a 100644 --- a/src/test/run-make/allow-warnings-cmdline-stability/bar.rs +++ b/src/test/run-make/allow-warnings-cmdline-stability/bar.rs @@ -11,6 +11,6 @@ #![crate_type = "lib"] #![feature(staged_api)] #![staged_api] -#![unstable(feature = "test_feature")] +#![unstable(feature = "test_feature", issue = "0")] pub fn baz() { } -- cgit 1.4.1-3-g733a5