Adjust tests to silence warnings (or record them, as appropriate).

This commit is contained in:
Niko Matsakis 2015-06-17 10:12:18 -04:00
parent 1e7a6b880c
commit 18e9007ac2
6 changed files with 8 additions and 6 deletions

View file

@ -11,7 +11,7 @@
fn main() {
static foo: Fn() -> u32 = || -> u32 {
//~^ ERROR: mismatched types:
//~| expected `core::ops::Fn() -> u32`,
//~| expected `core::ops::Fn() -> u32 + 'static`,
//~| found closure
//~| (expected trait core::ops::Fn,
//~| found closure)

View file

@ -41,6 +41,7 @@ fn load0<'a>(ss: &'a Box<SomeTrait>) -> Box<SomeTrait> {
deref(ss)
//~^ ERROR cannot infer
//~| WARNING E0398
}
fn load1(ss: &SomeTrait) -> &SomeTrait {

View file

@ -28,6 +28,7 @@ fn deref<T>(ss: &T) -> T {
fn load0(ss: &MyBox<SomeTrait>) -> MyBox<SomeTrait> {
deref(ss) //~ ERROR cannot infer
//~^ WARNING E0398
}
fn load1<'a,'b>(a: &'a MyBox<SomeTrait>,

View file

@ -11,10 +11,10 @@
#![feature(rustc_attrs)]
#[rustc_object_lifetime_default]
struct A<T>(T); //~ ERROR None
struct A<T>(T); //~ ERROR BaseDefault
#[rustc_object_lifetime_default]
struct B<'a,T>(&'a (), T); //~ ERROR None
struct B<'a,T>(&'a (), T); //~ ERROR BaseDefault
#[rustc_object_lifetime_default]
struct C<'a,T:'a>(&'a T); //~ ERROR 'a

View file

@ -22,8 +22,8 @@ fn c(x: Box<Foo+Sync+Send>) {
fn d(x: Box<Foo>) {
a(x); //~ ERROR mismatched types
//~| expected `Box<Foo + Send>`
//~| found `Box<Foo>`
//~| expected `Box<Foo + Send + 'static>`
//~| found `Box<Foo + 'static>`
//~| expected bounds `Send`
//~| found no bounds
}

View file

@ -26,5 +26,5 @@ fn main() {
std::intrinsics::type_name::<NT>(),
// DST
std::intrinsics::type_name::<DST>()
)}, ("[u8]", "str", "core::marker::Copy", "NT", "DST"));
)}, ("[u8]", "str", "core::marker::Copy + 'static", "NT", "DST"));
}