Skip to content

Commit

Permalink
Remove obsolete "MarkerTrait" from tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
quantheory committed Apr 25, 2015
1 parent b1db4ec commit 4c0ac6d
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 44 deletions.
6 changes: 2 additions & 4 deletions src/test/auxiliary/associated-const-cc-lib.rs
Expand Up @@ -12,10 +12,8 @@

#![crate_type="lib"]

use std::marker::MarkerTrait;

// These items are for testing that associated consts work cross-crate.
pub trait Foo: MarkerTrait {
pub trait Foo {
const BAR: usize;
}

Expand All @@ -26,7 +24,7 @@ impl Foo for FooNoDefault {
}

// These test that defaults and default resolution work cross-crate.
pub trait FooDefault: MarkerTrait {
pub trait FooDefault {
const BAR: usize = 1;
}

Expand Down
4 changes: 1 addition & 3 deletions src/test/compile-fail/associated-const-impl-wrong-type.rs
Expand Up @@ -10,9 +10,7 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

trait Foo: MarkerTrait {
trait Foo {
const BAR: u32;
}

Expand Down
2 changes: 0 additions & 2 deletions src/test/compile-fail/associated-const-private-impl.rs
Expand Up @@ -10,8 +10,6 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

mod bar1 {
pub use self::bar2::Foo;
mod bar2 {
Expand Down
4 changes: 1 addition & 3 deletions src/test/compile-fail/gated-associated_consts.rs
Expand Up @@ -8,9 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::marker::MarkerTrait;

trait MyTrait: MarkerTrait {
trait MyTrait {
const C: bool;
//~^ associated constants are experimental
//~| add #![feature(associated_consts)] to the crate attributes to enable
Expand Down
4 changes: 1 addition & 3 deletions src/test/compile-fail/method-path-in-pattern.rs
Expand Up @@ -8,15 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::marker::MarkerTrait;

struct Foo;

impl Foo {
fn bar(&self) {}
}

trait MyTrait: MarkerTrait {
trait MyTrait {
fn trait_bar() {}
}

Expand Down
4 changes: 1 addition & 3 deletions src/test/compile-fail/method-resolvable-path-in-pattern.rs
Expand Up @@ -8,11 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::marker::MarkerTrait;

struct Foo;

trait MyTrait: MarkerTrait {
trait MyTrait {
fn trait_bar() {}
}

Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/associated-const-match-patterns.rs
Expand Up @@ -10,8 +10,6 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

struct Foo;

enum Bar {
Expand All @@ -24,7 +22,7 @@ impl Foo {
const MYBAR: Bar = Bar::Var2;
}

trait HasBar: MarkerTrait {
trait HasBar {
const THEBAR: Bar;
}

Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/associated-const-overwrite-default.rs
Expand Up @@ -10,9 +10,7 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

trait Foo: MarkerTrait {
trait Foo {
const ID: i32 = 2;
}

Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/associated-const-public-impl.rs
Expand Up @@ -10,8 +10,6 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

mod bar1 {
pub use self::bar2::Foo;
mod bar2 {
Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/associated-const-resolution-order.rs
Expand Up @@ -10,15 +10,13 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

struct MyType;

impl MyType {
const IMPL_IS_INHERENT: bool = true;
}

trait MyTrait: MarkerTrait {
trait MyTrait {
const IMPL_IS_INHERENT: bool;
const IMPL_IS_ON_TRAIT: bool;
}
Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/associated-const-self-type.rs
Expand Up @@ -10,9 +10,7 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

trait MyInt: MarkerTrait {
trait MyInt {
const ONE: Self;
}

Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/associated-const-ufcs-infer-trait.rs
Expand Up @@ -10,9 +10,7 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

trait Foo: MarkerTrait {
trait Foo {
const ID: i32;
}

Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/associated-const-use-default.rs
Expand Up @@ -10,9 +10,7 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

trait Foo: MarkerTrait {
trait Foo {
const ID: i32 = 1;
}

Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/associated-const-use-impl-of-same-trait.rs
Expand Up @@ -10,13 +10,11 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

// The main purpose of this test is to ensure that different impls of the same
// trait can refer to each other without setting off the static recursion check
// (as long as there's no actual recursion).

trait Foo: MarkerTrait {
trait Foo {
const BAR: u32;
}

Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/associated-const.rs
Expand Up @@ -10,9 +10,7 @@

#![feature(associated_consts)]

use std::marker::MarkerTrait;

trait Foo: MarkerTrait {
trait Foo {
const ID: i32;
}

Expand Down

0 comments on commit 4c0ac6d

Please sign in to comment.