Require feature attributes, and add them where necessary

This commit is contained in:
Brian Anderson 2015-03-05 18:33:58 -08:00
parent 7770ea706b
commit df290f127e
369 changed files with 702 additions and 253 deletions

View File

@ -20,6 +20,7 @@
#![feature(std_misc)]
#![feature(test)]
#![feature(path_ext)]
#![feature(str_char)]
#![deny(warnings)]

View File

@ -36,7 +36,7 @@
#![feature(unsafe_no_drop_flag)]
#![feature(step_by)]
#![feature(str_char)]
#![cfg_attr(test, feature(rand, rustc_private, test))]
#![cfg_attr(test, feature(rand, rustc_private, test, hash, collections))]
#![cfg_attr(test, allow(deprecated))] // rand
#![feature(no_std)]

View File

@ -20,6 +20,7 @@
#![feature(unboxed_closures)]
#![feature(unicode)]
#![feature(unsafe_destructor)]
#![cfg_attr(test, feature(str_char))]
#[macro_use] extern crate log;

View File

@ -24,6 +24,8 @@
#![feature(io)]
#![feature(collections)]
#![feature(debug_builders)]
#![feature(unique)]
#![feature(step_by)]
#![allow(deprecated)] // rand
extern crate core;

View File

@ -28,6 +28,7 @@
#![feature(libc)]
#![feature(staged_api)]
#![feature(unique)]
#![cfg_attr(test, feature(rustc_private, rand, collections))]
#[cfg(test)] #[macro_use] extern crate log;

View File

@ -34,7 +34,7 @@
#![deprecated(reason = "use the crates.io `rand` library instead",
since = "1.0.0-alpha")]
#![cfg_attr(test, feature(test, rand))]
#![cfg_attr(test, feature(test, rand, rustc_private))]
#![allow(deprecated)]

View File

@ -212,7 +212,7 @@ impl LintStore {
fn maybe_stage_features(&mut self, sess: &Session) {
let lvl = match sess.opts.unstable_features {
UnstableFeatures::Default => return,
UnstableFeatures::Disallow => Warn,
UnstableFeatures::Disallow => Forbid,
UnstableFeatures::Cheat => Allow
};
match self.by_name.get("unstable_features") {

View File

@ -26,7 +26,7 @@ use syntax::ast::{Item, Generics, StructField};
use syntax::ast_util::is_local;
use syntax::attr::{Stability, AttrMetaMethods};
use syntax::visit::{FnKind, Visitor};
use syntax::feature_gate::emit_feature_warn;
use syntax::feature_gate::emit_feature_err;
use util::nodemap::{NodeMap, DefIdMap, FnvHashSet, FnvHashMap};
use util::ppaux::Repr;
@ -237,7 +237,7 @@ impl<'a, 'tcx> Checker<'a, 'tcx> {
None => format!("use of unstable library feature '{}'", &feature)
};
emit_feature_warn(&self.tcx.sess.parse_sess.span_diagnostic,
emit_feature_err(&self.tcx.sess.parse_sess.span_diagnostic,
&feature, span, &msg);
}
}

View File

@ -49,6 +49,7 @@
#![feature(std_misc)]
#![feature(path_relative_from)]
#![feature(step_by)]
#![cfg_attr(test, feature(test, rand))]
extern crate syntax;
extern crate serialize;

View File

@ -18,6 +18,7 @@
#![feature(no_std)]
#![no_std]
#![unstable(feature = "rustc_private")]
#![cfg_attr(test, feature(hash))]
//! A typesafe bitmask flag generator.

View File

@ -37,7 +37,7 @@ Core encoding and decoding interfaces.
#![feature(std_misc)]
#![feature(unicode)]
#![feature(str_char)]
#![cfg_attr(test, feature(test))]
#![cfg_attr(test, feature(test, old_io))]
// test harness access
#[cfg(test)] extern crate test;

View File

@ -128,7 +128,7 @@
#![feature(unique)]
#![feature(allow_internal_unstable)]
#![feature(str_char)]
#![cfg_attr(test, feature(test, rustc_private))]
#![cfg_attr(test, feature(test, rustc_private, std_misc))]
// Don't link to std. We are std.
#![feature(no_std)]

View File

@ -45,6 +45,7 @@
#![feature(libc)]
#![feature(set_stdio)]
#![feature(os)]
#![cfg_attr(test, feature(old_io))]
extern crate getopts;
extern crate serialize;

View File

@ -653,6 +653,7 @@ impl char {
/// In both of these examples, 'ß' takes two bytes to encode.
///
/// ```
/// # #![feature(unicode)]
/// let mut b = [0; 2];
///
/// let result = 'ß'.encode_utf8(&mut b);
@ -663,6 +664,7 @@ impl char {
/// A buffer that's too small:
///
/// ```
/// # #![feature(unicode)]
/// let mut b = [0; 1];
///
/// let result = 'ß'.encode_utf8(&mut b);
@ -685,6 +687,7 @@ impl char {
/// In both of these examples, 'ß' takes one `u16` to encode.
///
/// ```
/// # #![feature(unicode)]
/// let mut b = [0; 1];
///
/// let result = 'ß'.encode_utf16(&mut b);
@ -695,6 +698,7 @@ impl char {
/// A buffer that's too small:
///
/// ```
/// # #![feature(unicode)]
/// let mut b = [0; 0];
///
/// let result = 'ß'.encode_utf8(&mut b);

View File

@ -9,6 +9,7 @@
// except according to those terms.
#![crate_name="anonexternmod"]
#![feature(libc)]
extern crate libc;

View File

@ -10,6 +10,8 @@
// Helper definition for test/run-pass/check-static-recursion-foreign.rs.
#![feature(libc)]
#[crate_id = "check_static_recursion_foreign_helper"]
#[crate_type = "lib"]

View File

@ -10,6 +10,7 @@
#![crate_name="externcallback"]
#![crate_type = "lib"]
#![feature(libc)]
extern crate libc;

View File

@ -9,6 +9,7 @@
// except according to those terms.
#![crate_name="foreign_lib"]
#![feature(libc)]
pub mod rustrt {
extern crate libc;

View File

@ -10,6 +10,7 @@
#![crate_name="socketlib"]
#![crate_type = "lib"]
#![feature(libc)]
pub mod socket {
extern crate libc;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(core)]
pub mod testtypes {
use std::any::TypeId;

View File

@ -11,7 +11,7 @@
// ignore-stage1
// force-host
#![feature(plugin_registrar, quote)]
#![feature(plugin_registrar, quote, rustc_private)]
#![crate_type = "dylib"]
extern crate syntax;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(core)]
use std::marker::MarkerTrait;
pub trait Foo : MarkerTrait {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(libc)]
extern crate libc;
extern "C" {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(std_misc, old_path)]
use std::dynamic_lib::DynamicLibrary;
#[no_mangle]

View File

@ -10,7 +10,7 @@
// force-host
#![feature(plugin_registrar)]
#![feature(plugin_registrar, rustc_private)]
#![feature(box_syntax)]
extern crate syntax;

View File

@ -11,7 +11,7 @@
// force-host
#![feature(plugin_registrar)]
#![feature(box_syntax)]
#![feature(box_syntax, rustc_private)]
extern crate syntax;

View File

@ -11,7 +11,7 @@
// force-host
#![feature(plugin_registrar)]
#![feature(box_syntax)]
#![feature(box_syntax, rustc_private)]
extern crate syntax;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_private)]
#[macro_use] extern crate log;
pub fn foo<T>() {

View File

@ -10,7 +10,7 @@
// force-host
#![feature(plugin_registrar)]
#![feature(plugin_registrar, rustc_private)]
extern crate syntax;
extern crate rustc;

View File

@ -11,7 +11,7 @@
// force-host
#![feature(plugin_registrar, quote)]
#![feature(box_syntax)]
#![feature(box_syntax, rustc_private)]
extern crate syntax;
extern crate rustc;

View File

@ -11,7 +11,7 @@
// force-host
#![feature(plugin_registrar)]
#![feature(box_syntax)]
#![feature(box_syntax, rustc_private)]
extern crate syntax;
extern crate rustc;

View File

@ -11,7 +11,7 @@
// force-host
#![feature(plugin_registrar)]
#![feature(box_syntax)]
#![feature(box_syntax, rustc_private)]
extern crate rustc;

View File

@ -10,7 +10,7 @@
// force-host
#![feature(plugin_registrar)]
#![feature(plugin_registrar, rustc_private)]
#![deny(plugin_as_library)] // should have no effect in a plugin crate
extern crate macro_crate_test;

View File

@ -8,4 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(core)]
trait Foo : ::std::marker::MarkerTrait {}

View File

@ -11,7 +11,7 @@
// force-host
#![crate_type="dylib"]
#![feature(plugin_registrar, quote)]
#![feature(plugin_registrar, quote, rustc_private)]
extern crate syntax;
extern crate rustc;

View File

@ -11,7 +11,7 @@
// no-prefer-dynamic
#![crate_type = "rlib"]
#![feature(plugin_registrar)]
#![feature(plugin_registrar, rustc_private)]
extern crate rustc;

View File

@ -11,7 +11,7 @@
// force-host
#![crate_type="dylib"]
#![feature(plugin_registrar)]
#![feature(plugin_registrar, rustc_private)]
extern crate syntax;
extern crate rustc;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -14,6 +14,7 @@
//! (#14132).
#![crate_name = "a"]
#![feature(core)]
use std::marker::MarkerTrait;

View File

@ -11,7 +11,7 @@
// force-host
#![crate_type = "dylib"]
#![feature(plugin_registrar, quote)]
#![feature(plugin_registrar, quote, rustc_private)]
extern crate "syntax_extension_with_dll_deps_1" as other;
extern crate syntax;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(core)]
pub trait Foo : ::std::marker::MarkerTrait {
}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(optin_builtin_traits)]
#![feature(optin_builtin_traits, core)]
#![crate_type = "rlib"]
use std::marker::MarkerTrait;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(core)]
use std::any::TypeId;
pub struct A;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(core)]
use std::any::TypeId;
pub struct A;

View File

@ -13,7 +13,7 @@
// This aux-file will require the eh_personality function to be codegen'd, but
// it hasn't been defined just yet. Make sure we don't explode.
#![feature(no_std)]
#![feature(no_std, core)]
#![no_std]
#![crate_type = "rlib"]

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unboxed_closures)]
#![feature(unboxed_closures, std_misc, rand)]
use std::collections::{BTreeMap, HashMap, HashSet};
use std::env;

View File

@ -10,7 +10,7 @@
// ignore-pretty very bad with line comments
#![feature(unboxed_closures)]
#![feature(unboxed_closures, rand, std_misc, collections)]
extern crate collections;
extern crate rand;

View File

@ -11,7 +11,7 @@
// ignore-lexer-test FIXME #15679
// Microbenchmarks for various functions in std and extra
#![feature(unboxed_closures)]
#![feature(unboxed_closures, rand, old_io, old_path, std_misc, collections)]
use std::old_io::*;
use std::old_path::{Path, GenericPath};

View File

@ -18,6 +18,8 @@
// different scalability characteristics compared to the select
// version.
#![feature(std_misc)]
use std::sync::mpsc::{channel, Sender, Receiver};
use std::env;
use std::thread;

View File

@ -14,6 +14,8 @@
//
// I *think* it's the same, more or less.
#![feature(std_misc)]
use std::sync::mpsc::{channel, Sender, Receiver};
use std::env;
use std::thread;

View File

@ -18,6 +18,8 @@
// no-pretty-expanded FIXME #15189
// ignore-lexer-test FIXME #15679
#![feature(std_misc)]
use std::env;
use std::sync::{Arc, Future, Mutex, Condvar};
use std::time::Duration;

View File

@ -12,6 +12,8 @@
// See https://github.com/nsf/pnoise for timings and alternative implementations.
// ignore-lexer-test FIXME #15679
#![feature(rand, core)]
use std::f32::consts::PI;
use std::num::Float;
use std::rand::{Rng, StdRng};

View File

@ -38,6 +38,8 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(rustc_private, core)]
extern crate arena;
use std::iter::range_step;

View File

@ -38,6 +38,8 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(core)]
use std::{cmp, iter, mem};
use std::thread;

View File

@ -38,6 +38,8 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(core, old_io, io, core)]
use std::cmp::min;
use std::old_io::*;
use std::iter::repeat;

View File

@ -38,6 +38,8 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(old_io, old_path, io, core)]
use std::cmp::min;
use std::old_io::*;
use std::old_io;

View File

@ -13,7 +13,7 @@
// multi tasking k-nucleotide
#![feature(box_syntax)]
#![feature(box_syntax, std_misc, old_io, collections, os)]
use std::ascii::{AsciiExt, OwnedAsciiExt};
use std::cmp::Ordering::{self, Less, Greater, Equal};

View File

@ -40,7 +40,7 @@
// ignore-android see #10393 #13206
#![feature(box_syntax)]
#![feature(box_syntax, std_misc, collections)]
use std::ascii::OwnedAsciiExt;
use std::env;

View File

@ -38,7 +38,7 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(simd)]
#![feature(simd, old_io, core, io)]
// ignore-pretty very bad with line comments

View File

@ -40,6 +40,8 @@
// no-pretty-expanded FIXME #15189
#![feature(core)]
use std::iter::repeat;
use std::sync::Arc;
use std::sync::mpsc::channel;

View File

@ -38,6 +38,8 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(core)]
use std::num::Float;
const PI: f64 = 3.141592653589793;

View File

@ -18,6 +18,8 @@
*/
#![feature(std_misc, rustc_private)]
extern crate getopts;
use std::sync::mpsc::{channel, Sender};

View File

@ -40,7 +40,7 @@
// ignore-android see #10393 #13206
#![feature(unboxed_closures)]
#![feature(unboxed_closures, libc, old_io, collections, io, core)]
extern crate libc;

View File

@ -41,7 +41,7 @@
// no-pretty-expanded FIXME #15189
#![allow(non_snake_case)]
#![feature(unboxed_closures)]
#![feature(unboxed_closures, core, os)]
use std::iter::{repeat, AdditiveIterator};
use std::thread;

View File

@ -10,6 +10,8 @@
// Microbenchmark for the smallintmap library
#![feature(collections, std_misc)]
use std::collections::VecMap;
use std::env;
use std::time::Duration;

View File

@ -10,7 +10,7 @@
// ignore-pretty very bad with line comments
#![feature(box_syntax)]
#![feature(box_syntax, core)]
#![allow(non_snake_case)]
use std::io::prelude::*;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unsafe_destructor, box_syntax)]
#![feature(unsafe_destructor, box_syntax, std_misc, collections)]
use std::env;
use std::thread;

View File

@ -16,13 +16,10 @@
// aux-build:internal_unstable.rs
// error-pattern:use of unstable library feature 'function'
// error-pattern:use of unstable library feature 'struct_field'
// error-pattern:compilation successful
#![feature(rustc_attrs)]
#[macro_use]
extern crate internal_unstable;
#[rustc_error]
fn main() {
call_unstable_noallow!();

View File

@ -10,14 +10,12 @@
// aux-build:internal_unstable.rs
#![feature(rustc_attrs)]
#![allow(dead_code)]
extern crate internal_unstable;
thread_local!(static FOO: () = ());
thread_local!(static BAR: () = internal_unstable::unstable()); //~ WARN use of unstable
thread_local!(static BAR: () = internal_unstable::unstable()); //~ ERROR use of unstable
#[rustc_error]
fn main() {} //~ ERROR
fn main() {}

View File

@ -10,7 +10,7 @@
// aux-build:internal_unstable.rs
#![feature(rustc_attrs, allow_internal_unstable)]
#![feature(allow_internal_unstable)]
#[macro_use]
extern crate internal_unstable;
@ -19,7 +19,7 @@ macro_rules! foo {
($e: expr, $f: expr) => {{
$e;
$f;
internal_unstable::unstable(); //~ WARN use of unstable
internal_unstable::unstable(); //~ ERROR use of unstable
}}
}
@ -32,20 +32,19 @@ macro_rules! bar {
}}
}
#[rustc_error]
fn main() { //~ ERROR
fn main() {
// ok, the instability is contained.
call_unstable_allow!();
construct_unstable_allow!(0);
// bad.
pass_through_allow!(internal_unstable::unstable()); //~ WARN use of unstable
pass_through_allow!(internal_unstable::unstable()); //~ ERROR use of unstable
pass_through_noallow!(internal_unstable::unstable()); //~ WARN use of unstable
pass_through_noallow!(internal_unstable::unstable()); //~ ERROR use of unstable
println!("{:?}", internal_unstable::unstable()); //~ WARN use of unstable
println!("{:?}", internal_unstable::unstable()); //~ ERROR use of unstable
bar!(internal_unstable::unstable()); //~ WARN use of unstable
bar!(internal_unstable::unstable()); //~ ERROR use of unstable
}

View File

@ -13,10 +13,10 @@
#![feature(foo)] //~ ERROR unused or unknown feature
extern crate lint_output_format; //~ WARNING: use of unstable library feature
extern crate lint_output_format; //~ ERROR use of unstable library feature
use lint_output_format::{foo, bar};
fn main() {
let _x = foo(); //~ WARNING #[warn(deprecated)] on by default
let _y = bar(); //~ WARNING: use of unstable library feature
let _y = bar(); //~ ERROR use of unstable library feature
}

View File

@ -22,24 +22,24 @@ mod cross_crate {
pub fn foo() {
let x = Stable {
inherit: 1,
override1: 2, //~ WARN use of unstable
override1: 2, //~ ERROR use of unstable
override2: 3,
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
};
let _ = x.inherit;
let _ = x.override1; //~ WARN use of unstable
let _ = x.override1; //~ ERROR use of unstable
let _ = x.override2;
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
let Stable {
inherit: _,
override1: _, //~ WARN use of unstable
override1: _, //~ ERROR use of unstable
override2: _
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
} = x;
// all fine
let Stable { .. } = x;
@ -47,122 +47,122 @@ mod cross_crate {
let x = Stable2(1, 2, 3);
let _ = x.0;
let _ = x.1; //~ WARN use of unstable
let _ = x.1; //~ ERROR use of unstable
let _ = x.2;
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
let Stable2(_,
_, //~ WARN use of unstable
_, //~ ERROR use of unstable
_)
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
= x;
// all fine
let Stable2(..) = x;
let x = Unstable { //~ WARN use of unstable
inherit: 1, //~ WARN use of unstable
let x = Unstable { //~ ERROR use of unstable
inherit: 1, //~ ERROR use of unstable
override1: 2,
override2: 3,
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
};
let _ = x.inherit; //~ WARN use of unstable
let _ = x.inherit; //~ ERROR use of unstable
let _ = x.override1;
let _ = x.override2;
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
let Unstable { //~ WARN use of unstable
inherit: _, //~ WARN use of unstable
let Unstable { //~ ERROR use of unstable
inherit: _, //~ ERROR use of unstable
override1: _,
override2: _
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
} = x;
let Unstable //~ WARN use of unstable
let Unstable //~ ERROR use of unstable
// the patterns are all fine:
{ .. } = x;
let x = Unstable2(1, 2, 3); //~ WARN use of unstable
let x = Unstable2(1, 2, 3); //~ ERROR use of unstable
let _ = x.0; //~ WARN use of unstable
let _ = x.0; //~ ERROR use of unstable
let _ = x.1;
let _ = x.2;
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
let Unstable2 //~ WARN use of unstable
(_, //~ WARN use of unstable
let Unstable2 //~ ERROR use of unstable
(_, //~ ERROR use of unstable
_,
_)
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
= x;
let Unstable2 //~ WARN use of unstable
let Unstable2 //~ ERROR use of unstable
// the patterns are all fine:
(..) = x;
let x = Deprecated {
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
inherit: 1,
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
override1: 2,
override2: 3, //~ WARN use of unstable
override2: 3, //~ ERROR use of unstable
};
let _ = x.inherit;
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
let _ = x.override1;
let _ = x.override2; //~ WARN use of unstable
let _ = x.override2; //~ ERROR use of unstable
let Deprecated {
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
inherit: _,
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
override1: _,
override2: _ //~ WARN use of unstable
override2: _ //~ ERROR use of unstable
} = x;
let Deprecated
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
// the patterns are all fine:
{ .. } = x;
let x = Deprecated2(1, 2, 3);
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
let _ = x.0;
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
let _ = x.1;
let _ = x.2; //~ WARN use of unstable
let _ = x.2; //~ ERROR use of unstable
let Deprecated2
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
(_,
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
_,
_) //~ WARN use of unstable
_) //~ ERROR use of unstable
= x;
let Deprecated2
//~^ ERROR use of deprecated item
//~^^ WARN use of unstable
//~^^ ERROR use of unstable
// the patterns are all fine:
(..) = x;
}

View File

@ -24,7 +24,7 @@ extern crate lint_stability;
mod cross_crate {
extern crate stability_cfg1;
extern crate stability_cfg2; //~ WARNING: use of unstable library feature
extern crate stability_cfg2; //~ ERROR use of unstable library feature
use lint_stability::*;
@ -51,64 +51,64 @@ mod cross_crate {
<Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
deprecated_unstable(); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
foo.method_deprecated_unstable(); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
Foo::method_deprecated_unstable(&foo); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo>::method_deprecated_unstable(&foo); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
Trait::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo as Trait>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
deprecated_unstable_text(); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
foo.method_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
Foo::method_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo>::method_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
Trait::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
unstable(); //~ WARNING use of unstable library feature
foo.method_unstable(); //~ WARNING use of unstable library feature
Foo::method_unstable(&foo); //~ WARNING use of unstable library feature
<Foo>::method_unstable(&foo); //~ WARNING use of unstable library feature
foo.trait_unstable(); //~ WARNING use of unstable library feature
Trait::trait_unstable(&foo); //~ WARNING use of unstable library feature
<Foo>::trait_unstable(&foo); //~ WARNING use of unstable library feature
<Foo as Trait>::trait_unstable(&foo); //~ WARNING use of unstable library feature
unstable(); //~ ERROR use of unstable library feature
foo.method_unstable(); //~ ERROR use of unstable library feature
Foo::method_unstable(&foo); //~ ERROR use of unstable library feature
<Foo>::method_unstable(&foo); //~ ERROR use of unstable library feature
foo.trait_unstable(); //~ ERROR use of unstable library feature
Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature
<Foo>::trait_unstable(&foo); //~ ERROR use of unstable library feature
<Foo as Trait>::trait_unstable(&foo); //~ ERROR use of unstable library feature
unstable_text();
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
foo.method_unstable_text();
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
Foo::method_unstable_text(&foo);
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
<Foo>::method_unstable_text(&foo);
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
foo.trait_unstable_text();
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
Trait::trait_unstable_text(&foo);
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
<Foo>::trait_unstable_text(&foo);
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
<Foo as Trait>::trait_unstable_text(&foo);
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
stable();
foo.method_stable();
@ -130,26 +130,26 @@ mod cross_crate {
let _ = DeprecatedStruct { i: 0 }; //~ ERROR use of deprecated item
let _ = DeprecatedUnstableStruct { i: 0 }; //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
let _ = UnstableStruct { i: 0 }; //~ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
let _ = UnstableStruct { i: 0 }; //~ ERROR use of unstable library feature
let _ = StableStruct { i: 0 };
let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item
let _ = DeprecatedUnstableUnitStruct; //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
let _ = UnstableUnitStruct; //~ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
let _ = UnstableUnitStruct; //~ ERROR use of unstable library feature
let _ = StableUnitStruct;
let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item
let _ = Enum::DeprecatedUnstableVariant; //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
let _ = Enum::UnstableVariant; //~ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
let _ = Enum::UnstableVariant; //~ ERROR use of unstable library feature
let _ = Enum::StableVariant;
let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item
let _ = DeprecatedUnstableTupleStruct (1); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
let _ = UnstableTupleStruct (1); //~ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
let _ = UnstableTupleStruct (1); //~ ERROR use of unstable library feature
let _ = StableTupleStruct (1);
// At the moment, the lint checker only checks stability in
@ -159,7 +159,7 @@ mod cross_crate {
// on macros themselves are not yet linted.
macro_test_arg!(deprecated_text()); //~ ERROR use of deprecated item: text
macro_test_arg!(deprecated_unstable_text()); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
macro_test_arg!(macro_test_arg!(deprecated_text())); //~ ERROR use of deprecated item: text
}
@ -173,33 +173,33 @@ mod cross_crate {
<Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
<Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
Trait::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo as Trait>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
Trait::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
<Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
foo.trait_unstable(); //~ WARNING use of unstable library feature
Trait::trait_unstable(&foo); //~ WARNING use of unstable library feature
<Foo>::trait_unstable(&foo); //~ WARNING use of unstable library feature
<Foo as Trait>::trait_unstable(&foo); //~ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
foo.trait_unstable(); //~ ERROR use of unstable library feature
Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature
<Foo>::trait_unstable(&foo); //~ ERROR use of unstable library feature
<Foo as Trait>::trait_unstable(&foo); //~ ERROR use of unstable library feature
foo.trait_unstable_text();
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
Trait::trait_unstable_text(&foo);
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
<Foo>::trait_unstable_text(&foo);
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
<Foo as Trait>::trait_unstable_text(&foo);
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
foo.trait_stable();
Trait::trait_stable(&foo);
<Foo>::trait_stable(&foo);
@ -210,46 +210,46 @@ mod cross_crate {
foo.trait_deprecated(); //~ ERROR use of deprecated item
foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
//~^ WARNING use of unstable library feature
foo.trait_unstable(); //~ WARNING use of unstable library feature
//~^ ERROR use of unstable library feature
foo.trait_unstable(); //~ ERROR use of unstable library feature
foo.trait_unstable_text();
//~^ WARNING use of unstable library feature 'test_feature': text
//~^ ERROR use of unstable library feature 'test_feature': text
foo.trait_stable();
}
struct S;
impl UnstableTrait for S { } //~ WARNING use of unstable library feature
impl UnstableTrait for S { } //~ ERROR use of unstable library feature
trait LocalTrait : UnstableTrait { } //~ WARNING use of unstable library feature
trait LocalTrait : UnstableTrait { } //~ ERROR use of unstable library feature
impl Trait for S {
fn trait_stable(&self) {}
fn trait_unstable(&self) {} //~ WARNING use of unstable library feature
fn trait_unstable(&self) {} //~ ERROR use of unstable library feature
}
}
mod inheritance {
extern crate inherited_stability; //~ WARNING: use of unstable library feature
use self::inherited_stability::*; //~ WARNING: use of unstable library feature
extern crate inherited_stability; //~ ERROR use of unstable library feature
use self::inherited_stability::*; //~ ERROR use of unstable library feature
fn test_inheritance() {
unstable(); //~ WARNING use of unstable library feature
unstable(); //~ ERROR use of unstable library feature
stable();
stable_mod::unstable(); //~ WARNING use of unstable library feature
stable_mod::unstable(); //~ ERROR use of unstable library feature
stable_mod::stable();
unstable_mod::deprecated(); //~ ERROR use of deprecated item
unstable_mod::unstable(); //~ WARNING use of unstable library feature
unstable_mod::unstable(); //~ ERROR use of unstable library feature
let _ = Unstable::UnstableVariant; //~ WARNING use of unstable library feature
let _ = Unstable::UnstableVariant; //~ ERROR use of unstable library feature
let _ = Unstable::StableVariant;
let x: usize = 0;
x.unstable(); //~ WARNING use of unstable library feature
x.unstable(); //~ ERROR use of unstable library feature
x.stable();
}
}

View File

@ -16,6 +16,7 @@
#![allow(unused_variables)]
#![allow(dead_code)]
#![omit_gdb_pretty_printer_section]
#![feature(std_misc, core)]
// This test makes sure that the compiler doesn't crash when trying to assign
// debug locations to const-expressions.

View File

@ -17,6 +17,8 @@
// compile-flags:-g
#![feature(old_io)]
// === GDB TESTS ===================================================================================
// gdb-command:run

View File

@ -20,6 +20,8 @@
// compile-flags:-g
#![feature(old_io)]
// === GDB TESTS ===================================================================================
// gdb-command:rbreak immediate_args

View File

@ -11,6 +11,9 @@
// min-lldb-version: 310
// aux-build:issue13213aux.rs
#![feature(old_io)]
extern crate issue13213aux;
// compile-flags:-g

View File

@ -42,6 +42,7 @@
#![allow(unused_variables)]
#![omit_gdb_pretty_printer_section]
#![feature(core)]
use std::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2};

View File

@ -12,6 +12,7 @@
// error-pattern:explicit failure
// Testing that runtime failure doesn't cause callbacks to abort abnormally.
// Instead the failure will be delivered after the callbacks return.
#![feature(std_misc, libc)]
extern crate libc;
use std::task;

View File

@ -10,6 +10,8 @@
// error-pattern:whatever
#![feature(os, rustc_private)]
#[macro_use] extern crate log;
use std::os;

View File

@ -10,6 +10,8 @@
// error-pattern:whatever
#![feature(os, rustc_private)]
#[macro_use] extern crate log;
use std::os;
use std::thread;

View File

@ -10,6 +10,8 @@
// error-pattern:whatever
#![feature(rustc_private, os)]
#[macro_use] extern crate log;
use std::os;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(test_feature)]
extern crate bar;
pub fn main() { bar::baz() }

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(old_io, old_path)]
use std::env;
use std::fs::File;
use std::process::Command;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(std_misc, old_path, os)]
use std::dynamic_lib::DynamicLibrary;
use std::os;
use std::old_path::Path;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(asm)]
#![feature(asm, core)]
#![crate_type="lib"]
use std::intrinsics;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_private, path)]
extern crate rustc;
extern crate rustc_driver;
extern crate rustc_lint;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(libc, os)]
extern crate libc;
#[link(name="foo")]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_private)]
extern crate lib;
#[macro_use] extern crate log;

Some files were not shown because too many files have changed in this diff Show More