From f22ccbe315676dee6accdfd6fc22fa48bace1354 Mon Sep 17 00:00:00 2001 From: varkor Date: Tue, 24 Jul 2018 18:24:12 +0100 Subject: [PATCH] Fix run-pass-fulldeps tests --- .../auxiliary/pub_and_stability.rs | 28 +++++++++---------- .../compile-fail/auxiliary/unstable-macros.rs | 2 +- src/test/run-pass-fulldeps/compiler-calls.rs | 3 +- src/test/run-pass-fulldeps/deriving-global.rs | 2 +- .../proc-macro/attr-stmt-expr.rs | 2 +- .../associated-types-nested-projections.rs | 2 -- src/test/run-pass/auxiliary/issue13507.rs | 2 -- .../auxiliary/typeid-intrinsic-aux1.rs | 2 -- .../auxiliary/typeid-intrinsic-aux2.rs | 2 -- .../run-pass/auxiliary/unstable-macros.rs | 2 +- .../run-pass/deriving-associated-types.rs | 2 -- src/test/run-pass/dst-index.rs | 3 -- src/test/run-pass/generic-extern-mangle.rs | 3 -- src/test/run-pass/issue-15734.rs | 3 -- src/test/run-pass/issue-17351.rs | 2 -- src/test/run-pass/issue-21562.rs | 2 -- src/test/run-pass/issue-22346.rs | 2 -- src/test/run-pass/issue-3563-3.rs | 2 -- src/test/run-pass/issue-3753.rs | 2 -- ...o-traits-distinguished-via-where-clause.rs | 2 -- src/test/run-pass/operator-overloading.rs | 2 -- .../run-pass/overloaded-index-assoc-list.rs | 3 -- .../run-pass/overloaded-index-in-field.rs | 3 -- src/test/run-pass/overloaded-index.rs | 3 -- .../run-pass/parallel-codegen-closures.rs | 1 - src/test/run-pass/slice.rs | 3 -- src/test/run-pass/small-enum-range-edge.rs | 8 +----- .../trait-bounds-on-structs-and-enums.rs | 2 -- src/test/run-pass/trait-inheritance-num0.rs | 2 -- src/test/run-pass/type-id-higher-rank.rs | 3 -- src/test/run-pass/utf8_chars.rs | 3 -- ...ariance-intersection-of-ref-and-opt-ref.rs | 2 -- src/test/run-pass/variance-vec-covariant.rs | 2 -- .../rustdoc/auxiliary/rustdoc-default-impl.rs | 1 - .../ui/auxiliary/svh-a-change-type-static.rs | 1 - 35 files changed, 20 insertions(+), 89 deletions(-) diff --git a/src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs b/src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs index dfbe35dfd56..eedc1e745e2 100644 --- a/src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs +++ b/src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs @@ -36,16 +36,16 @@ #![feature(staged_api)] -#![stable(feature = "unit_test", since = "0.0.0")] +#![stable(feature = "unit_test", since = "1.0.0")] -#[stable(feature = "unit_test", since = "0.0.0")] +#[stable(feature = "unit_test", since = "1.0.0")] pub use m::{Record, Trait, Tuple}; mod m { #[derive(Default)] - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] pub struct Record { - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] pub a_stable_pub: i32, #[unstable(feature = "unstable_declared", issue = "38412")] pub a_unstable_declared_pub: i32, @@ -55,14 +55,14 @@ mod m { pub(crate) b_crate: i32, #[unstable(feature = "unstable_declared", issue = "38412")] // SILLY pub(in m) c_mod: i32, - #[stable(feature = "unit_test", since = "0.0.0")] // SILLY + #[stable(feature = "unit_test", since = "1.0.0")] // SILLY d_priv: i32 } #[derive(Default)] #[stable(feature = "unit_test", since = "1.0.0")] pub struct Tuple( - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] pub i32, #[unstable(feature = "unstable_declared", issue = "38412")] pub i32, @@ -84,11 +84,11 @@ mod m { } - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] pub trait Trait { - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] type Type; - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] fn stable_trait_method(&self) -> Self::Type; #[unstable(feature = "unstable_undeclared", issue = "38412")] fn unstable_undeclared_trait_method(&self) -> Self::Type; @@ -96,7 +96,7 @@ mod m { fn unstable_declared_trait_method(&self) -> Self::Type; } - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] impl Trait for Record { type Type = i32; fn stable_trait_method(&self) -> i32 { self.d_priv } @@ -104,7 +104,7 @@ mod m { fn unstable_declared_trait_method(&self) -> i32 { self.d_priv } } - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] impl Trait for Tuple { type Type = i32; fn stable_trait_method(&self) -> i32 { self.3 } @@ -117,14 +117,14 @@ mod m { pub fn unstable_undeclared(&self) -> i32 { self.d_priv } #[unstable(feature = "unstable_declared", issue = "38412")] pub fn unstable_declared(&self) -> i32 { self.d_priv } - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] pub fn stable(&self) -> i32 { self.d_priv } #[unstable(feature = "unstable_undeclared", issue = "38412")] // SILLY pub(crate) fn pub_crate(&self) -> i32 { self.d_priv } #[unstable(feature = "unstable_declared", issue = "38412")] // SILLY pub(in m) fn pub_mod(&self) -> i32 { self.d_priv } - #[stable(feature = "unit_test", since = "0.0.0")] // SILLY + #[stable(feature = "unit_test", since = "1.0.0")] // SILLY fn private(&self) -> i32 { self.d_priv } } @@ -133,7 +133,7 @@ mod m { pub fn unstable_undeclared(&self) -> i32 { self.0 } #[unstable(feature = "unstable_declared", issue = "38412")] pub fn unstable_declared(&self) -> i32 { self.0 } - #[stable(feature = "unit_test", since = "0.0.0")] + #[stable(feature = "unit_test", since = "1.0.0")] pub fn stable(&self) -> i32 { self.0 } pub(crate) fn pub_crate(&self) -> i32 { self.0 } diff --git a/src/test/compile-fail/auxiliary/unstable-macros.rs b/src/test/compile-fail/auxiliary/unstable-macros.rs index 6462c11af48..836164a721a 100644 --- a/src/test/compile-fail/auxiliary/unstable-macros.rs +++ b/src/test/compile-fail/auxiliary/unstable-macros.rs @@ -9,7 +9,7 @@ // except according to those terms. #![feature(staged_api)] -#![stable(feature = "unit_test", since = "0.0.0")] +#![stable(feature = "unit_test", since = "1.0.0")] #[unstable(feature = "unstable_macros", issue = "0")] #[macro_export] diff --git a/src/test/run-pass-fulldeps/compiler-calls.rs b/src/test/run-pass-fulldeps/compiler-calls.rs index cc2b6c641e9..baf9e0d5dc5 100644 --- a/src/test/run-pass-fulldeps/compiler-calls.rs +++ b/src/test/run-pass-fulldeps/compiler-calls.rs @@ -12,8 +12,7 @@ // ignore-cross-compile -#![feature(rustc_private, path)] -#![feature(core)] +#![feature(rustc_private)] extern crate getopts; extern crate rustc; diff --git a/src/test/run-pass-fulldeps/deriving-global.rs b/src/test/run-pass-fulldeps/deriving-global.rs index 10e8ddc41f3..e9678732804 100644 --- a/src/test/run-pass-fulldeps/deriving-global.rs +++ b/src/test/run-pass-fulldeps/deriving-global.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rand, rustc_private)] +#![feature(rustc_private)] extern crate serialize; diff --git a/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs b/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs index 021b10e033f..3356828c04b 100644 --- a/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs +++ b/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs @@ -11,7 +11,7 @@ // aux-build:attr-stmt-expr.rs // ignore-stage1 -#![feature(use_extern_macros, stmt_expr_attributes, proc_macro_stmt, proc_macro_expr)] +#![feature(use_extern_macros, stmt_expr_attributes, proc_macro_expr)] extern crate attr_stmt_expr; use attr_stmt_expr::{expect_let, expect_print_stmt, expect_expr, expect_print_expr, diff --git a/src/test/run-pass/associated-types-nested-projections.rs b/src/test/run-pass/associated-types-nested-projections.rs index 83f0d360e61..62fa07e20b6 100644 --- a/src/test/run-pass/associated-types-nested-projections.rs +++ b/src/test/run-pass/associated-types-nested-projections.rs @@ -12,8 +12,6 @@ // pretty-expanded FIXME #23616 -#![feature(core)] - use std::slice; trait Bound {} diff --git a/src/test/run-pass/auxiliary/issue13507.rs b/src/test/run-pass/auxiliary/issue13507.rs index ee7d45b77bf..dee40b2fc57 100644 --- a/src/test/run-pass/auxiliary/issue13507.rs +++ b/src/test/run-pass/auxiliary/issue13507.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(core)] - pub mod testtypes { use std::any::TypeId; diff --git a/src/test/run-pass/auxiliary/typeid-intrinsic-aux1.rs b/src/test/run-pass/auxiliary/typeid-intrinsic-aux1.rs index 10e315f269f..0d0f1b3a482 100644 --- a/src/test/run-pass/auxiliary/typeid-intrinsic-aux1.rs +++ b/src/test/run-pass/auxiliary/typeid-intrinsic-aux1.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(core)] - use std::any::{Any, TypeId}; pub struct A; diff --git a/src/test/run-pass/auxiliary/typeid-intrinsic-aux2.rs b/src/test/run-pass/auxiliary/typeid-intrinsic-aux2.rs index 10e315f269f..0d0f1b3a482 100644 --- a/src/test/run-pass/auxiliary/typeid-intrinsic-aux2.rs +++ b/src/test/run-pass/auxiliary/typeid-intrinsic-aux2.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(core)] - use std::any::{Any, TypeId}; pub struct A; diff --git a/src/test/run-pass/auxiliary/unstable-macros.rs b/src/test/run-pass/auxiliary/unstable-macros.rs index 6462c11af48..836164a721a 100644 --- a/src/test/run-pass/auxiliary/unstable-macros.rs +++ b/src/test/run-pass/auxiliary/unstable-macros.rs @@ -9,7 +9,7 @@ // except according to those terms. #![feature(staged_api)] -#![stable(feature = "unit_test", since = "0.0.0")] +#![stable(feature = "unit_test", since = "1.0.0")] #[unstable(feature = "unstable_macros", issue = "0")] #[macro_export] diff --git a/src/test/run-pass/deriving-associated-types.rs b/src/test/run-pass/deriving-associated-types.rs index 632ef5e0c8a..d3aaa3ded69 100644 --- a/src/test/run-pass/deriving-associated-types.rs +++ b/src/test/run-pass/deriving-associated-types.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(core)] - pub trait DeclaredTrait { type Type; } diff --git a/src/test/run-pass/dst-index.rs b/src/test/run-pass/dst-index.rs index 34a187fa6f2..6bda400a7cd 100644 --- a/src/test/run-pass/dst-index.rs +++ b/src/test/run-pass/dst-index.rs @@ -11,9 +11,6 @@ // Test that overloaded index expressions with DST result types // work and don't ICE. - -#![feature(core)] - use std::ops::Index; use std::fmt::Debug; diff --git a/src/test/run-pass/generic-extern-mangle.rs b/src/test/run-pass/generic-extern-mangle.rs index 67aea1f9f8a..debe3706891 100644 --- a/src/test/run-pass/generic-extern-mangle.rs +++ b/src/test/run-pass/generic-extern-mangle.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(core)] - use std::ops::Add; extern "C" fn foo(a: T, b: T) -> T::Output { a + b } diff --git a/src/test/run-pass/issue-15734.rs b/src/test/run-pass/issue-15734.rs index daf14b4c2ff..5a35239cf72 100644 --- a/src/test/run-pass/issue-15734.rs +++ b/src/test/run-pass/issue-15734.rs @@ -11,9 +11,6 @@ // If `Index` used an associated type for its output, this test would // work more smoothly. - -#![feature(core)] - use std::ops::Index; struct Mat { data: Vec, cols: usize, } diff --git a/src/test/run-pass/issue-17351.rs b/src/test/run-pass/issue-17351.rs index 6e93194647a..88f83a300a7 100644 --- a/src/test/run-pass/issue-17351.rs +++ b/src/test/run-pass/issue-17351.rs @@ -10,8 +10,6 @@ // pretty-expanded FIXME #23616 -#![feature(core)] - trait Str { fn foo(&self) {} } impl Str for str {} impl<'a, S: ?Sized> Str for &'a S where S: Str {} diff --git a/src/test/run-pass/issue-21562.rs b/src/test/run-pass/issue-21562.rs index aa784ba432c..51896786d0c 100644 --- a/src/test/run-pass/issue-21562.rs +++ b/src/test/run-pass/issue-21562.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(core)] - extern crate core; use core::marker::Sync; diff --git a/src/test/run-pass/issue-22346.rs b/src/test/run-pass/issue-22346.rs index 8538950a895..895b9d222a8 100644 --- a/src/test/run-pass/issue-22346.rs +++ b/src/test/run-pass/issue-22346.rs @@ -10,8 +10,6 @@ // pretty-expanded FIXME #23616 -#![feature(core)] - // This used to cause an ICE because the retslot for the "return" had the wrong type fn testcase<'a>() -> Box + 'a> { return Box::new((0..3).map(|i| { return i; })); diff --git a/src/test/run-pass/issue-3563-3.rs b/src/test/run-pass/issue-3563-3.rs index ecee2fd0faa..56208d08779 100644 --- a/src/test/run-pass/issue-3563-3.rs +++ b/src/test/run-pass/issue-3563-3.rs @@ -22,8 +22,6 @@ // that are already linked in. Using WriterUtil allows us to use the write_line // method. -#![feature(core)] - use std::fmt; use std::iter::repeat; use std::slice; diff --git a/src/test/run-pass/issue-3753.rs b/src/test/run-pass/issue-3753.rs index e81025d8464..e6eb8efe442 100644 --- a/src/test/run-pass/issue-3753.rs +++ b/src/test/run-pass/issue-3753.rs @@ -12,8 +12,6 @@ // Issue Name: pub method preceded by attribute can't be parsed // Abstract: Visibility parsing failed when compiler parsing -#![feature(core)] - use std::f64; #[derive(Copy, Clone)] diff --git a/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs b/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs index 77072bdec90..3f0f4f35745 100644 --- a/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs +++ b/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs @@ -13,8 +13,6 @@ // pretty-expanded FIXME #23616 -#![feature(core)] - trait A { fn foo(self); } diff --git a/src/test/run-pass/operator-overloading.rs b/src/test/run-pass/operator-overloading.rs index 045af79189a..c3a1164ba9c 100644 --- a/src/test/run-pass/operator-overloading.rs +++ b/src/test/run-pass/operator-overloading.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(core)] - use std::cmp; use std::ops; diff --git a/src/test/run-pass/overloaded-index-assoc-list.rs b/src/test/run-pass/overloaded-index-assoc-list.rs index e0f61fd8497..50140d1aab9 100644 --- a/src/test/run-pass/overloaded-index-assoc-list.rs +++ b/src/test/run-pass/overloaded-index-assoc-list.rs @@ -11,9 +11,6 @@ // Test overloading of the `[]` operator. In particular test that it // takes its argument *by reference*. - -#![feature(core)] - use std::ops::Index; struct AssociationList { diff --git a/src/test/run-pass/overloaded-index-in-field.rs b/src/test/run-pass/overloaded-index-in-field.rs index ff867e76810..7e2b586631d 100644 --- a/src/test/run-pass/overloaded-index-in-field.rs +++ b/src/test/run-pass/overloaded-index-in-field.rs @@ -11,9 +11,6 @@ // Test using overloaded indexing when the "map" is stored in a // field. This caused problems at some point. - -#![feature(core)] - use std::ops::Index; struct Foo { diff --git a/src/test/run-pass/overloaded-index.rs b/src/test/run-pass/overloaded-index.rs index fa3c107697e..b54a18f722a 100644 --- a/src/test/run-pass/overloaded-index.rs +++ b/src/test/run-pass/overloaded-index.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(core)] - use std::ops::{Index, IndexMut}; struct Foo { diff --git a/src/test/run-pass/parallel-codegen-closures.rs b/src/test/run-pass/parallel-codegen-closures.rs index e3c2b448ce0..27b9eeccbeb 100644 --- a/src/test/run-pass/parallel-codegen-closures.rs +++ b/src/test/run-pass/parallel-codegen-closures.rs @@ -14,7 +14,6 @@ // ignore-bitrig // compile-flags: -C codegen_units=2 -#![feature(core)] #![feature(iter_arith)] mod a { diff --git a/src/test/run-pass/slice.rs b/src/test/run-pass/slice.rs index 8e1d96d3669..dfd7b947c57 100644 --- a/src/test/run-pass/slice.rs +++ b/src/test/run-pass/slice.rs @@ -10,9 +10,6 @@ // Test slicing sugar. - -#![feature(core)] - extern crate core; use core::ops::{Index, IndexMut, Range, RangeTo, RangeFrom, RangeFull}; diff --git a/src/test/run-pass/small-enum-range-edge.rs b/src/test/run-pass/small-enum-range-edge.rs index d2283da8bdd..7b6f0a7c9ab 100644 --- a/src/test/run-pass/small-enum-range-edge.rs +++ b/src/test/run-pass/small-enum-range-edge.rs @@ -8,13 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -// this is for the wrapping_add call below. -#![feature(core)] - -/*! - * Tests the range assertion wraparound case when reading discriminants. - */ +// Tests the range assertion wraparound case when reading discriminants. #[repr(u8)] #[derive(Copy, Clone)] diff --git a/src/test/run-pass/trait-bounds-on-structs-and-enums.rs b/src/test/run-pass/trait-bounds-on-structs-and-enums.rs index bb8ae8247fa..6f088e15b35 100644 --- a/src/test/run-pass/trait-bounds-on-structs-and-enums.rs +++ b/src/test/run-pass/trait-bounds-on-structs-and-enums.rs @@ -10,8 +10,6 @@ // pretty-expanded FIXME #23616 -#![feature(core)] - trait U {} trait T { fn get(self) -> X; } diff --git a/src/test/run-pass/trait-inheritance-num0.rs b/src/test/run-pass/trait-inheritance-num0.rs index 70515a088e2..9f5c7cf6036 100644 --- a/src/test/run-pass/trait-inheritance-num0.rs +++ b/src/test/run-pass/trait-inheritance-num0.rs @@ -12,8 +12,6 @@ // pretty-expanded FIXME #23616 -#![feature(core)] - use std::cmp::PartialOrd; pub trait NumCast: Sized { diff --git a/src/test/run-pass/type-id-higher-rank.rs b/src/test/run-pass/type-id-higher-rank.rs index 2865b5d04e5..2a6708dc999 100644 --- a/src/test/run-pass/type-id-higher-rank.rs +++ b/src/test/run-pass/type-id-higher-rank.rs @@ -11,9 +11,6 @@ // Test that type IDs correctly account for higher-rank lifetimes // Also acts as a regression test for an ICE (issue #19791) - -#![feature(core)] - use std::any::{Any, TypeId}; struct Struct<'a>(&'a ()); diff --git a/src/test/run-pass/utf8_chars.rs b/src/test/run-pass/utf8_chars.rs index 2602e395bcc..b2550e77a8a 100644 --- a/src/test/run-pass/utf8_chars.rs +++ b/src/test/run-pass/utf8_chars.rs @@ -7,9 +7,6 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. -// - -#![feature(core)] use std::str; diff --git a/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs b/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs index af06fe38136..948d68e0ccd 100644 --- a/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs +++ b/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs @@ -13,9 +13,7 @@ // us from approximating the lifetimes of `field1` and `field2` to a // common intersection. - #![allow(dead_code)] -#![feature(core)] struct List<'l> { field1: &'l i32, diff --git a/src/test/run-pass/variance-vec-covariant.rs b/src/test/run-pass/variance-vec-covariant.rs index 89927b7b55b..caec6df5a4d 100644 --- a/src/test/run-pass/variance-vec-covariant.rs +++ b/src/test/run-pass/variance-vec-covariant.rs @@ -10,9 +10,7 @@ // Test that vec is now covariant in its argument type. - #![allow(dead_code)] -#![feature(core)] fn foo<'a,'b>(v1: Vec<&'a i32>, v2: Vec<&'b i32>) -> i32 { bar(v1, v2).cloned().unwrap_or(0) // only type checks if we can intersect 'a and 'b diff --git a/src/test/rustdoc/auxiliary/rustdoc-default-impl.rs b/src/test/rustdoc/auxiliary/rustdoc-default-impl.rs index 34a1331353d..c346c7323d3 100644 --- a/src/test/rustdoc/auxiliary/rustdoc-default-impl.rs +++ b/src/test/rustdoc/auxiliary/rustdoc-default-impl.rs @@ -9,7 +9,6 @@ // except according to those terms. #![feature(optin_builtin_traits)] -#![feature(core)] pub mod bar { use std::marker; diff --git a/src/test/ui/auxiliary/svh-a-change-type-static.rs b/src/test/ui/auxiliary/svh-a-change-type-static.rs index 62f7986f1c3..0d4c76abb10 100644 --- a/src/test/ui/auxiliary/svh-a-change-type-static.rs +++ b/src/test/ui/auxiliary/svh-a-change-type-static.rs @@ -14,7 +14,6 @@ //! (#14132). #![crate_name = "a"] -#![feature(core)] macro_rules! three { () => { 3 }