mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
Remove use of associated_types feature gate from tests.
This commit is contained in:
parent
6e3d78f06f
commit
4016c729f1
@ -12,7 +12,6 @@
|
||||
// cross-crate scenario.
|
||||
|
||||
#![crate_type="lib"]
|
||||
#![feature(associated_types)]
|
||||
|
||||
pub trait Bar {
|
||||
type T;
|
||||
|
@ -9,7 +9,6 @@
|
||||
// except according to those terms.
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(associated_types)]
|
||||
|
||||
pub struct TreeBuilder<H>;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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> {
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
// ignore-android see #10393 #13206
|
||||
|
||||
#![feature(associated_types, slicing_syntax, unboxed_closures)]
|
||||
#![feature(slicing_syntax, unboxed_closures)]
|
||||
|
||||
extern crate libc;
|
||||
|
||||
|
@ -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"]
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
// Check testing of equality constraints in a higher-ranked context.
|
||||
|
||||
#![feature(associated_types)]
|
||||
|
||||
pub trait TheTrait<T> {
|
||||
type A;
|
||||
|
||||
|
@ -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() {
|
||||
}
|
||||
|
||||
|
@ -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() {
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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() {
|
||||
}
|
||||
|
||||
|
@ -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`.
|
||||
|
||||
|
@ -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() {}
|
||||
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
// Test type checking of uses of associated types via sugary paths.
|
||||
|
||||
#![feature(associated_types)]
|
||||
|
||||
pub trait Foo {
|
||||
type A;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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() {
|
||||
}
|
||||
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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> {
|
||||
|
@ -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> {
|
||||
|
@ -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> {
|
||||
|
@ -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> {
|
||||
|
@ -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)]
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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> {
|
||||
|
@ -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() {
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
// error-pattern: reached the recursion limit while auto-dereferencing
|
||||
|
||||
#![feature(associated_types)]
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
struct Foo;
|
||||
|
@ -9,7 +9,6 @@
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(associated_types)]
|
||||
|
||||
use std::any::Any;
|
||||
use std::intrinsics::TypeId;
|
||||
|
@ -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);
|
||||
|
@ -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`
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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() {}
|
||||
|
@ -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>;
|
||||
|
||||
|
@ -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>;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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() {}
|
||||
|
||||
|
@ -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> {
|
||||
|
@ -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 {
|
||||
|
@ -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)>;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
// Check that associated types are `Sized`
|
||||
|
||||
#![feature(associated_types)]
|
||||
|
||||
trait Trait {
|
||||
type Output;
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
// aux-build:issue_20389.rs
|
||||
|
||||
#![feature(associated_types)]
|
||||
extern crate issue_20389;
|
||||
|
||||
struct Foo;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user