Skip to content

Commit

Permalink
test: Fix fallout in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Apr 21, 2015
1 parent eeb9488 commit 0791f9f
Show file tree
Hide file tree
Showing 112 changed files with 205 additions and 466 deletions.
6 changes: 1 addition & 5 deletions src/test/auxiliary/issue_3907.rs
Expand Up @@ -8,10 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(core)]

use std::marker::MarkerTrait;

pub trait Foo : MarkerTrait {
pub trait Foo {
fn bar();
}
4 changes: 1 addition & 3 deletions src/test/auxiliary/private_trait_xc.rs
Expand Up @@ -8,6 +8,4 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(core)]

trait Foo : ::std::marker::MarkerTrait {}
trait Foo {}
2 changes: 1 addition & 1 deletion src/test/auxiliary/rustdoc-default-impl.rs
Expand Up @@ -14,7 +14,7 @@
pub mod bar {
use std::marker;

pub trait Bar: marker::MarkerTrait + 'static {}
pub trait Bar: 'static {}

impl Bar for .. {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-base.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-change-lit.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-change-significant-cfg.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-change-trait-bound.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-change-type-arg.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-change-type-ret.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
6 changes: 2 additions & 4 deletions src/test/auxiliary/svh-a-change-type-static.rs
Expand Up @@ -16,14 +16,12 @@
#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-comment.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-doc.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-macro.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-no-change.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-redundant-cfg.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
7 changes: 2 additions & 5 deletions src/test/auxiliary/svh-a-whitespace.rs
Expand Up @@ -14,16 +14,13 @@
//! (#14132).

#![crate_name = "a"]
#![feature(core)]

use std::marker::MarkerTrait;

macro_rules! three {
() => { 3 }
}

pub trait U : MarkerTrait {}
pub trait V : MarkerTrait {}
pub trait U {}
pub trait V {}
impl U for () {}
impl V for () {}

Expand Down
4 changes: 1 addition & 3 deletions src/test/auxiliary/trait_impl_conflict.rs
Expand Up @@ -8,9 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(core)]

pub trait Foo : ::std::marker::MarkerTrait {
pub trait Foo {
}

impl Foo for isize {
Expand Down
Expand Up @@ -11,9 +11,7 @@
#![feature(optin_builtin_traits, core)]
#![crate_type = "rlib"]

use std::marker::MarkerTrait;

pub trait DefaultedTrait : MarkerTrait { }
pub trait DefaultedTrait { }
impl DefaultedTrait for .. { }

pub struct Something<T> { t: T }
2 changes: 1 addition & 1 deletion src/test/compile-fail/associated-types-eq-expr-path.rs
Expand Up @@ -10,7 +10,7 @@

// Check that an associated type cannot be bound in an expression path.

trait Foo : ::std::marker::MarkerTrait {
trait Foo {
type A;
fn bar() -> isize;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/associated-types-issue-17359.rs
Expand Up @@ -11,7 +11,7 @@
// Test that we do not ICE when an impl is missing an associated type (and that we report
// a useful error, of course).

trait Trait : ::std::marker::MarkerTrait {
trait Trait {
type Type;
}

Expand Down
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

trait Foo : ::std::marker::MarkerTrait {
trait Foo {
type X;
type Y;
}
Expand Down
Expand Up @@ -19,7 +19,7 @@
// which checks that the trait interface itself is not considered an
// error as long as all impls satisfy the constraint.

trait Get : ::std::marker::MarkerTrait {
trait Get {
type Value;
}

Expand Down
Expand Up @@ -19,7 +19,7 @@
// which checks that the trait interface itself is not considered an
// error as long as all impls satisfy the constraint.

trait Get : ::std::marker::MarkerTrait {
trait Get {
type Value;
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/associated-types-unconstrained.rs
Expand Up @@ -10,7 +10,7 @@

// Check that an associated type cannot be bound in an expression path.

trait Foo : ::std::marker::MarkerTrait {
trait Foo {
type A;
fn bar() -> isize;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/bad-sized.rs
Expand Up @@ -10,7 +10,7 @@

use std::cell::RefCell;

trait Trait : ::std::marker::MarkerTrait {}
trait Trait {}

pub fn main() {
let x: Vec<Trait + Sized> = Vec::new();
Expand Down
Expand Up @@ -10,7 +10,6 @@

use std::fmt::Debug;
use std::default::Default;
use std::marker::MarkerTrait;

// Test that two blanket impls conflict (at least without negative
// bounds). After all, some other crate could implement Even or Odd
Expand All @@ -20,9 +19,9 @@ trait MyTrait {
fn get(&self) -> usize;
}

trait Even : MarkerTrait { }
trait Even { }

trait Odd : MarkerTrait { }
trait Odd { }

impl Even for isize { }

Expand Down
Expand Up @@ -19,9 +19,9 @@ trait MyTrait {
fn get(&self) -> usize;
}

trait Even : ::std::marker::MarkerTrait { }
trait Even {}

trait Odd : ::std::marker::MarkerTrait { }
trait Odd {}

impl<T:Even> MyTrait for T { //~ ERROR E0119
fn get(&self) -> usize { 0 }
Expand Down
Expand Up @@ -10,7 +10,7 @@

#![feature(optin_builtin_traits)]

trait MyTrait : ::std::marker::MarkerTrait {}
trait MyTrait {}

struct TestType<T>(::std::marker::PhantomData<T>);

Expand Down

0 comments on commit 0791f9f

Please sign in to comment.