Skip to content

Commit da41e58

Browse files
committed
Fix fallout in tests
1 parent 0c6f067 commit da41e58

File tree

125 files changed

+285
-285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+285
-285
lines changed

src/test/compile-fail/associated-types-unsized.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait Get {
1414
}
1515

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

2020
fn main() {

src/test/compile-fail/bad-const-type.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
static i: String = 10;
1212
//~^ ERROR mismatched types
13-
//~| expected `collections::string::String`
13+
//~| expected `std::string::String`
1414
//~| found `_`
15-
//~| expected struct `collections::string::String`
15+
//~| expected struct `std::string::String`
1616
//~| found integral variable
1717
fn main() { println!("{}", i); }

src/test/compile-fail/bad-method-typaram-kind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

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

1515
trait bar {

src/test/compile-fail/bad-sized.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ trait Trait {}
1212

1313
pub fn main() {
1414
let x: Vec<Trait + Sized> = Vec::new();
15-
//~^ ERROR the trait `core::marker::Sized` is not implemented
16-
//~| ERROR the trait `core::marker::Sized` is not implemented
17-
//~| ERROR the trait `core::marker::Sized` is not implemented
15+
//~^ ERROR the trait `std::marker::Sized` is not implemented
16+
//~| ERROR the trait `std::marker::Sized` is not implemented
17+
//~| ERROR the trait `std::marker::Sized` is not implemented
1818
}

src/test/compile-fail/binop-bitxor-str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

1313
fn main() { let x = "a".to_string() ^ "b".to_string(); }

src/test/compile-fail/builtin-superkinds-double-superkind.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
trait Foo : Send+Sync { }
1515

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

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

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

src/test/compile-fail/builtin-superkinds-in-metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ struct X<T>(T);
2222
impl <T:Sync> RequiresShare for X<T> { }
2323

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

2727
fn main() { }

src/test/compile-fail/builtin-superkinds-simple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
trait Foo : Send { }
1515

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

1919
fn main() { }

src/test/compile-fail/builtin-superkinds-typaram-not-send.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212

1313
trait Foo : Send { }
1414

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

1717
fn main() { }

src/test/compile-fail/cast-rfc0401.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn main()
9191
let _ = 42usize as *const [u8]; //~ ERROR casting
9292
let _ = v as *const [u8]; //~ ERROR cannot cast
9393
let _ = fat_v as *const Foo;
94-
//~^ ERROR `core::marker::Sized` is not implemented for the type `[u8]`
94+
//~^ ERROR `std::marker::Sized` is not implemented for the type `[u8]`
9595
//~^^ HELP run `rustc --explain E0277` to see a detailed explanation
9696
//~^^^ NOTE `[u8]` does not have a constant size known at compile-time
9797
//~^^^^ NOTE required for the cast to the object type `Foo`
@@ -106,7 +106,7 @@ fn main()
106106

107107
let a : *const str = "hello";
108108
let _ = a as *const Foo;
109-
//~^ ERROR `core::marker::Sized` is not implemented for the type `str`
109+
//~^ ERROR `std::marker::Sized` is not implemented for the type `str`
110110
//~^^ HELP run `rustc --explain E0277` to see a detailed explanation
111111
//~^^^ NOTE `str` does not have a constant size known at compile-time
112112
//~^^^^ NOTE required for the cast to the object type `Foo`

src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct X<F> where F: FnOnce() + 'static + Send {
1313
}
1414

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

src/test/compile-fail/closure-bounds-subtype.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn give_any<F>(f: F) where F: FnOnce() {
2121

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

2727
fn main() {}

src/test/compile-fail/coherence-conflicting-negative-trait-impl.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ struct TestType<T>(::std::marker::PhantomData<T>);
1717
unsafe impl<T: MyTrait+'static> Send for TestType<T> {}
1818

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

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

2525
impl !Send for TestType<i32> {}
2626

src/test/compile-fail/deriving-no-inner-impl-error-message.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct E {
1818
#[derive(Clone)]
1919
struct C {
2020
x: NoCloneOrEq
21-
//~^ ERROR the trait `core::clone::Clone` is not implemented for the type `NoCloneOrEq`
21+
//~^ ERROR the trait `std::clone::Clone` is not implemented for the type `NoCloneOrEq`
2222
}
2323

2424

src/test/compile-fail/deriving-span-Default-struct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct Error;
1717

1818
#[derive(Default)]
1919
struct Struct {
20-
x: Error //~ ERROR `core::default::Default` is not implemented
20+
x: Error //~ ERROR `std::default::Default` is not implemented
2121
}
2222

2323
fn main() {}

src/test/compile-fail/destructure-trait-ref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn main() {
3535
// n == m
3636
let &x = &1isize as &T; //~ ERROR type `&T` cannot be dereferenced
3737
let &&x = &(&1isize as &T); //~ ERROR type `&T` cannot be dereferenced
38-
let box x = box 1isize as Box<T>; //~ ERROR the trait `core::marker::Sized` is not implemented
38+
let box x = box 1isize as Box<T>; //~ ERROR the trait `std::marker::Sized` is not implemented
3939

4040
// n > m
4141
let &&x = &1isize as &T;

src/test/compile-fail/dropck_no_diverge_on_nonregular_3.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ enum Wrapper<T:'static> {
3939
}
4040

4141
fn main() {
42-
let w = //~ ERROR overflow while adding drop-check rules for core::option
42+
let w = //~ ERROR overflow while adding drop-check rules for std::option
4343
Some(Wrapper::Simple::<u32>);
44-
//~^ ERROR overflow while adding drop-check rules for core::option::Option
44+
//~^ ERROR overflow while adding drop-check rules for std::option::Option
4545
//~| ERROR overflow while adding drop-check rules for Wrapper
4646
}

src/test/compile-fail/dst-bad-assign-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ pub fn main() {
4444
// FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
4545
let z: Box<ToBar> = Box::new(Bar1 {f: 36});
4646
f5.ptr = *z;
47-
//~^ ERROR the trait `core::marker::Sized` is not implemented
47+
//~^ ERROR the trait `std::marker::Sized` is not implemented
4848
}

src/test/compile-fail/dst-bad-assign.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ pub fn main() {
4949
//~| found `Bar1`
5050
//~| expected trait ToBar
5151
//~| found struct `Bar1`
52-
//~| ERROR the trait `core::marker::Sized` is not implemented for the type `ToBar`
52+
//~| ERROR the trait `std::marker::Sized` is not implemented for the type `ToBar`
5353
}

src/test/compile-fail/dst-bad-deep.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ pub fn main() {
2121
let f: Fat<[isize; 3]> = Fat { ptr: [5, 6, 7] };
2222
let g: &Fat<[isize]> = &f;
2323
let h: &Fat<Fat<[isize]>> = &Fat { ptr: *g };
24-
//~^ ERROR the trait `core::marker::Sized` is not implemented
24+
//~^ ERROR the trait `std::marker::Sized` is not implemented
2525
}

src/test/compile-fail/dst-object-from-unsized-type.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ impl Foo for [u8] {}
1616

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

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

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

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

3737
fn main() { }

src/test/compile-fail/dst-sized-trait-param.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
1616

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

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

2323
pub fn main() { }

src/test/compile-fail/error-should-say-copy-not-pod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
fn check_bound<T:Copy>(_: T) {}
1414

1515
fn main() {
16-
check_bound("nocopy".to_string()); //~ ERROR the trait `core::marker::Copy` is not implemented
16+
check_bound("nocopy".to_string()); //~ ERROR the trait `std::marker::Copy` is not implemented
1717
}

src/test/compile-fail/extern-wrong-value-type.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ fn main() {
1717
// extern functions are extern "C" fn
1818
let _x: extern "C" fn() = f; // OK
1919
is_fn(f);
20-
//~^ ERROR the trait `core::ops::Fn<()>` is not implemented for the type `extern "C" fn()
21-
//~| ERROR the trait `core::ops::FnOnce<()>` is not implemented for the type `extern "C" fn()
20+
//~^ ERROR the trait `std::ops::Fn<()>` is not implemented for the type `extern "C" fn()
21+
//~| ERROR the trait `std::ops::FnOnce<()>` is not implemented for the type `extern "C" fn()
2222
}

src/test/compile-fail/fn-item-type.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ fn main() {
3434

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

4242
// Make sure we distinguish between trait methods correctly.
4343
eq(<u8 as Foo>::foo, <u16 as Foo>::foo);

src/test/compile-fail/fn-trait-formatting.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ fn main() {
1717
let _: () = (box |_: isize| {}) as Box<FnOnce(isize)>;
1818
//~^ ERROR mismatched types
1919
//~| expected `()`
20-
//~| found `Box<core::ops::FnOnce(isize)>`
20+
//~| found `Box<std::ops::FnOnce(isize)>`
2121
//~| expected ()
2222
//~| found box
2323
let _: () = (box |_: isize, isize| {}) as Box<Fn(isize, isize)>;
2424
//~^ ERROR mismatched types
2525
//~| expected `()`
26-
//~| found `Box<core::ops::Fn(isize, isize)>`
26+
//~| found `Box<std::ops::Fn(isize, isize)>`
2727
//~| expected ()
2828
//~| found box
2929
let _: () = (box || -> isize { unimplemented!() }) as Box<FnMut() -> isize>;
3030
//~^ ERROR mismatched types
3131
//~| expected `()`
32-
//~| found `Box<core::ops::FnMut() -> isize>`
32+
//~| found `Box<std::ops::FnMut() -> isize>`
3333
//~| expected ()
3434
//~| found box
3535

3636
needs_fn(1);
37-
//~^ ERROR `core::ops::Fn<(isize,)>`
38-
//~| ERROR `core::ops::FnOnce<(isize,)>`
37+
//~^ ERROR `std::ops::Fn<(isize,)>`
38+
//~| ERROR `std::ops::FnOnce<(isize,)>`
3939
}

src/test/compile-fail/for-loop-bogosity.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn main() {
2424
x: 1,
2525
y: 2,
2626
};
27-
for x in bogus { //~ ERROR `core::iter::Iterator` is not implemented for the type `MyStruct`
27+
for x in bogus { //~ ERROR `std::iter::Iterator` is not implemented for the type `MyStruct`
2828
drop(x);
2929
}
3030
}

src/test/compile-fail/fully-qualified-type-name1.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ fn main() {
1414
let x: Option<usize>;
1515
x = 5;
1616
//~^ ERROR mismatched types
17-
//~| expected `core::option::Option<usize>`
17+
//~| expected `std::option::Option<usize>`
1818
//~| found `_`
19-
//~| expected enum `core::option::Option`
19+
//~| expected enum `std::option::Option`
2020
//~| found integral variable
2121
}

src/test/compile-fail/fully-qualified-type-name4.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use std::option::Option;
1515
fn bar(x: usize) -> Option<usize> {
1616
return x;
1717
//~^ ERROR mismatched types
18-
//~| expected `core::option::Option<usize>`
18+
//~| expected `std::option::Option<usize>`
1919
//~| found `usize`
20-
//~| expected enum `core::option::Option`
20+
//~| expected enum `std::option::Option`
2121
//~| found usize
2222
}
2323

src/test/compile-fail/generic-type-params-name-repr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ fn main() {
3838
// Including cases where the default is using previous type params.
3939
let _: HashMap<String, isize> = ();
4040
//~^ ERROR mismatched types
41-
//~| expected `HashMap<collections::string::String, isize>`
41+
//~| expected `HashMap<std::string::String, isize>`
4242
//~| found `()`
4343
//~| expected struct `HashMap`
4444
//~| found ()
4545
let _: HashMap<String, isize, Hash<String>> = ();
4646
//~^ ERROR mismatched types
47-
//~| expected `HashMap<collections::string::String, isize>`
47+
//~| expected `HashMap<std::string::String, isize>`
4848
//~| found `()`
4949
//~| expected struct `HashMap`
5050
//~| found ()

src/test/compile-fail/ifmt-unimpl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111
fn main() {
1212
format!("{:X}", "3");
13-
//~^ ERROR: the trait `core::fmt::UpperHex` is not implemented
13+
//~^ ERROR: the trait `std::fmt::UpperHex` is not implemented
1414
}

src/test/compile-fail/indexing-requires-a-uint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

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

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

src/test/compile-fail/infinite-instantiation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<T:Clone> ToOpt for Option<T> {
3131
}
3232

3333
fn function<T:ToOpt + Clone>(counter: usize, t: T) {
34-
//~^ ERROR reached the recursion limit while instantiating `function::<core::option::Option<
34+
//~^ ERROR reached the recursion limit while instantiating `function::<std::option::Option<
3535
if counter > 0 {
3636
function(counter - 1, t.to_option());
3737
// FIXME(#4287) Error message should be here. It should be

src/test/compile-fail/integral-indexing.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ pub fn main() {
1313
let s: String = "abcdef".to_string();
1414
v[3_usize];
1515
v[3];
16-
v[3u8]; //~ERROR the trait `core::ops::Index<u8>` is not implemented
17-
v[3i8]; //~ERROR the trait `core::ops::Index<i8>` is not implemented
18-
v[3u32]; //~ERROR the trait `core::ops::Index<u32>` is not implemented
19-
v[3i32]; //~ERROR the trait `core::ops::Index<i32>` is not implemented
16+
v[3u8]; //~ERROR the trait `std::ops::Index<u8>` is not implemented
17+
v[3i8]; //~ERROR the trait `std::ops::Index<i8>` is not implemented
18+
v[3u32]; //~ERROR the trait `std::ops::Index<u32>` is not implemented
19+
v[3i32]; //~ERROR the trait `std::ops::Index<i32>` is not implemented
2020
s.as_bytes()[3_usize];
2121
s.as_bytes()[3];
22-
s.as_bytes()[3u8]; //~ERROR the trait `core::ops::Index<u8>` is not implemented
23-
s.as_bytes()[3i8]; //~ERROR the trait `core::ops::Index<i8>` is not implemented
24-
s.as_bytes()[3u32]; //~ERROR the trait `core::ops::Index<u32>` is not implemented
25-
s.as_bytes()[3i32]; //~ERROR the trait `core::ops::Index<i32>` is not implemented
22+
s.as_bytes()[3u8]; //~ERROR the trait `std::ops::Index<u8>` is not implemented
23+
s.as_bytes()[3i8]; //~ERROR the trait `std::ops::Index<i8>` is not implemented
24+
s.as_bytes()[3u32]; //~ERROR the trait `std::ops::Index<u32>` is not implemented
25+
s.as_bytes()[3i32]; //~ERROR the trait `std::ops::Index<i32>` is not implemented
2626
}

0 commit comments

Comments
 (0)