Remove BuiltinBound and BuiltinBounds.

This commit is contained in:
Mark-Simulacrum 2016-11-13 19:42:15 -07:00
parent 607af7218b
commit 64e97d9b33
31 changed files with 137 additions and 332 deletions

View file

@ -12,8 +12,8 @@ trait Trait {}
pub fn main() {
let x: Vec<Trait + Sized> = Vec::new();
//~^ ERROR `Trait + Sized: std::marker::Sized` is not satisfied
//~^ ERROR the trait bound `Trait + std::marker::Sized: std::marker::Sized` is not satisfied
//~| ERROR the trait `std::marker::Sized` cannot be made into an object
//~| ERROR `Trait + Sized: std::marker::Sized` is not satisfied
//~| ERROR the trait bound `Trait + std::marker::Sized: std::marker::Sized` is not satisfied
//~| ERROR the trait `std::marker::Sized` cannot be made into an object
}

View file

@ -11,8 +11,8 @@
use std::fmt::Debug;
const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync));
//~^ ERROR `std::fmt::Debug + Sync + 'static: std::marker::Sized` is not satisfied
//~| NOTE the trait `std::marker::Sized` is not implemented for `std::fmt::Debug + Sync + 'static`
//~^ ERROR `std::fmt::Debug + std::marker::Sync + 'static: std::marker::Sized` is not satisfied
//~| NOTE the trait `std::marker::Sized` is not implemented for `std::fmt::Debug + std::marker::Syn
//~| NOTE does not have a constant size known at compile-time
//~| NOTE constant expressions must have a statically known size
@ -23,8 +23,8 @@ const CONST_FOO: str = *"foo";
//~| NOTE constant expressions must have a statically known size
static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync));
//~^ ERROR `std::fmt::Debug + Sync + 'static: std::marker::Sized` is not satisfied
//~| NOTE the trait `std::marker::Sized` is not implemented for `std::fmt::Debug + Sync + 'static`
//~^ ERROR `std::fmt::Debug + std::marker::Sync + 'static: std::marker::Sized` is not satisfied
//~| NOTE the trait `std::marker::Sized` is not implemented for `std::fmt::Debug + std::marker::Syn
//~| NOTE does not have a constant size known at compile-time
//~| NOTE constant expressions must have a statically known size

View file

@ -16,6 +16,6 @@ fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
fn main() {
size_of_copy::<Misc+Copy>();
//~^ ERROR `Misc + Copy: std::marker::Copy` is not satisfied
//~^ ERROR the trait bound `Misc + std::marker::Copy: std::marker::Copy` is not satisfied
//~| ERROR the trait `std::marker::Copy` cannot be made into an object
}

View file

@ -21,10 +21,10 @@ fn c(x: Box<Foo+Sync+Send>) {
}
fn d(x: Box<Foo>) {
a(x); //~ ERROR mismatched types
//~| expected type `Box<Foo + Send + 'static>`
//~| found type `Box<Foo + 'static>`
//~| expected bounds `Send`, found no bounds
a(x); //~ ERROR mismatched types [E0308]
//~| NOTE expected type `Box<Foo + std::marker::Send + 'static>`
//~| NOTE found type `Box<Foo + 'static>`
//~| NOTE expected trait Foo, found a different trait Foo
}
fn main() { }

View file

@ -15,7 +15,7 @@ trait Foo {
// This should emit the less confusing error, not the more confusing one.
fn foo(_x: Foo + Send) {
//~^ ERROR `Foo + Send + 'static: std::marker::Sized` is not satisfied
//~^ ERROR the trait bound `Foo + std::marker::Send + 'static: std::marker::Sized` is not
}
fn main() { }