Set unstable feature names appropriately

* `core` - for the core crate
* `hash` - hashing
* `io` - io
* `path` - path
* `alloc` - alloc crate
* `rand` - rand crate
* `collections` - collections crate
* `std_misc` - other parts of std
* `test` - test crate
* `rustc_private` - everything else
This commit is contained in:
Brian Anderson 2015-01-22 18:22:03 -08:00
parent f86bcc1543
commit cd6d9eab5d
148 changed files with 864 additions and 741 deletions

View file

@ -9,7 +9,7 @@
// except according to those terms.
#![crate_name="inherited_stability"]
#![crate_type = "lib"]
#![unstable(feature = "unnamed_feature")]
#![unstable(feature = "test_feature")]
#![feature(staged_api)]
#![staged_api]
@ -26,9 +26,9 @@ pub mod stable_mod {
pub fn stable() {}
}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub mod unstable_mod {
#[deprecated(feature = "unnamed_feature", since = "1.0.0")]
#[deprecated(feature = "test_feature", since = "1.0.0")]
pub fn deprecated() {}
pub fn unstable() {}

View file

@ -12,19 +12,19 @@
#![crate_type = "lib"]
#![feature(staged_api)]
#![staged_api]
#![unstable(feature = "unnamed_feature")]
#![unstable(feature = "test_feature")]
#[deprecated(feature = "oldstuff", since = "1.0.0")]
pub fn foo() -> uint {
20
}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub fn bar() -> uint {
40
}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub fn baz() -> uint {
30
}

View file

@ -17,9 +17,9 @@ pub fn deprecated() {}
#[deprecated(feature = "oldstuff", since = "1.0.0", reason = "text")]
pub fn deprecated_text() {}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub fn unstable() {}
#[unstable(feature = "unnamed_feature", reason = "text")]
#[unstable(feature = "test_feature", reason = "text")]
pub fn unstable_text() {}
pub fn unmarked() {}
@ -38,9 +38,9 @@ impl MethodTester {
#[deprecated(feature = "oldstuff", since = "1.0.0", reason = "text")]
pub fn method_deprecated_text(&self) {}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub fn method_unstable(&self) {}
#[unstable(feature = "unnamed_feature", reason = "text")]
#[unstable(feature = "test_feature", reason = "text")]
pub fn method_unstable_text(&self) {}
pub fn method_unmarked(&self) {}
@ -67,9 +67,9 @@ pub trait Trait {
#[deprecated(feature = "oldstuff", since = "1.0.0", reason = "text")]
fn trait_deprecated_text(&self) {}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
fn trait_unstable(&self) {}
#[unstable(feature = "unnamed_feature", reason = "text")]
#[unstable(feature = "test_feature", reason = "text")]
fn trait_unstable_text(&self) {}
fn trait_unmarked(&self) {}
@ -92,12 +92,12 @@ pub trait Trait {
impl Trait for MethodTester {}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub trait UnstableTrait {}
#[deprecated(feature = "oldstuff", since = "1.0.0")]
pub struct DeprecatedStruct { pub i: int }
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub struct UnstableStruct { pub i: int }
pub struct UnmarkedStruct { pub i: int }
#[stable(feature = "grandfathered", since = "1.0.0")]
@ -105,7 +105,7 @@ pub struct StableStruct { pub i: int }
#[deprecated(feature = "oldstuff", since = "1.0.0")]
pub struct DeprecatedUnitStruct;
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub struct UnstableUnitStruct;
pub struct UnmarkedUnitStruct;
#[stable(feature = "grandfathered", since = "1.0.0")]
@ -114,7 +114,7 @@ pub struct StableUnitStruct;
pub enum Enum {
#[deprecated(feature = "oldstuff", since = "1.0.0")]
DeprecatedVariant,
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
UnstableVariant,
UnmarkedVariant,
@ -124,7 +124,7 @@ pub enum Enum {
#[deprecated(feature = "oldstuff", since = "1.0.0")]
pub struct DeprecatedTupleStruct(pub int);
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub struct UnstableTupleStruct(pub int);
pub struct UnmarkedTupleStruct(pub int);
#[stable(feature = "grandfathered", since = "1.0.0")]

View file

@ -9,6 +9,6 @@
// except according to those terms.
#![cfg_attr(foo, experimental)]
#![cfg_attr(not(foo), stable(feature = "unnamed_feature", since = "1.0.0"))]
#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
#![feature(staged_api)]
#![staged_api]

View file

@ -10,7 +10,7 @@
// compile-flags:--cfg foo
#![cfg_attr(foo, unstable(feature = "unnamed_feature"))]
#![cfg_attr(not(foo), stable(feature = "unnamed_feature", since = "1.0.0"))]
#![cfg_attr(foo, unstable(feature = "test_feature"))]
#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
#![feature(staged_api)]
#![staged_api]

View file

@ -12,7 +12,7 @@
// aux-build:stability_cfg2.rs
#![feature(unnamed_feature)]
#![feature(test_feature)]
#![deny(non_snake_case)] // To trigger a hard error
// Shouldn't generate a warning about unstable features

View file

@ -10,7 +10,7 @@
#![deny(dead_code)]
#![allow(unreachable_code)]
#![feature(unnamed_feature)]
#![feature(core)]
#[macro_use] extern crate core;

View file

@ -9,7 +9,7 @@
// except according to those terms.
#![deny(unused_variables)]
#![feature(unnamed_feature)]
#![feature(core)]
fn main() {
for _ in range(1is, 101) {

View file

@ -9,7 +9,7 @@
// except according to those terms.
#![deny(improper_ctypes)]
#![feature(unnamed_feature)]
#![feature(libc)]
extern crate libc;

View file

@ -14,7 +14,7 @@
#![allow(non_upper_case_globals)]
#![allow(missing_copy_implementations)]
#![deny(dead_code)]
#![feature(unnamed_feature)]
#![feature(core)]
#![crate_type="lib"]

View file

@ -11,7 +11,7 @@
#![allow(unused_variables)]
#![allow(non_camel_case_types)]
#![deny(dead_code)]
#![feature(unnamed_feature)]
#![feature(libc)]
#![crate_type="lib"]

View file

@ -11,7 +11,9 @@
#![allow(unused_variables)]
#![allow(non_camel_case_types)]
#![deny(dead_code)]
#![feature(unnamed_feature)]
#![feature(libc)]
#![feature(core)]
#![feature(collections)]
extern crate libc;

View file

@ -11,7 +11,7 @@
#![deny(exceeding_bitshifts)]
#![allow(unused_variables)]
#![allow(dead_code)]
#![feature(unnamed_feature)]
#![feature(core)]
fn main() {
let n = 1u8 << 7;

View file

@ -43,9 +43,9 @@ mod cross_crate {
foo.method_unstable(); //~ WARNING use of unstable library feature
foo.trait_unstable(); //~ WARNING use of unstable library feature
unstable_text(); //~ WARNING use of unstable library feature 'unnamed_feature': text
foo.method_unstable_text(); //~ WARNING use of unstable library feature 'unnamed_feature': text
foo.trait_unstable_text(); //~ WARNING use of unstable library feature 'unnamed_feature': text
unstable_text(); //~ WARNING use of unstable library feature 'test_feature': text
foo.method_unstable_text(); //~ WARNING use of unstable library feature 'test_feature': text
foo.trait_unstable_text(); //~ WARNING use of unstable library feature 'test_feature': text
unmarked(); //~ ERROR use of unmarked library feature
foo.method_unmarked(); //~ ERROR use of unmarked library feature
@ -94,7 +94,7 @@ mod cross_crate {
foo.trait_deprecated(); //~ ERROR use of deprecated item
foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
foo.trait_unstable(); //~ WARNING use of unstable library feature
foo.trait_unstable_text(); //~ WARNING use of unstable library feature 'unnamed_feature': text
foo.trait_unstable_text(); //~ WARNING use of unstable library feature 'test_feature': text
foo.trait_unmarked(); //~ ERROR use of unmarked library feature
foo.trait_stable();
}
@ -103,7 +103,7 @@ mod cross_crate {
foo.trait_deprecated(); //~ ERROR use of deprecated item
foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
foo.trait_unstable(); //~ WARNING use of unstable library feature
foo.trait_unstable_text(); //~ WARNING use of unstable library feature 'unnamed_feature': text
foo.trait_unstable_text(); //~ WARNING use of unstable library feature 'test_feature': text
foo.trait_unmarked(); //~ ERROR use of unmarked library feature
foo.trait_stable();
}
@ -144,9 +144,9 @@ mod this_crate {
#[deprecated(feature = "oldstuff", since = "1.0.0", reason = "text")]
pub fn deprecated_text() {}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub fn unstable() {}
#[unstable(feature = "unnamed_feature", reason = "text")]
#[unstable(feature = "test_feature", reason = "text")]
pub fn unstable_text() {}
pub fn unmarked() {}
@ -165,9 +165,9 @@ mod this_crate {
#[deprecated(feature = "oldstuff", since = "1.0.0", reason = "text")]
pub fn method_deprecated_text(&self) {}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub fn method_unstable(&self) {}
#[unstable(feature = "unnamed_feature", reason = "text")]
#[unstable(feature = "test_feature", reason = "text")]
pub fn method_unstable_text(&self) {}
pub fn method_unmarked(&self) {}
@ -184,9 +184,9 @@ mod this_crate {
#[deprecated(feature = "oldstuff", since = "1.0.0", reason = "text")]
fn trait_deprecated_text(&self) {}
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
fn trait_unstable(&self) {}
#[unstable(feature = "unnamed_feature", reason = "text")]
#[unstable(feature = "test_feature", reason = "text")]
fn trait_unstable_text(&self) {}
fn trait_unmarked(&self) {}
@ -201,7 +201,7 @@ mod this_crate {
#[deprecated(feature = "oldstuff", since = "1.0.0")]
pub struct DeprecatedStruct { i: isize }
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub struct UnstableStruct { i: isize }
pub struct UnmarkedStruct { i: isize }
#[stable(feature = "grandfathered", since = "1.0.0")]
@ -209,7 +209,7 @@ mod this_crate {
#[deprecated(feature = "oldstuff", since = "1.0.0")]
pub struct DeprecatedUnitStruct;
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub struct UnstableUnitStruct;
pub struct UnmarkedUnitStruct;
#[stable(feature = "grandfathered", since = "1.0.0")]
@ -218,7 +218,7 @@ mod this_crate {
pub enum Enum {
#[deprecated(feature = "oldstuff", since = "1.0.0")]
DeprecatedVariant,
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
UnstableVariant,
UnmarkedVariant,
@ -228,7 +228,7 @@ mod this_crate {
#[deprecated(feature = "oldstuff", since = "1.0.0")]
pub struct DeprecatedTupleStruct(isize);
#[unstable(feature = "unnamed_feature")]
#[unstable(feature = "test_feature")]
pub struct UnstableTupleStruct(isize);
pub struct UnmarkedTupleStruct(isize);
#[stable(feature = "grandfathered", since = "1.0.0")]

View file

@ -12,7 +12,9 @@
#![deny(unused_extern_crates)]
#![allow(unused_variables)]
#![feature(unnamed_feature)]
#![feature(libc)]
#![feature(collections)]
#![feature(rand)]
extern crate libc; //~ ERROR: unused extern crate

View file

@ -12,7 +12,8 @@
#![allow(dead_code)]
#![deny(non_snake_case)]
#![feature(unnamed_feature)]
#![feature(path)]
#![feature(io)]
use std::io::File;
use std::io::IoError;

View file

@ -11,7 +11,8 @@
#![deny(unused_variables)]
#![deny(unused_assignments)]
#![allow(dead_code, non_camel_case_types)]
#![feature(unnamed_feature)]
#![feature(core)]
#![feature(os)]
fn f1(x: isize) {
//~^ ERROR unused variable: `x`

View file

@ -9,7 +9,7 @@
// except according to those terms.
#![deny(unused_attributes)]
#![allow(dead_code, unused_imports)]
#![feature(unnamed_feature)]
#![feature(core)]
#![foo] //~ ERROR unused attribute