Skip to content

Commit

Permalink
test: Fix tests for requiring issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Aug 16, 2015
1 parent 2972b77 commit 8ef1e3b
Show file tree
Hide file tree
Showing 14 changed files with 97 additions and 87 deletions.
3 changes: 2 additions & 1 deletion src/liballoc_jemalloc/lib.rs
Expand Up @@ -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)]
Expand Down
3 changes: 2 additions & 1 deletion src/liballoc_system/lib.rs
Expand Up @@ -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)]
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/sys/windows/ext/fs.rs
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/test/auxiliary/inherited_stability.rs
Expand Up @@ -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]

Expand All @@ -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")]
Expand Down
8 changes: 4 additions & 4 deletions src/test/auxiliary/internal_unstable.rs
Expand Up @@ -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
}

Expand Down
6 changes: 3 additions & 3 deletions src/test/auxiliary/lint_output_format.rs
Expand Up @@ -12,20 +12,20 @@
#![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")]
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
}
42 changes: 21 additions & 21 deletions src/test/auxiliary/lint_stability.rs
Expand Up @@ -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")]
Expand All @@ -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")]
Expand All @@ -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")]
Expand All @@ -95,20 +95,20 @@ 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")]
#[deprecated(since = "1.0.0")]
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
}
Expand All @@ -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;
Expand All @@ -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")]
Expand All @@ -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);
Expand Down
26 changes: 14 additions & 12 deletions src/test/auxiliary/lint_stability_fields.rs
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion src/test/auxiliary/stability_cfg2.rs
Expand Up @@ -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]
24 changes: 13 additions & 11 deletions src/test/compile-fail/lint-stability-fields.rs
Expand Up @@ -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 {
Expand Down

0 comments on commit 8ef1e3b

Please sign in to comment.