Fix fallout in tests
This commit is contained in:
parent
0c6f067961
commit
da41e583d6
@ -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() {
|
||||
|
@ -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); }
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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(); }
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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() { }
|
||||
|
@ -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() { }
|
||||
|
@ -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() { }
|
||||
|
@ -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`
|
||||
@ -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`
|
||||
|
@ -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 };
|
||||
}
|
||||
|
||||
|
@ -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() {}
|
||||
|
@ -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> {}
|
||||
|
||||
|
@ -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`
|
||||
}
|
||||
|
||||
|
||||
|
@ -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() {}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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`
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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() { }
|
||||
|
@ -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() { }
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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,)>`
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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 ()
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -17,16 +17,16 @@ pub fn main() {
|
||||
let _x: usize = match Some(1) {
|
||||
Ok(u) => u,
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `core::option::Option<_>`
|
||||
//~| found `core::result::Result<_, _>`
|
||||
//~| expected enum `core::option::Option`
|
||||
//~| found enum `core::result::Result`
|
||||
//~| expected `std::option::Option<_>`
|
||||
//~| found `std::result::Result<_, _>`
|
||||
//~| expected enum `std::option::Option`
|
||||
//~| found enum `std::result::Result`
|
||||
|
||||
Err(e) => panic!(e)
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `core::option::Option<_>`
|
||||
//~| found `core::result::Result<_, _>`
|
||||
//~| expected enum `core::option::Option`
|
||||
//~| found enum `core::result::Result`
|
||||
//~| expected `std::option::Option<_>`
|
||||
//~| found `std::result::Result<_, _>`
|
||||
//~| expected enum `std::option::Option`
|
||||
//~| found enum `std::result::Result`
|
||||
};
|
||||
}
|
||||
|
@ -13,5 +13,5 @@
|
||||
|
||||
fn main() {
|
||||
() <- 0;
|
||||
//~^ ERROR: the trait `core::ops::Placer<_>` is not implemented
|
||||
//~^ ERROR: the trait `std::ops::Placer<_>` is not implemented
|
||||
}
|
||||
|
@ -10,5 +10,5 @@
|
||||
|
||||
fn main() {
|
||||
let _x = "test" as &::std::any::Any;
|
||||
//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `str`
|
||||
//~^ ERROR the trait `std::marker::Sized` is not implemented for the type `str`
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ fn dft_iter<'a, T>(arg1: Chunks<'a,T>, arg2: ChunksMut<'a,T>)
|
||||
{
|
||||
for
|
||||
&mut something
|
||||
//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[T]`
|
||||
//~^ ERROR the trait `std::marker::Sized` is not implemented for the type `[T]`
|
||||
in arg2
|
||||
{
|
||||
}
|
||||
|
@ -17,8 +17,8 @@ fn main() {
|
||||
let x = Some(&[name]);
|
||||
let msg = foo(x);
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `core::option::Option<&[&str]>`
|
||||
//~| found `core::option::Option<&[&str; 1]>`
|
||||
//~| expected `std::option::Option<&[&str]>`
|
||||
//~| found `std::option::Option<&[&str; 1]>`
|
||||
//~| expected slice
|
||||
//~| found array of 1 elements
|
||||
assert_eq!(msg, 3);
|
||||
|
@ -14,7 +14,7 @@ fn main() {
|
||||
let Slice { data: data, len: len } = "foo";
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `&str`
|
||||
//~| found `core::raw::Slice<_>`
|
||||
//~| found `std::raw::Slice<_>`
|
||||
//~| expected &-ptr
|
||||
//~| found struct `core::raw::Slice`
|
||||
//~| found struct `std::raw::Slice`
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ fn main() {
|
||||
Slice { data: data, len: len } => (),
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `()`
|
||||
//~| found `core::raw::Slice<_>`
|
||||
//~| found `std::raw::Slice<_>`
|
||||
//~| expected ()
|
||||
//~| found struct `core::raw::Slice`
|
||||
//~| found struct `std::raw::Slice`
|
||||
_ => unreachable!()
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ mod Y {
|
||||
}
|
||||
|
||||
static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
|
||||
//~^ ERROR the trait `core::marker::Sync` is not implemented for the type
|
||||
//~^ ERROR the trait `std::marker::Sync` is not implemented for the type
|
||||
//~| ERROR cannot refer to other statics by value, use the address-of operator or a constant instead
|
||||
//~| ERROR E0015
|
||||
|
||||
|
@ -15,11 +15,11 @@ fn main() {
|
||||
|
||||
// FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
|
||||
let _bar = Box::new(1_usize) as std::fmt::Debug;
|
||||
//~^ ERROR cast to unsized type: `Box<usize>` as `core::fmt::Debug`
|
||||
//~^ ERROR cast to unsized type: `Box<usize>` as `std::fmt::Debug`
|
||||
//~^^ HELP try casting to a `Box` instead
|
||||
|
||||
let _baz = 1_usize as std::fmt::Debug;
|
||||
//~^ ERROR cast to unsized type: `usize` as `core::fmt::Debug`
|
||||
//~^ ERROR cast to unsized type: `usize` as `std::fmt::Debug`
|
||||
//~^^ HELP consider using a box or reference as appropriate
|
||||
|
||||
let _quux = [1_usize, 2] as [usize];
|
||||
|
@ -14,5 +14,5 @@
|
||||
fn main() {
|
||||
// FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
|
||||
(|| Box::new(*(&[0][..])))();
|
||||
//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[_]`
|
||||
//~^ ERROR the trait `std::marker::Sized` is not implemented for the type `[_]`
|
||||
}
|
||||
|
@ -17,6 +17,6 @@ impl !Sync for Foo {}
|
||||
|
||||
static FOO: usize = 3;
|
||||
static BAR: Foo = Foo;
|
||||
//~^ ERROR: the trait `core::marker::Sync` is not implemented
|
||||
//~^ ERROR: the trait `std::marker::Sync` is not implemented
|
||||
|
||||
fn main() {}
|
||||
|
@ -12,7 +12,7 @@ pub trait AbstractRenderer {}
|
||||
|
||||
fn _create_render(_: &()) ->
|
||||
AbstractRenderer
|
||||
//~^ ERROR: the trait `core::marker::Sized` is not implemented
|
||||
//~^ ERROR: the trait `std::marker::Sized` is not implemented
|
||||
{
|
||||
match 0 {
|
||||
_ => unimplemented!()
|
||||
|
@ -11,7 +11,7 @@
|
||||
type FuncType<'f> = Fn(&isize) -> isize + 'f;
|
||||
|
||||
fn ho_func(f: Option<FuncType>) {
|
||||
//~^ ERROR: the trait `core::marker::Sized` is not implemented for the type
|
||||
//~^ ERROR: the trait `std::marker::Sized` is not implemented for the type
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -15,7 +15,7 @@ trait From<Src> {
|
||||
}
|
||||
|
||||
trait To {
|
||||
fn to<Dst>( //~ ERROR the trait `core::marker::Sized` is not implemented
|
||||
fn to<Dst>( //~ ERROR the trait `std::marker::Sized` is not implemented
|
||||
self
|
||||
) -> <Dst as From<Self>>::Result where Dst: From<Self> {
|
||||
From::from(self)
|
||||
|
@ -13,5 +13,5 @@ struct X { x: i32 }
|
||||
fn main() {
|
||||
let mut b: Vec<X> = vec![];
|
||||
b.sort();
|
||||
//~^ ERROR the trait `core::cmp::Ord` is not implemented for the type `X`
|
||||
//~^ ERROR the trait `std::cmp::Ord` is not implemented for the type `X`
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
fn changer<'a>(mut things: Box<Iterator<Item=&'a mut u8>>) {
|
||||
for item in *things { *item = 0 }
|
||||
//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `core::iter::Iterator
|
||||
//~^ ERROR the trait `std::marker::Sized` is not implemented for the type `std::iter::Iterator
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -16,6 +16,6 @@ impl Bar {
|
||||
|
||||
#[derive(Hash)]
|
||||
struct Foo(Bar);
|
||||
//~^ error: the trait `core::hash::Hash` is not implemented for the type `Bar`
|
||||
//~^ error: the trait `std::hash::Hash` is not implemented for the type `Bar`
|
||||
|
||||
fn main() {}
|
||||
|
@ -14,8 +14,8 @@ impl Iterator for S {
|
||||
type Item = i32;
|
||||
fn next(&mut self) -> Result<i32, i32> { Ok(7) }
|
||||
//~^ ERROR method `next` has an incompatible type for trait
|
||||
//~| expected enum `core::option::Option`
|
||||
//~| found enum `core::result::Result` [E0053]
|
||||
//~| expected enum `std::option::Option`
|
||||
//~| found enum `std::result::Result` [E0053]
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -17,5 +17,5 @@ fn foo<T: Send>() {}
|
||||
|
||||
fn main() {
|
||||
foo::<HashMap<Rc<()>, Rc<()>>>();
|
||||
//~^ ERROR: the trait `core::marker::Send` is not implemented for the type `alloc::rc::Rc<()>`
|
||||
//~^ ERROR: the trait `std::marker::Send` is not implemented for the type `std::rc::Rc<()>`
|
||||
}
|
||||
|
@ -16,5 +16,5 @@ fn main() {
|
||||
let x = &10 as
|
||||
&Add;
|
||||
//~^ ERROR the type parameter `RHS` must be explicitly specified in an object type because its default value `Self` references the type `Self`
|
||||
//~| ERROR the value of the associated type `Output` (from the trait `core::ops::Add`) must be specified
|
||||
//~| ERROR the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ fn main() {
|
||||
let ptr: *mut () = 0 as *mut _;
|
||||
let _: &mut Fn() = unsafe {
|
||||
&mut *(ptr as *mut Fn())
|
||||
//~^ ERROR the trait `core::ops::Fn<()>` is not implemented
|
||||
//~| ERROR the trait `core::ops::FnOnce<()>` is not implemented
|
||||
//~^ ERROR the trait `std::ops::Fn<()>` is not implemented
|
||||
//~| ERROR the trait `std::ops::FnOnce<()>` is not implemented
|
||||
};
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ use std::ops::{Add, Sub};
|
||||
|
||||
type Test = Add +
|
||||
//~^ ERROR the type parameter `RHS` must be explicitly specified in an object type because its default value `Self` references the type `Self`
|
||||
//~^^ ERROR the value of the associated type `Output` (from the trait `core::ops::Add`) must be specified [E0191]
|
||||
//~^^ ERROR the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified [E0191]
|
||||
Sub;
|
||||
//~^ ERROR only the builtin traits can be used as closure or object bounds
|
||||
|
||||
|
@ -19,5 +19,5 @@ fn main()
|
||||
println!("{:?}",(vfnfer[0] as Fn)(3));
|
||||
//~^ ERROR the precise format of `Fn`-family traits'
|
||||
//~| ERROR wrong number of type arguments: expected 1, found 0
|
||||
//~| ERROR the value of the associated type `Output` (from the trait `core::ops::FnOnce`)
|
||||
//~| ERROR the value of the associated type `Output` (from the trait `std::ops::FnOnce`)
|
||||
}
|
||||
|
@ -11,9 +11,9 @@
|
||||
fn main() {
|
||||
static foo: Fn() -> u32 = || -> u32 {
|
||||
//~^ ERROR: mismatched types:
|
||||
//~| expected `core::ops::Fn() -> u32 + 'static`,
|
||||
//~| expected `std::ops::Fn() -> u32 + 'static`,
|
||||
//~| found closure
|
||||
//~| (expected trait core::ops::Fn,
|
||||
//~| (expected trait std::ops::Fn,
|
||||
//~| found closure)
|
||||
0
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ struct E {
|
||||
|
||||
impl A for E {
|
||||
fn b<F: Sync, G>(&self, _x: F) -> F { panic!() }
|
||||
//~^ ERROR `F : core::marker::Sync` appears on the impl method
|
||||
//~^ ERROR `F : std::marker::Sync` appears on the impl method
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -10,13 +10,13 @@
|
||||
|
||||
fn main() {
|
||||
let _ = Iterator::next(&mut ());
|
||||
//~^ ERROR the trait `core::iter::Iterator` is not implemented
|
||||
//~^ ERROR the trait `std::iter::Iterator` is not implemented
|
||||
|
||||
for _ in false {}
|
||||
//~^ ERROR the trait `core::iter::Iterator` is not implemented
|
||||
//~^ ERROR the trait `std::iter::Iterator` is not implemented
|
||||
|
||||
let _ = Iterator::next(&mut ());
|
||||
//~^ ERROR the trait `core::iter::Iterator` is not implemented
|
||||
//~^ ERROR the trait `std::iter::Iterator` is not implemented
|
||||
|
||||
other()
|
||||
}
|
||||
@ -25,11 +25,11 @@ pub fn other() {
|
||||
// check errors are still reported globally
|
||||
|
||||
let _ = Iterator::next(&mut ());
|
||||
//~^ ERROR the trait `core::iter::Iterator` is not implemented
|
||||
//~^ ERROR the trait `std::iter::Iterator` is not implemented
|
||||
|
||||
let _ = Iterator::next(&mut ());
|
||||
//~^ ERROR the trait `core::iter::Iterator` is not implemented
|
||||
//~^ ERROR the trait `std::iter::Iterator` is not implemented
|
||||
|
||||
for _ in false {}
|
||||
//~^ ERROR the trait `core::iter::Iterator` is not implemented
|
||||
//~^ ERROR the trait `std::iter::Iterator` is not implemented
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ fn main() {
|
||||
match None {
|
||||
Err(_) => ()
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `core::option::Option<_>`
|
||||
//~| found `core::result::Result<_, _>`
|
||||
//~| expected enum `core::option::Option`
|
||||
//~| found enum `core::result::Result`
|
||||
//~| expected `std::option::Option<_>`
|
||||
//~| found `std::result::Result<_, _>`
|
||||
//~| expected enum `std::option::Option`
|
||||
//~| found enum `std::result::Result`
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,6 @@
|
||||
trait I {}
|
||||
type K = I+'static;
|
||||
|
||||
fn foo(_x: K) {} //~ ERROR: the trait `core::marker::Sized` is not implemented
|
||||
fn foo(_x: K) {} //~ ERROR: the trait `std::marker::Sized` is not implemented
|
||||
|
||||
fn main() {}
|
||||
|
@ -15,8 +15,8 @@ struct Struct {
|
||||
}
|
||||
|
||||
fn new_struct(r: A+'static)
|
||||
-> Struct { //~^ ERROR the trait `core::marker::Sized` is not implemented
|
||||
//~^ ERROR the trait `core::marker::Sized` is not implemented
|
||||
-> Struct { //~^ ERROR the trait `std::marker::Sized` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Sized` is not implemented
|
||||
Struct { r: r }
|
||||
}
|
||||
|
||||
|
@ -34,5 +34,5 @@ struct A {
|
||||
|
||||
fn main() {
|
||||
let a = A {v: box B{v: None} as Box<Foo+Send>};
|
||||
//~^ ERROR the trait `core::marker::Send` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Send` is not implemented
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ fn foo(x: Whatever) {
|
||||
Some(field) =>
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `Whatever`
|
||||
//~| found `core::option::Option<_>`
|
||||
//~| found `std::option::Option<_>`
|
||||
//~| expected enum `Whatever`
|
||||
//~| found enum `core::option::Option`
|
||||
//~| found enum `std::option::Option`
|
||||
field.access(), //~ ERROR the type of this value must be known in this context
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,6 @@ use std::cell::RefCell;
|
||||
// Regression test for issue 7364
|
||||
static boxed: Box<RefCell<isize>> = box RefCell::new(0);
|
||||
//~^ ERROR allocations are not allowed in statics
|
||||
//~| ERROR the trait `core::marker::Sync` is not implemented for the type
|
||||
//~| ERROR the trait `std::marker::Sync` is not implemented for the type
|
||||
|
||||
fn main() { }
|
||||
|
@ -26,15 +26,15 @@ fn main() {
|
||||
match &Some(42) {
|
||||
Some(x) => (),
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `&core::option::Option<_>`
|
||||
//~| found `core::option::Option<_>`
|
||||
//~| expected `&std::option::Option<_>`
|
||||
//~| found `std::option::Option<_>`
|
||||
//~| expected &-ptr
|
||||
//~| found enum `core::option::Option`
|
||||
//~| found enum `std::option::Option`
|
||||
None => ()
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `&core::option::Option<_>`
|
||||
//~| found `core::option::Option<_>`
|
||||
//~| expected `&std::option::Option<_>`
|
||||
//~| found `std::option::Option<_>`
|
||||
//~| expected &-ptr
|
||||
//~| found enum `core::option::Option`
|
||||
//~| found enum `std::option::Option`
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern:reached the recursion limit while instantiating `generic::<core::option::Option<
|
||||
// error-pattern:reached the recursion limit while instantiating `generic::<std::option::Option<
|
||||
|
||||
// Verify the compiler fails with an error on infinite function
|
||||
// recursions.
|
||||
|
@ -34,14 +34,14 @@ fn test<'a,T,U:Copy>(_: &'a isize) {
|
||||
assert_copy::<&'a [isize]>();
|
||||
|
||||
// ...unless they are mutable
|
||||
assert_copy::<&'static mut isize>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<&'a mut isize>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<&'static mut isize>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
assert_copy::<&'a mut isize>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
|
||||
// boxes are not ok
|
||||
assert_copy::<Box<isize>>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<String>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<Vec<isize> >(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<Box<&'a mut isize>>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<Box<isize>>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
assert_copy::<String>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
assert_copy::<Vec<isize> >(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
assert_copy::<Box<&'a mut isize>>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
|
||||
// borrowed object types are generally ok
|
||||
assert_copy::<&'a Dummy>();
|
||||
@ -49,11 +49,11 @@ fn test<'a,T,U:Copy>(_: &'a isize) {
|
||||
assert_copy::<&'static (Dummy+Copy)>();
|
||||
|
||||
// owned object types are not ok
|
||||
assert_copy::<Box<Dummy>>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<Box<Dummy+Copy>>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<Box<Dummy>>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
assert_copy::<Box<Dummy+Copy>>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
|
||||
// mutable object types are not ok
|
||||
assert_copy::<&'a mut (Dummy+Copy)>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<&'a mut (Dummy+Copy)>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
|
||||
// unsafe ptrs are ok
|
||||
assert_copy::<*const isize>();
|
||||
@ -71,10 +71,10 @@ fn test<'a,T,U:Copy>(_: &'a isize) {
|
||||
assert_copy::<MyStruct>();
|
||||
|
||||
// structs containing non-POD are not ok
|
||||
assert_copy::<MyNoncopyStruct>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<MyNoncopyStruct>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
|
||||
// ref counted types are not ok
|
||||
assert_copy::<Rc<isize>>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||
assert_copy::<Rc<isize>>(); //~ ERROR `std::marker::Copy` is not implemented
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
|
@ -21,5 +21,5 @@ fn take_param<T:Foo>(foo: &T) { }
|
||||
fn main() {
|
||||
let x: Box<_> = box 3;
|
||||
take_param(&x);
|
||||
//~^ ERROR the trait `core::marker::Copy` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Copy` is not implemented
|
||||
}
|
||||
|
@ -26,13 +26,13 @@ impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
|
||||
fn f<T>(val: T) {
|
||||
let t: S<T> = S(marker::PhantomData);
|
||||
let a = &t as &Gettable<T>;
|
||||
//~^ ERROR the trait `core::marker::Send` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Send` is not implemented
|
||||
}
|
||||
|
||||
fn g<T>(val: T) {
|
||||
let t: S<T> = S(marker::PhantomData);
|
||||
let a: &Gettable<T> = &t;
|
||||
//~^ ERROR the trait `core::marker::Send` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Send` is not implemented
|
||||
}
|
||||
|
||||
fn foo<'a>() {
|
||||
@ -44,7 +44,7 @@ fn foo<'a>() {
|
||||
fn foo2<'a>() {
|
||||
let t: Box<S<String>> = box S(marker::PhantomData);
|
||||
let a = t as Box<Gettable<String>>;
|
||||
//~^ ERROR the trait `core::marker::Copy` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Copy` is not implemented
|
||||
}
|
||||
|
||||
fn foo3<'a>() {
|
||||
@ -52,7 +52,7 @@ fn foo3<'a>() {
|
||||
|
||||
let t: Box<S<Foo>> = box S(marker::PhantomData);
|
||||
let a: Box<Gettable<Foo>> = t;
|
||||
//~^ ERROR the trait `core::marker::Copy` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Copy` is not implemented
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
@ -18,5 +18,5 @@ fn bar<F:FnOnce() + Send>(_: F) { }
|
||||
fn main() {
|
||||
let x = Rc::new(3);
|
||||
bar(move|| foo(x));
|
||||
//~^ ERROR `core::marker::Send` is not implemented
|
||||
//~^ ERROR `std::marker::Send` is not implemented
|
||||
}
|
||||
|
@ -20,11 +20,11 @@ trait Message : Send { }
|
||||
|
||||
fn object_ref_with_static_bound_not_ok() {
|
||||
assert_send::<&'static (Dummy+'static)>();
|
||||
//~^ ERROR the trait `core::marker::Sync` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Sync` is not implemented
|
||||
}
|
||||
|
||||
fn box_object_with_no_bound_not_ok<'a>() {
|
||||
assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::marker::Send` is not implemented
|
||||
assert_send::<Box<Dummy>>(); //~ ERROR the trait `std::marker::Send` is not implemented
|
||||
}
|
||||
|
||||
fn object_with_send_bound_ok() {
|
||||
|
@ -18,7 +18,7 @@ trait Dummy { }
|
||||
// careful with object types, who knows what they close over...
|
||||
fn test51<'a>() {
|
||||
assert_send::<&'a Dummy>();
|
||||
//~^ ERROR the trait `core::marker::Sync` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Sync` is not implemented
|
||||
}
|
||||
fn test52<'a>() {
|
||||
assert_send::<&'a (Dummy+Sync)>();
|
||||
@ -37,7 +37,7 @@ fn test61() {
|
||||
// them not ok
|
||||
fn test_71<'a>() {
|
||||
assert_send::<Box<Dummy+'a>>();
|
||||
//~^ ERROR the trait `core::marker::Send` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Send` is not implemented
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
@ -14,11 +14,11 @@ fn assert_send<T:Send>() { }
|
||||
trait Dummy { }
|
||||
|
||||
fn test50() {
|
||||
assert_send::<&'static Dummy>(); //~ ERROR the trait `core::marker::Sync` is not implemented
|
||||
assert_send::<&'static Dummy>(); //~ ERROR the trait `std::marker::Sync` is not implemented
|
||||
}
|
||||
|
||||
fn test53() {
|
||||
assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::marker::Send` is not implemented
|
||||
assert_send::<Box<Dummy>>(); //~ ERROR the trait `std::marker::Send` is not implemented
|
||||
}
|
||||
|
||||
// ...unless they are properly bounded
|
||||
|
@ -19,7 +19,7 @@ fn test32() { assert_send::<Vec<isize> >(); }
|
||||
|
||||
// but not if they own a bad thing
|
||||
fn test40() {
|
||||
assert_send::<Box<*mut u8>>(); //~ ERROR `core::marker::Send` is not implemented
|
||||
assert_send::<Box<*mut u8>>(); //~ ERROR `std::marker::Send` is not implemented
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
@ -13,6 +13,6 @@ struct Foo;
|
||||
fn main() {
|
||||
let a: Result<(), Foo> = Ok(());
|
||||
a.unwrap();
|
||||
//~^ ERROR no method named `unwrap` found for type `core::result::Result<(), Foo>`
|
||||
//~| NOTE the following trait bounds were not satisfied: `Foo : core::fmt::Debug`
|
||||
//~^ ERROR no method named `unwrap` found for type `std::result::Result<(), Foo>`
|
||||
//~| NOTE the following trait bounds were not satisfied: `Foo : std::fmt::Debug`
|
||||
}
|
||||
|
@ -8,6 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern:cannot apply unary operator `-` to type `collections::string::String`
|
||||
// error-pattern:cannot apply unary operator `-` to type `std::string::String`
|
||||
|
||||
fn main() { -"foo".to_string(); }
|
||||
|
@ -15,5 +15,5 @@ fn f<T: Sync>(_: T) {}
|
||||
fn main() {
|
||||
let x = RefCell::new(0);
|
||||
f(x);
|
||||
//~^ ERROR `core::marker::Sync` is not implemented
|
||||
//~^ ERROR `std::marker::Sync` is not implemented
|
||||
}
|
||||
|
@ -24,5 +24,5 @@ fn bar<T: Sync>(_: T) {}
|
||||
|
||||
fn main() {
|
||||
let x = Foo::A(NoSync);
|
||||
bar(&x); //~ ERROR the trait `core::marker::Sync` is not implemented
|
||||
bar(&x); //~ ERROR the trait `std::marker::Sync` is not implemented
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ fn main() {
|
||||
//~^^ HELP following traits define an item `method`, perhaps you need to implement one of them
|
||||
//~^^^ HELP `foo::Bar`
|
||||
//~^^^^ HELP `no_method_suggested_traits::foo::PubPub`
|
||||
//~^^^^^ HELP `no_method_suggested_traits::reexport::Reexported`
|
||||
//~^^^^^ HELP `no_method_suggested_traits::Reexported`
|
||||
//~^^^^^^ HELP `no_method_suggested_traits::bar::PubPriv`
|
||||
//~^^^^^^^ HELP `no_method_suggested_traits::qux::PrivPub`
|
||||
//~^^^^^^^^ HELP `no_method_suggested_traits::quz::PrivPriv`
|
||||
@ -74,7 +74,7 @@ fn main() {
|
||||
//~^^ HELP following traits define an item `method`, perhaps you need to implement one of them
|
||||
//~^^^ HELP `foo::Bar`
|
||||
//~^^^^ HELP `no_method_suggested_traits::foo::PubPub`
|
||||
//~^^^^^ HELP `no_method_suggested_traits::reexport::Reexported`
|
||||
//~^^^^^ HELP `no_method_suggested_traits::Reexported`
|
||||
//~^^^^^^ HELP `no_method_suggested_traits::bar::PubPriv`
|
||||
//~^^^^^^^ HELP `no_method_suggested_traits::qux::PrivPub`
|
||||
//~^^^^^^^^ HELP `no_method_suggested_traits::quz::PrivPriv`
|
||||
|
@ -33,7 +33,7 @@ fn main() {
|
||||
let x = foo(Port(Rc::new(())));
|
||||
|
||||
thread::spawn(move|| {
|
||||
//~^ ERROR `core::marker::Send` is not implemented
|
||||
//~^ ERROR `std::marker::Send` is not implemented
|
||||
let y = x;
|
||||
println!("{:?}", y);
|
||||
});
|
||||
|
@ -24,5 +24,5 @@ fn bar<T: Send>(_: T) {}
|
||||
fn main() {
|
||||
let x = Foo::A(NoSend);
|
||||
bar(x);
|
||||
//~^ ERROR `core::marker::Send` is not implemented
|
||||
//~^ ERROR `std::marker::Send` is not implemented
|
||||
}
|
||||
|
@ -15,5 +15,5 @@ fn bar<T: Send>(_: T) {}
|
||||
fn main() {
|
||||
let x = Rc::new(5);
|
||||
bar(x);
|
||||
//~^ ERROR `core::marker::Send` is not implemented
|
||||
//~^ ERROR `std::marker::Send` is not implemented
|
||||
}
|
||||
|
@ -23,5 +23,5 @@ fn bar<T: Send>(_: T) {}
|
||||
fn main() {
|
||||
let x = Foo { a: 5 };
|
||||
bar(x);
|
||||
//~^ ERROR the trait `core::marker::Send` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Send` is not implemented
|
||||
}
|
||||
|
@ -22,5 +22,5 @@ fn bar<T: Sync>(_: T) {}
|
||||
fn main() {
|
||||
let x = Foo::A(NoSync);
|
||||
bar(x);
|
||||
//~^ ERROR the trait `core::marker::Sync` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Sync` is not implemented
|
||||
}
|
||||
|
@ -20,5 +20,5 @@ fn bar<T: Sync>(_: T) {}
|
||||
fn main() {
|
||||
let x = Foo { a: 5 };
|
||||
bar(x);
|
||||
//~^ ERROR the trait `core::marker::Sync` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Sync` is not implemented
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ fn main() {
|
||||
let x: isize = noexporttypelib::foo();
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `isize`
|
||||
//~| found `core::option::Option<isize>`
|
||||
//~| found `std::option::Option<isize>`
|
||||
//~| expected isize
|
||||
//~| found enum `core::option::Option`
|
||||
//~| found enum `std::option::Option`
|
||||
}
|
||||
|
@ -16,14 +16,14 @@ fn test<T: Sync>() {}
|
||||
|
||||
fn main() {
|
||||
test::<Cell<i32>>();
|
||||
//~^ ERROR marker::Sync` is not implemented for the type `core::cell::Cell<i32>`
|
||||
//~^ ERROR marker::Sync` is not implemented for the type `std::cell::Cell<i32>`
|
||||
test::<RefCell<i32>>();
|
||||
//~^ ERROR marker::Sync` is not implemented for the type `core::cell::RefCell<i32>`
|
||||
//~^ ERROR marker::Sync` is not implemented for the type `std::cell::RefCell<i32>`
|
||||
|
||||
test::<Rc<i32>>();
|
||||
//~^ ERROR marker::Sync` is not implemented for the type `alloc::rc::Rc<i32>`
|
||||
//~^ ERROR marker::Sync` is not implemented for the type `std::rc::Rc<i32>`
|
||||
test::<Weak<i32>>();
|
||||
//~^ ERROR marker::Sync` is not implemented for the type `alloc::rc::Weak<i32>`
|
||||
//~^ ERROR marker::Sync` is not implemented for the type `std::rc::Weak<i32>`
|
||||
|
||||
test::<Receiver<i32>>();
|
||||
//~^ ERROR marker::Sync` is not implemented for the type `std::sync::mpsc::Receiver<i32>`
|
||||
|
@ -33,9 +33,9 @@ pub fn main() {
|
||||
let x = vec!(1u8, 2, 3, 4);
|
||||
let y: Option<Vec<u8>> = collect(x.iter()); // this should give approximately the same error for x.iter().collect()
|
||||
//~^ ERROR
|
||||
//~^^ NOTE a collection of type `core::option::Option<collections::vec::Vec<u8>>` cannot be built from an iterator over elements of type `&u8`
|
||||
//~^^ NOTE a collection of type `std::option::Option<std::vec::Vec<u8>>` cannot be built from an iterator over elements of type `&u8`
|
||||
//~^^^ NOTE required by `collect`
|
||||
let x: String = foobar(); //~ ERROR
|
||||
//~^ NOTE test error `collections::string::String` with `u8` `_` `u32`
|
||||
//~^ NOTE test error `std::string::String` with `u8` `_` `u32`
|
||||
//~^^ NOTE required by `foobar`
|
||||
}
|
||||
|
@ -31,11 +31,11 @@ struct Nested<T>(T);
|
||||
fn is_zen<T: Zen>(_: T) {}
|
||||
|
||||
fn not_sync<T>(x: Guard<T>) {
|
||||
is_zen(x) //~ error: the trait `core::marker::Sync` is not implemented for the type `T`
|
||||
is_zen(x) //~ error: the trait `std::marker::Sync` is not implemented for the type `T`
|
||||
}
|
||||
|
||||
fn nested_not_sync<T>(x: Nested<Guard<T>>) {
|
||||
is_zen(x) //~ error: the trait `core::marker::Sync` is not implemented for the type `T`
|
||||
is_zen(x) //~ error: the trait `std::marker::Sync` is not implemented for the type `T`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -22,6 +22,6 @@ pub fn main() {
|
||||
// Unsized type.
|
||||
let arr: &[_] = &[1, 2, 3];
|
||||
let range = *arr..;
|
||||
//~^ 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
|
||||
}
|
||||
|
@ -25,5 +25,5 @@ impl Drop for Foo {
|
||||
fn main() {
|
||||
let a = Foo { x: 3 };
|
||||
let _ = [ a; 5 ];
|
||||
//~^ ERROR the trait `core::marker::Copy` is not implemented for the type `Foo`
|
||||
//~^ ERROR the trait `std::marker::Copy` is not implemented for the type `Foo`
|
||||
}
|
||||
|
@ -20,10 +20,10 @@ struct Baz { q: Option<Foo> }
|
||||
|
||||
struct Foo { q: Option<Baz> }
|
||||
//~^ ERROR recursive type `Foo` has infinite size
|
||||
//~| type `Foo` is embedded within `core::option::Option<Foo>`...
|
||||
//~| ...which in turn is embedded within `core::option::Option<Foo>`...
|
||||
//~| type `Foo` is embedded within `std::option::Option<Foo>`...
|
||||
//~| ...which in turn is embedded within `std::option::Option<Foo>`...
|
||||
//~| ...which in turn is embedded within `Baz`...
|
||||
//~| ...which in turn is embedded within `core::option::Option<Baz>`...
|
||||
//~| ...which in turn is embedded within `std::option::Option<Baz>`...
|
||||
//~| ...which in turn is embedded within `Foo`, completing the cycle.
|
||||
|
||||
impl Foo { fn bar(&self) {} }
|
||||
|
@ -10,5 +10,5 @@
|
||||
|
||||
pub fn main() {
|
||||
let s: &str = "hello";
|
||||
let c: u8 = s[4]; //~ ERROR the trait `core::ops::Index<_>` is not implemented
|
||||
let c: u8 = s[4]; //~ ERROR the trait `std::ops::Index<_>` is not implemented
|
||||
}
|
||||
|
@ -12,11 +12,11 @@ fn bot<T>() -> T { loop {} }
|
||||
|
||||
fn mutate(s: &mut str) {
|
||||
s[1..2] = bot();
|
||||
//~^ ERROR `core::marker::Sized` is not implemented for the type `str`
|
||||
//~| ERROR `core::marker::Sized` is not implemented for the type `str`
|
||||
//~^ ERROR `std::marker::Sized` is not implemented for the type `str`
|
||||
//~| ERROR `std::marker::Sized` is not implemented for the type `str`
|
||||
s[1usize] = bot();
|
||||
//~^ ERROR `core::ops::Index<usize>` is not implemented for the type `str`
|
||||
//~| ERROR `core::ops::IndexMut<usize>` is not implemented for the type `str`
|
||||
//~^ ERROR `std::ops::Index<usize>` is not implemented for the type `str`
|
||||
//~| ERROR `std::ops::IndexMut<usize>` is not implemented for the type `str`
|
||||
}
|
||||
|
||||
pub fn main() {}
|
||||
|
@ -22,7 +22,7 @@ fn main() {
|
||||
let x : char = last(y);
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected `char`
|
||||
//~| found `core::option::Option<_>`
|
||||
//~| found `std::option::Option<_>`
|
||||
//~| expected char
|
||||
//~| found enum `core::option::Option`
|
||||
//~| found enum `std::option::Option`
|
||||
}
|
||||
|
@ -16,5 +16,5 @@ fn test_send<S: Send>() {}
|
||||
|
||||
pub fn main() {
|
||||
test_send::<rand::ThreadRng>();
|
||||
//~^ ERROR `core::marker::Send` is not implemented
|
||||
//~^ ERROR `std::marker::Send` is not implemented
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ trait Foo {
|
||||
impl Foo for isize {
|
||||
// invalid bound for T, was defined as Eq in trait
|
||||
fn test_error1_fn<T: Ord>(&self) {}
|
||||
//~^ ERROR the requirement `T : core::cmp::Ord` appears on the impl
|
||||
//~^ ERROR the requirement `T : std::cmp::Ord` appears on the impl
|
||||
|
||||
// invalid bound for T, was defined as Eq + Ord in trait
|
||||
fn test_error2_fn<T: Eq + B>(&self) {}
|
||||
@ -58,7 +58,7 @@ impl Foo for isize {
|
||||
fn test6_fn<T: A>(&self) {}
|
||||
|
||||
fn test_error7_fn<T: A + Eq>(&self) {}
|
||||
//~^ ERROR the requirement `T : core::cmp::Eq` appears on the impl
|
||||
//~^ ERROR the requirement `T : std::cmp::Eq` appears on the impl
|
||||
|
||||
fn test_error8_fn<T: C>(&self) {}
|
||||
//~^ ERROR the requirement `T : C` appears on the impl
|
||||
|
@ -15,7 +15,7 @@ trait Foo {
|
||||
// This should emit the less confusing error, not the more confusing one.
|
||||
|
||||
fn foo(_x: Foo + Send) {
|
||||
//~^ ERROR the trait `core::marker::Sized` is not implemented
|
||||
//~^ ERROR the trait `std::marker::Sized` is not implemented
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user