Skip to content

Commit

Permalink
Fix fallout in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Mar 30, 2016
1 parent 0c6f067 commit da41e58
Show file tree
Hide file tree
Showing 125 changed files with 285 additions and 285 deletions.
2 changes: 1 addition & 1 deletion src/test/compile-fail/associated-types-unsized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ trait Get {
}

fn foo<T:Get>(t: T) {
let x = t.get(); //~ ERROR the trait `core::marker::Sized` is not implemented
let x = t.get(); //~ ERROR the trait `std::marker::Sized` is not implemented
}

fn main() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/bad-const-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

static i: String = 10;
//~^ ERROR mismatched types
//~| expected `collections::string::String`
//~| expected `std::string::String`
//~| found `_`
//~| expected struct `collections::string::String`
//~| expected struct `std::string::String`
//~| found integral variable
fn main() { println!("{}", i); }
2 changes: 1 addition & 1 deletion src/test/compile-fail/bad-method-typaram-kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

fn foo<T:'static>() {
1.bar::<T>(); //~ ERROR `core::marker::Send` is not implemented
1.bar::<T>(); //~ ERROR `std::marker::Send` is not implemented
}

trait bar {
Expand Down
6 changes: 3 additions & 3 deletions src/test/compile-fail/bad-sized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trait Trait {}

pub fn main() {
let x: Vec<Trait + Sized> = Vec::new();
//~^ ERROR the trait `core::marker::Sized` is not implemented
//~| ERROR the trait `core::marker::Sized` is not implemented
//~| ERROR the trait `core::marker::Sized` is not implemented
//~^ ERROR the trait `std::marker::Sized` is not implemented
//~| ERROR the trait `std::marker::Sized` is not implemented
//~| ERROR the trait `std::marker::Sized` is not implemented
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/binop-bitxor-str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern:`^` cannot be applied to type `collections::string::String`
// error-pattern:`^` cannot be applied to type `std::string::String`

fn main() { let x = "a".to_string() ^ "b".to_string(); }
4 changes: 2 additions & 2 deletions src/test/compile-fail/builtin-superkinds-double-superkind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

trait Foo : Send+Sync { }

impl <T: Sync+'static> Foo for (T,) { } //~ ERROR the trait `core::marker::Send` is not implemented
impl <T: Sync+'static> Foo for (T,) { } //~ ERROR the trait `std::marker::Send` is not implemented

impl <T: Send> Foo for (T,T) { } //~ ERROR the trait `core::marker::Sync` is not implemented
impl <T: Send> Foo for (T,T) { } //~ ERROR the trait `std::marker::Sync` is not implemented

impl <T: Send+Sync> Foo for (T,T,T) { } // (ok)

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/builtin-superkinds-in-metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ struct X<T>(T);
impl <T:Sync> RequiresShare for X<T> { }

impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { }
//~^ ERROR the trait `core::marker::Send` is not implemented
//~^ ERROR the trait `std::marker::Send` is not implemented

fn main() { }
2 changes: 1 addition & 1 deletion src/test/compile-fail/builtin-superkinds-simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
trait Foo : Send { }

impl Foo for std::rc::Rc<i8> { }
//~^ ERROR the trait `core::marker::Send` is not implemented
//~^ ERROR the trait `std::marker::Send` is not implemented

fn main() { }
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

trait Foo : Send { }

impl <T: Sync+'static> Foo for T { } //~ ERROR the trait `core::marker::Send` is not implemented
impl <T: Sync+'static> Foo for T { } //~ ERROR the trait `std::marker::Send` is not implemented

fn main() { }
4 changes: 2 additions & 2 deletions src/test/compile-fail/cast-rfc0401.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fn main()
let _ = 42usize as *const [u8]; //~ ERROR casting
let _ = v as *const [u8]; //~ ERROR cannot cast
let _ = fat_v as *const Foo;
//~^ ERROR `core::marker::Sized` is not implemented for the type `[u8]`
//~^ ERROR `std::marker::Sized` is not implemented for the type `[u8]`
//~^^ HELP run `rustc --explain E0277` to see a detailed explanation
//~^^^ NOTE `[u8]` does not have a constant size known at compile-time
//~^^^^ NOTE required for the cast to the object type `Foo`
Expand All @@ -106,7 +106,7 @@ fn main()

let a : *const str = "hello";
let _ = a as *const Foo;
//~^ ERROR `core::marker::Sized` is not implemented for the type `str`
//~^ ERROR `std::marker::Sized` is not implemented for the type `str`
//~^^ HELP run `rustc --explain E0277` to see a detailed explanation
//~^^^ NOTE `str` does not have a constant size known at compile-time
//~^^^^ NOTE required for the cast to the object type `Foo`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct X<F> where F: FnOnce() + 'static + Send {
}

fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
//~^ ERROR the trait `core::marker::Send` is not implemented for the type
//~^ ERROR the trait `std::marker::Send` is not implemented for the type
return X { field: blk };
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/closure-bounds-subtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn give_any<F>(f: F) where F: FnOnce() {

fn give_owned<F>(f: F) where F: FnOnce() + Send {
take_any(f);
take_const_owned(f); //~ ERROR the trait `core::marker::Sync` is not implemented for the type
take_const_owned(f); //~ ERROR the trait `std::marker::Sync` is not implemented for the type
}

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ struct TestType<T>(::std::marker::PhantomData<T>);
unsafe impl<T: MyTrait+'static> Send for TestType<T> {}

impl<T: MyTrait> !Send for TestType<T> {}
//~^ ERROR conflicting implementations of trait `core::marker::Send`
//~^ ERROR conflicting implementations of trait `std::marker::Send`

unsafe impl<T:'static> Send for TestType<T> {}
//~^ ERROR error: conflicting implementations of trait `core::marker::Send`
//~^ ERROR error: conflicting implementations of trait `std::marker::Send`

impl !Send for TestType<i32> {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct E {
#[derive(Clone)]
struct C {
x: NoCloneOrEq
//~^ ERROR the trait `core::clone::Clone` is not implemented for the type `NoCloneOrEq`
//~^ ERROR the trait `std::clone::Clone` is not implemented for the type `NoCloneOrEq`
}


Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/deriving-span-Default-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct Error;

#[derive(Default)]
struct Struct {
x: Error //~ ERROR `core::default::Default` is not implemented
x: Error //~ ERROR `std::default::Default` is not implemented
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/destructure-trait-ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn main() {
// n == m
let &x = &1isize as &T; //~ ERROR type `&T` cannot be dereferenced
let &&x = &(&1isize as &T); //~ ERROR type `&T` cannot be dereferenced
let box x = box 1isize as Box<T>; //~ ERROR the trait `core::marker::Sized` is not implemented
let box x = box 1isize as Box<T>; //~ ERROR the trait `std::marker::Sized` is not implemented

// n > m
let &&x = &1isize as &T;
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/dropck_no_diverge_on_nonregular_3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ enum Wrapper<T:'static> {
}

fn main() {
let w = //~ ERROR overflow while adding drop-check rules for core::option
let w = //~ ERROR overflow while adding drop-check rules for std::option
Some(Wrapper::Simple::<u32>);
//~^ ERROR overflow while adding drop-check rules for core::option::Option
//~^ ERROR overflow while adding drop-check rules for std::option::Option
//~| ERROR overflow while adding drop-check rules for Wrapper
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/dst-bad-assign-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ pub fn main() {
// FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
let z: Box<ToBar> = Box::new(Bar1 {f: 36});
f5.ptr = *z;
//~^ ERROR the trait `core::marker::Sized` is not implemented
//~^ ERROR the trait `std::marker::Sized` is not implemented
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/dst-bad-assign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ pub fn main() {
//~| found `Bar1`
//~| expected trait ToBar
//~| found struct `Bar1`
//~| ERROR the trait `core::marker::Sized` is not implemented for the type `ToBar`
//~| ERROR the trait `std::marker::Sized` is not implemented for the type `ToBar`
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/dst-bad-deep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ pub fn main() {
let f: Fat<[isize; 3]> = Fat { ptr: [5, 6, 7] };
let g: &Fat<[isize]> = &f;
let h: &Fat<Fat<[isize]>> = &Fat { ptr: *g };
//~^ ERROR the trait `core::marker::Sized` is not implemented
//~^ ERROR the trait `std::marker::Sized` is not implemented
}
8 changes: 4 additions & 4 deletions src/test/compile-fail/dst-object-from-unsized-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ impl Foo for [u8] {}

fn test1<T: ?Sized + Foo>(t: &T) {
let u: &Foo = t;
//~^ ERROR `core::marker::Sized` is not implemented for the type `T`
//~^ ERROR `std::marker::Sized` is not implemented for the type `T`
}

fn test2<T: ?Sized + Foo>(t: &T) {
let v: &Foo = t as &Foo;
//~^ ERROR `core::marker::Sized` is not implemented for the type `T`
//~^ ERROR `std::marker::Sized` is not implemented for the type `T`
}

fn test3() {
let _: &[&Foo] = &["hi"];
//~^ ERROR `core::marker::Sized` is not implemented for the type `str`
//~^ ERROR `std::marker::Sized` is not implemented for the type `str`
}

fn test4(x: &[u8]) {
let _: &Foo = x as &Foo;
//~^ ERROR `core::marker::Sized` is not implemented for the type `[u8]`
//~^ ERROR `std::marker::Sized` is not implemented for the type `[u8]`
}

fn main() { }
4 changes: 2 additions & 2 deletions src/test/compile-fail/dst-sized-trait-param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized

impl Foo<[isize]> for usize { }
//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[isize]`
//~^ ERROR the trait `std::marker::Sized` is not implemented for the type `[isize]`

impl Foo<isize> for [usize] { }
//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[usize]`
//~^ ERROR the trait `std::marker::Sized` is not implemented for the type `[usize]`

pub fn main() { }
2 changes: 1 addition & 1 deletion src/test/compile-fail/error-should-say-copy-not-pod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
fn check_bound<T:Copy>(_: T) {}

fn main() {
check_bound("nocopy".to_string()); //~ ERROR the trait `core::marker::Copy` is not implemented
check_bound("nocopy".to_string()); //~ ERROR the trait `std::marker::Copy` is not implemented
}
4 changes: 2 additions & 2 deletions src/test/compile-fail/extern-wrong-value-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ fn main() {
// extern functions are extern "C" fn
let _x: extern "C" fn() = f; // OK
is_fn(f);
//~^ ERROR the trait `core::ops::Fn<()>` is not implemented for the type `extern "C" fn()
//~| ERROR the trait `core::ops::FnOnce<()>` is not implemented for the type `extern "C" fn()
//~^ ERROR the trait `std::ops::Fn<()>` is not implemented for the type `extern "C" fn()
//~| ERROR the trait `std::ops::FnOnce<()>` is not implemented for the type `extern "C" fn()
}
8 changes: 4 additions & 4 deletions src/test/compile-fail/fn-item-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ fn main() {

eq(bar::<String>, bar::<Vec<u8>>);
//~^ ERROR mismatched types
//~| expected `fn(isize) -> isize {bar::<collections::string::String>}`
//~| found `fn(isize) -> isize {bar::<collections::vec::Vec<u8>>}`
//~| expected struct `collections::string::String`
//~| found struct `collections::vec::Vec`
//~| expected `fn(isize) -> isize {bar::<std::string::String>}`
//~| found `fn(isize) -> isize {bar::<std::vec::Vec<u8>>}`
//~| expected struct `std::string::String`
//~| found struct `std::vec::Vec`

// Make sure we distinguish between trait methods correctly.
eq(<u8 as Foo>::foo, <u16 as Foo>::foo);
Expand Down
10 changes: 5 additions & 5 deletions src/test/compile-fail/fn-trait-formatting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ fn main() {
let _: () = (box |_: isize| {}) as Box<FnOnce(isize)>;
//~^ ERROR mismatched types
//~| expected `()`
//~| found `Box<core::ops::FnOnce(isize)>`
//~| found `Box<std::ops::FnOnce(isize)>`
//~| expected ()
//~| found box
let _: () = (box |_: isize, isize| {}) as Box<Fn(isize, isize)>;
//~^ ERROR mismatched types
//~| expected `()`
//~| found `Box<core::ops::Fn(isize, isize)>`
//~| found `Box<std::ops::Fn(isize, isize)>`
//~| expected ()
//~| found box
let _: () = (box || -> isize { unimplemented!() }) as Box<FnMut() -> isize>;
//~^ ERROR mismatched types
//~| expected `()`
//~| found `Box<core::ops::FnMut() -> isize>`
//~| found `Box<std::ops::FnMut() -> isize>`
//~| expected ()
//~| found box

needs_fn(1);
//~^ ERROR `core::ops::Fn<(isize,)>`
//~| ERROR `core::ops::FnOnce<(isize,)>`
//~^ ERROR `std::ops::Fn<(isize,)>`
//~| ERROR `std::ops::FnOnce<(isize,)>`
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/for-loop-bogosity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn main() {
x: 1,
y: 2,
};
for x in bogus { //~ ERROR `core::iter::Iterator` is not implemented for the type `MyStruct`
for x in bogus { //~ ERROR `std::iter::Iterator` is not implemented for the type `MyStruct`
drop(x);
}
}
4 changes: 2 additions & 2 deletions src/test/compile-fail/fully-qualified-type-name1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ fn main() {
let x: Option<usize>;
x = 5;
//~^ ERROR mismatched types
//~| expected `core::option::Option<usize>`
//~| expected `std::option::Option<usize>`
//~| found `_`
//~| expected enum `core::option::Option`
//~| expected enum `std::option::Option`
//~| found integral variable
}
4 changes: 2 additions & 2 deletions src/test/compile-fail/fully-qualified-type-name4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use std::option::Option;
fn bar(x: usize) -> Option<usize> {
return x;
//~^ ERROR mismatched types
//~| expected `core::option::Option<usize>`
//~| expected `std::option::Option<usize>`
//~| found `usize`
//~| expected enum `core::option::Option`
//~| expected enum `std::option::Option`
//~| found usize
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/generic-type-params-name-repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ fn main() {
// Including cases where the default is using previous type params.
let _: HashMap<String, isize> = ();
//~^ ERROR mismatched types
//~| expected `HashMap<collections::string::String, isize>`
//~| expected `HashMap<std::string::String, isize>`
//~| found `()`
//~| expected struct `HashMap`
//~| found ()
let _: HashMap<String, isize, Hash<String>> = ();
//~^ ERROR mismatched types
//~| expected `HashMap<collections::string::String, isize>`
//~| expected `HashMap<std::string::String, isize>`
//~| found `()`
//~| expected struct `HashMap`
//~| found ()
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/ifmt-unimpl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

fn main() {
format!("{:X}", "3");
//~^ ERROR: the trait `core::fmt::UpperHex` is not implemented
//~^ ERROR: the trait `std::fmt::UpperHex` is not implemented
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/indexing-requires-a-uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

fn main() {
fn bar<T>(_: T) {}
[0][0u8]; //~ ERROR: the trait `core::ops::Index<u8>` is not implemented
[0][0u8]; //~ ERROR: the trait `std::ops::Index<u8>` is not implemented

[0][0]; // should infer to be a usize

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/infinite-instantiation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl<T:Clone> ToOpt for Option<T> {
}

fn function<T:ToOpt + Clone>(counter: usize, t: T) {
//~^ ERROR reached the recursion limit while instantiating `function::<core::option::Option<
//~^ ERROR reached the recursion limit while instantiating `function::<std::option::Option<
if counter > 0 {
function(counter - 1, t.to_option());
// FIXME(#4287) Error message should be here. It should be
Expand Down
16 changes: 8 additions & 8 deletions src/test/compile-fail/integral-indexing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ pub fn main() {
let s: String = "abcdef".to_string();
v[3_usize];
v[3];
v[3u8]; //~ERROR the trait `core::ops::Index<u8>` is not implemented
v[3i8]; //~ERROR the trait `core::ops::Index<i8>` is not implemented
v[3u32]; //~ERROR the trait `core::ops::Index<u32>` is not implemented
v[3i32]; //~ERROR the trait `core::ops::Index<i32>` is not implemented
v[3u8]; //~ERROR the trait `std::ops::Index<u8>` is not implemented
v[3i8]; //~ERROR the trait `std::ops::Index<i8>` is not implemented
v[3u32]; //~ERROR the trait `std::ops::Index<u32>` is not implemented
v[3i32]; //~ERROR the trait `std::ops::Index<i32>` is not implemented
s.as_bytes()[3_usize];
s.as_bytes()[3];
s.as_bytes()[3u8]; //~ERROR the trait `core::ops::Index<u8>` is not implemented
s.as_bytes()[3i8]; //~ERROR the trait `core::ops::Index<i8>` is not implemented
s.as_bytes()[3u32]; //~ERROR the trait `core::ops::Index<u32>` is not implemented
s.as_bytes()[3i32]; //~ERROR the trait `core::ops::Index<i32>` is not implemented
s.as_bytes()[3u8]; //~ERROR the trait `std::ops::Index<u8>` is not implemented
s.as_bytes()[3i8]; //~ERROR the trait `std::ops::Index<i8>` is not implemented
s.as_bytes()[3u32]; //~ERROR the trait `std::ops::Index<u32>` is not implemented
s.as_bytes()[3i32]; //~ERROR the trait `std::ops::Index<i32>` is not implemented
}
Loading

0 comments on commit da41e58

Please sign in to comment.