Remove use of associated_types feature gate from tests.

This commit is contained in:
Huon Wilson 2015-01-05 17:28:53 +11:00
parent 6e3d78f06f
commit 4016c729f1
111 changed files with 17 additions and 219 deletions

View File

@ -12,7 +12,6 @@
// cross-crate scenario.
#![crate_type="lib"]
#![feature(associated_types)]
pub trait Bar {
type T;

View File

@ -9,7 +9,6 @@
// except according to those terms.
#![crate_type = "lib"]
#![feature(associated_types)]
pub struct TreeBuilder<H>;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
pub trait T {
type C;
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::ops::Deref;
struct DerefWithHelper<H, T> {

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::cmp::PartialEq;
use std::ops::{Add, Sub, Mul};

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(associated_types, slicing_syntax)]
#![feature(slicing_syntax)]
use std::cmp::min;
use std::io::{BufferedWriter, File};

View File

@ -40,7 +40,7 @@
// ignore-android see #10393 #13206
#![feature(associated_types, slicing_syntax)]
#![feature(slicing_syntax)]
use std::ascii::OwnedAsciiExt;
use std::iter::repeat;

View File

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

View File

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

View File

@ -12,7 +12,7 @@
// just propagate the error.
#![crate_type = "lib"]
#![feature(associated_types, default_type_params, lang_items)]
#![feature(default_type_params, lang_items)]
#![no_std]
#[lang="sized"]

View File

@ -10,8 +10,6 @@
// Test equality constraints on associated types in a where clause.
#![feature(associated_types)]
pub trait ToInt {
fn to_int(&self) -> int;
}

View File

@ -11,8 +11,6 @@
// Test equality constraints on associated types. Check that unsupported syntax
// does not ICE.
#![feature(associated_types)]
pub trait Foo {
type A;
fn boo(&self) -> <Self as Foo>::A;

View File

@ -11,8 +11,6 @@
// Test equality constraints on associated types. Check we get an error when an
// equality constraint is used in a qualified path.
#![feature(associated_types)]
pub trait Foo {
type A;
fn boo(&self) -> <Self as Foo>::A;

View File

@ -11,8 +11,6 @@
// Test equality constraints on associated types. Check we get type errors
// where we should.
#![feature(associated_types)]
pub trait Foo {
type A;
fn boo(&self) -> <Self as Foo>::A;

View File

@ -10,8 +10,6 @@
// Check that an associated type cannot be bound in an expression path.
#![feature(associated_types)]
trait Foo {
type A;
fn bar() -> int;

View File

@ -10,8 +10,6 @@
// Check testing of equality constraints in a higher-ranked context.
#![feature(associated_types)]
pub trait TheTrait<T> {
type A;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get {
type Value;
fn get(&self) -> <Self as Get>::Value;
@ -22,4 +20,3 @@ trait Other {
fn main() {
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get {
type Value;
fn get(&self) -> <Self as Get>::Value;
@ -26,4 +24,3 @@ trait Grab {
fn main() {
}

View File

@ -11,8 +11,6 @@
// Check that the user gets an errror if they omit a binding from an
// object type.
#![feature(associated_types)]
pub trait Foo {
type A;
type B;

View File

@ -11,7 +11,6 @@
// Test that we reliably check the value of the associated type.
#![crate_type = "lib"]
#![feature(associated_types)]
#![no_implicit_prelude]
use std::option::Option::{self, None, Some};

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get {
type Value;
fn get(&self) -> <Self as Get>::Value;
@ -26,4 +24,3 @@ impl Struct {
fn main() {
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
// Check that we get an error when you use `<Self as Get>::Value` in
// the trait definition but `Self` does not, in fact, implement `Get`.

View File

@ -10,8 +10,6 @@
// Test that we have one and only one associated type per ref.
#![feature(associated_types)]
pub trait Foo {
type A;
}
@ -23,4 +21,3 @@ pub fn f1<T>(a: T, x: T::A) {} //~ERROR associated type `A` not found
pub fn f2<T: Foo + Bar>(a: T, x: T::A) {} //~ERROR ambiguous associated type `A`
pub fn main() {}

View File

@ -10,8 +10,6 @@
// Test type checking of uses of associated types via sugary paths.
#![feature(associated_types)]
pub trait Foo {
type A;
}

View File

@ -11,8 +11,6 @@
// Test you can't use a higher-ranked trait bound inside of a qualified
// path (just won't parse).
#![feature(associated_types)]
pub trait Foo<T> {
type A;

View File

@ -11,8 +11,6 @@
// Check projection of an associated type out of a higher-ranked
// trait-bound in the context of a function body.
#![feature(associated_types)]
pub trait Foo<T> {
type A;

View File

@ -11,8 +11,6 @@
// Check projection of an associated type out of a higher-ranked trait-bound
// in the context of a function signature.
#![feature(associated_types)]
pub trait Foo<T> {
type A;

View File

@ -11,8 +11,6 @@
// Check projection of an associated type out of a higher-ranked trait-bound
// in the context of a struct definition.
#![feature(associated_types)]
pub trait Foo<T> {
type A;

View File

@ -11,8 +11,6 @@
// Check projection of an associated type out of a higher-ranked trait-bound
// in the context of a method definition in a trait.
#![feature(associated_types)]
pub trait Foo<T> {
type A;

View File

@ -10,8 +10,6 @@
// Check that an associated type cannot be bound in an expression path.
#![feature(associated_types)]
trait Foo {
type A;
fn bar() -> int;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get {
type Sized? Value;
fn get(&self) -> <Self as Get>::Value;
@ -21,4 +19,3 @@ fn foo<T:Get>(t: T) {
fn main() {
}

View File

@ -10,7 +10,7 @@
// Test that binary operators consume their arguments
#![feature(associated_types, default_type_params)]
#![feature(default_type_params)]
use std::ops::{Add, Sub, Mul, Div, Rem, BitAnd, BitXor, BitOr, Shl, Shr};

View File

@ -10,7 +10,7 @@
// Test that move restrictions are enforced on overloaded binary operations
#![feature(associated_types, default_type_params)]
#![feature(default_type_params)]
use std::ops::Add;

View File

@ -11,8 +11,6 @@
// Test how overloaded deref interacts with borrows when DerefMut
// is implemented.
#![feature(associated_types)]
use std::ops::{Deref, DerefMut};
struct Own<T> {

View File

@ -11,8 +11,6 @@
// Test how overloaded deref interacts with borrows when only
// Deref and not DerefMut is implemented.
#![feature(associated_types)]
use std::ops::Deref;
struct Rc<T> {

View File

@ -11,8 +11,6 @@
// Test how overloaded deref interacts with borrows when DerefMut
// is implemented.
#![feature(associated_types)]
use std::ops::{Deref, DerefMut};
struct Own<T> {

View File

@ -11,8 +11,6 @@
// Test how overloaded deref interacts with borrows when only
// Deref and not DerefMut is implemented.
#![feature(associated_types)]
use std::ops::Deref;
struct Rc<T> {

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::ops::Add;
#[derive(Clone)]

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types, default_type_params)]
#![feature(default_type_params)]
use std::ops::Add;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::ops::Index;
struct MyVec<T> {

View File

@ -11,8 +11,6 @@
// Test that we still see borrowck errors of various kinds when using
// indexing and autoderef in combination.
#![feature(associated_types)]
use std::ops::{Index, IndexMut};
struct Foo {
@ -95,5 +93,3 @@ fn test9(mut f: Box<Bar>, g: Bar, s: String) {
fn main() {
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::ops::{Index, IndexMut};
struct Foo {
@ -70,5 +68,3 @@ fn main() {
s[2] = 20;
//~^ ERROR cannot assign to immutable dereference (dereference is implicit, due to indexing)
}

View File

@ -11,8 +11,6 @@
// Test that overloaded index expressions with DST result types
// can't be used as rvalues
#![feature(associated_types)]
use std::ops::Index;
use std::fmt::Show;

View File

@ -10,8 +10,6 @@
// error-pattern: reached the recursion limit while auto-dereferencing
#![feature(associated_types)]
use std::ops::Deref;
struct Foo;

View File

@ -9,7 +9,6 @@
// except according to those terms.
#![feature(unboxed_closures)]
#![feature(associated_types)]
use std::any::Any;
use std::intrinsics::TypeId;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::ops::Deref;
struct MyPtr<'a>(&'a mut uint);

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
fn add_state(op: <int as HasState>::State) {
//~^ ERROR the trait `HasState` is not implemented for the type `int`
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Foo {
type Item;
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait From<Src> {
type Output;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait From<Src> {
type Result;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
struct StateMachineIter<'a> {
statefn: &'a StateMachineFunc<'a>
}
@ -61,4 +59,3 @@ fn main() {
println!("{}",it.next());
println!("{}",it.next());
}

View File

@ -13,7 +13,7 @@
// (In this case the mul method should take &f64 and not f64)
// See: #11450
#![feature(associated_types, default_type_params)]
#![feature(default_type_params)]
use std::ops::Mul;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Foo {
type T;
}
@ -23,4 +21,3 @@ fn main() {
let y: int = 44;
assert_eq!(x * 2, y);
}

View File

@ -10,8 +10,6 @@
// Test equality constraints on associated types in a where clause.
#![feature(associated_types)]
pub trait Foo {
type A;
fn boo(&self) -> <Self as Foo>::A;

View File

@ -10,8 +10,6 @@
// Test equality constraints on associated types in a where clause.
#![feature(associated_types)]
pub trait ToInt {
fn to_int(&self) -> int;
}

View File

@ -13,8 +13,6 @@
// Test that we are able to reference cross-crate traits that employ
// associated types.
#![feature(associated_types)]
extern crate "associated-types-cc-lib" as bar;
use bar::Bar;

View File

@ -14,7 +14,7 @@
// `Target=[A]`, then the impl marked with `(*)` is seen to conflict
// with all the others.
#![feature(associated_types, default_type_params)]
#![feature(default_type_params)]
use std::ops::Deref;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait SignedUnsigned {
type Opposite;
fn convert(self) -> Self::Opposite;
@ -39,4 +37,3 @@ fn main() {
let x = get(22);
assert_eq!(22u, x);
}

View File

@ -10,8 +10,6 @@
// Test equality constraints on associated types inside of an object type
#![feature(associated_types)]
pub trait Foo {
type A;
fn boo(&self) -> <Self as Foo>::A;

View File

@ -16,7 +16,7 @@
// ignore-pretty -- FIXME(#17362)
#![feature(associated_types, lang_items, unboxed_closures)]
#![feature(lang_items, unboxed_closures)]
#![no_implicit_prelude]
use std::kinds::Sized;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get {
type Value;
fn get(&self) -> &<Self as Get>::Value;
@ -35,5 +33,3 @@ fn main() {
};
assert_eq!(*s.grab(), 100);
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get {
type Value;
fn get(&self) -> &<Self as Get>::Value;
@ -36,4 +34,3 @@ fn main() {
};
assert_eq!(*grab(&s), 100);
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get {
type Value;
fn get(&self) -> &<Self as Get>::Value;
@ -44,4 +42,3 @@ fn main() {
};
assert_eq!(*s.grab(), 100);
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get {
type Value;
fn get(&self) -> &<Self as Get>::Value;
@ -38,4 +36,3 @@ fn main() {
};
assert_eq!(*Struct::grab(&s), 100);
}

View File

@ -11,7 +11,6 @@
// Test that we are able to have an impl that defines an associated type
// before the actual trait.
#![feature(associated_types)]
impl X for f64 { type Y = int; }
trait X {type Y; }
fn main() {}

View File

@ -11,8 +11,6 @@
// Test that we normalize associated types that appear in bounds; if
// we didn't, the call to `self.split2()` fails to type check.
#![feature(associated_types)]
struct Splits<'a, T, P>;
struct SplitsN<I>;

View File

@ -11,8 +11,6 @@
// Test that we normalize associated types that appear in bounds; if
// we didn't, the call to `self.split2()` fails to type check.
#![feature(associated_types)]
struct Splits<'a, T, P>;
struct SplitsN<I>;

View File

@ -13,8 +13,6 @@
// this case, the `Result=Self` binding in the supertrait listing of
// `Int` was being ignored.
#![feature(associated_types)]
trait Not {
type Result;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Foo<T> {
type Bar;
fn get_bar() -> <Self as Foo<T>>::Bar;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get<T> {
fn get(&self) -> T;
}

View File

@ -10,8 +10,6 @@
// Test equality constraints on associated types in a where clause.
#![feature(associated_types)]
pub trait Foo {
type A;
fn boo(&self) -> <Self as Foo>::A;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Get {
type Value;
fn get(&self) -> &<Self as Get>::Value;
@ -32,4 +30,3 @@ fn main() {
};
assert_eq!(*s.get(), 100);
}

View File

@ -10,8 +10,6 @@
// Test paths to associated types using the type-parameter-only sugar.
#![feature(associated_types)]
pub trait Foo {
type A;
fn boo(&self) -> Self::A;

View File

@ -16,7 +16,7 @@
// ignore-pretty -- FIXME(#17362) pretty prints with `<<` which lexes wrong
#![feature(associated_types, lang_items, unboxed_closures)]
#![feature(lang_items, unboxed_closures)]
#![no_implicit_prelude]
use std::kinds::Sized;

View File

@ -10,8 +10,6 @@
// Test that a custom deref with a fat pointer return type does not ICE
#![feature(associated_types)]
use std::ops::{Deref, DerefMut};
pub struct Arr {

View File

@ -10,8 +10,6 @@
// Test that a custom deref with a fat pointer return type does not ICE
#![feature(associated_types)]
use std::ops::Deref;
pub struct Arr {

View File

@ -11,8 +11,6 @@
// Test that overloaded index expressions with DST result types
// work and don't ICE.
#![feature(associated_types)]
use std::ops::Index;
use std::fmt::Show;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::ops::{Deref, DerefMut};
// Generic unique/owned smaht pointer.
@ -55,4 +53,3 @@ fn test2(mut x: Own<Own<Own<Point>>>) {
}
fn main() {}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::slice;
pub struct PhfMapEntries<'a, T: 'a> {

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::ops::Deref;
struct Root {

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Matcher {
fn next_match(&mut self) -> Option<(uint, uint)>;
}

View File

@ -11,7 +11,7 @@
// If `Index` used an associated type for its output, this test would
// work more smoothly.
#![feature(associated_types, old_orphan_check)]
#![feature(old_orphan_check)]
use std::ops::Index;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait MatrixRow {}
struct Mat;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types, unboxed_closures)]
#![feature(unboxed_closures)]
use std::ops::{Deref, DerefMut};

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Person {
type string;
}

View File

@ -10,8 +10,6 @@
// ignore-pretty -- FIXME(#17362) pretty prints as `Hash<<Self as Hasher...` which fails to parse
#![feature(associated_types)]
pub trait Hasher {
type State;

View File

@ -11,8 +11,6 @@
// Test that a partially specified trait object with unspecified associated
// type does not ICE.
#![feature(associated_types)]
trait Foo {
type A;
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Trait<Input> {
type Output;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Trait<Input> {
type Output;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait Base {}
trait AssocA {
type X: Base;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait PoolManager {
type C;
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
trait PoolManager {
type C;
}

View File

@ -11,8 +11,6 @@
// Test that `<Type as Trait>::Output` and `Self::Output` are accepted as type annotations in let
// bindings
#![feature(associated_types)]
trait Int {
fn one() -> Self;
fn leading_zeros(self) -> uint;

View File

@ -10,8 +10,6 @@
// Check that associated types are `Sized`
#![feature(associated_types)]
trait Trait {
type Output;

View File

@ -10,7 +10,6 @@
// aux-build:issue_20389.rs
#![feature(associated_types)]
extern crate issue_20389;
struct Foo;

View File

@ -10,7 +10,7 @@
// If `Mul` used an associated type for its output, this test would
// work more smoothly.
#![feature(associated_types, default_type_params, old_orphan_check)]
#![feature(default_type_params, old_orphan_check)]
use std::ops::Mul;

View File

@ -11,7 +11,7 @@
// Test that we can overload the `+` operator for points so that two
// points can be added, and a point can be added to an integer.
#![feature(associated_types, default_type_params)]
#![feature(default_type_params)]
use std::ops;

View File

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

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::cell::Cell;
use std::ops::{Deref, DerefMut};

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_types)]
use std::ops::Deref;
struct DerefArray<'a, T:'a> {

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