mirror of https://github.com/rust-lang/rust.git
Remove obsolete "MarkerTrait" from tests.
This commit is contained in:
parent
b1db4ec3d0
commit
4c0ac6d5ef
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
#![feature(associated_consts)]
|
||||
|
||||
use std::marker::MarkerTrait;
|
||||
|
||||
trait Foo: MarkerTrait {
|
||||
trait Foo {
|
||||
const BAR: u32;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
#![feature(associated_consts)]
|
||||
|
||||
use std::marker::MarkerTrait;
|
||||
|
||||
mod bar1 {
|
||||
pub use self::bar2::Foo;
|
||||
mod bar2 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {}
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
#![feature(associated_consts)]
|
||||
|
||||
use std::marker::MarkerTrait;
|
||||
|
||||
struct Foo;
|
||||
|
||||
enum Bar {
|
||||
|
@ -24,7 +22,7 @@ impl Foo {
|
|||
const MYBAR: Bar = Bar::Var2;
|
||||
}
|
||||
|
||||
trait HasBar: MarkerTrait {
|
||||
trait HasBar {
|
||||
const THEBAR: Bar;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
#![feature(associated_consts)]
|
||||
|
||||
use std::marker::MarkerTrait;
|
||||
|
||||
trait Foo: MarkerTrait {
|
||||
trait Foo {
|
||||
const ID: i32 = 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
#![feature(associated_consts)]
|
||||
|
||||
use std::marker::MarkerTrait;
|
||||
|
||||
mod bar1 {
|
||||
pub use self::bar2::Foo;
|
||||
mod bar2 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
#![feature(associated_consts)]
|
||||
|
||||
use std::marker::MarkerTrait;
|
||||
|
||||
trait MyInt: MarkerTrait {
|
||||
trait MyInt {
|
||||
const ONE: Self;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
#![feature(associated_consts)]
|
||||
|
||||
use std::marker::MarkerTrait;
|
||||
|
||||
trait Foo: MarkerTrait {
|
||||
trait Foo {
|
||||
const ID: i32;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
#![feature(associated_consts)]
|
||||
|
||||
use std::marker::MarkerTrait;
|
||||
|
||||
trait Foo: MarkerTrait {
|
||||
trait Foo {
|
||||
const ID: i32 = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
#![feature(associated_consts)]
|
||||
|
||||
use std::marker::MarkerTrait;
|
||||
|
||||
trait Foo: MarkerTrait {
|
||||
trait Foo {
|
||||
const ID: i32;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue