From 18e9007ac249c542aa3b73b5aa275e52825ca940 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 17 Jun 2015 10:12:18 -0400 Subject: [PATCH] Adjust tests to silence warnings (or record them, as appropriate). --- src/test/compile-fail/issue-24446.rs | 2 +- src/test/compile-fail/object-lifetime-default-elision.rs | 1 + src/test/compile-fail/object-lifetime-default-mybox.rs | 1 + src/test/compile-fail/object-lifetime-default.rs | 4 ++-- src/test/compile-fail/trait-bounds-cant-coerce.rs | 4 ++-- src/test/run-pass/issue-21058.rs | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/test/compile-fail/issue-24446.rs b/src/test/compile-fail/issue-24446.rs index 7ac73a931f11..1fca8eb6ac4f 100644 --- a/src/test/compile-fail/issue-24446.rs +++ b/src/test/compile-fail/issue-24446.rs @@ -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) diff --git a/src/test/compile-fail/object-lifetime-default-elision.rs b/src/test/compile-fail/object-lifetime-default-elision.rs index 75ee0bdc9c7a..371acd24da06 100644 --- a/src/test/compile-fail/object-lifetime-default-elision.rs +++ b/src/test/compile-fail/object-lifetime-default-elision.rs @@ -41,6 +41,7 @@ fn load0<'a>(ss: &'a Box) -> Box { deref(ss) //~^ ERROR cannot infer + //~| WARNING E0398 } fn load1(ss: &SomeTrait) -> &SomeTrait { diff --git a/src/test/compile-fail/object-lifetime-default-mybox.rs b/src/test/compile-fail/object-lifetime-default-mybox.rs index 23ddea4499a7..c8fe197b92c0 100644 --- a/src/test/compile-fail/object-lifetime-default-mybox.rs +++ b/src/test/compile-fail/object-lifetime-default-mybox.rs @@ -28,6 +28,7 @@ fn deref(ss: &T) -> T { fn load0(ss: &MyBox) -> MyBox { deref(ss) //~ ERROR cannot infer + //~^ WARNING E0398 } fn load1<'a,'b>(a: &'a MyBox, diff --git a/src/test/compile-fail/object-lifetime-default.rs b/src/test/compile-fail/object-lifetime-default.rs index b71eadd6d08a..ff4d5c487450 100644 --- a/src/test/compile-fail/object-lifetime-default.rs +++ b/src/test/compile-fail/object-lifetime-default.rs @@ -11,10 +11,10 @@ #![feature(rustc_attrs)] #[rustc_object_lifetime_default] -struct A(T); //~ ERROR None +struct A(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 diff --git a/src/test/compile-fail/trait-bounds-cant-coerce.rs b/src/test/compile-fail/trait-bounds-cant-coerce.rs index 3129dceffbb6..836f08d0e78b 100644 --- a/src/test/compile-fail/trait-bounds-cant-coerce.rs +++ b/src/test/compile-fail/trait-bounds-cant-coerce.rs @@ -22,8 +22,8 @@ fn c(x: Box) { fn d(x: Box) { a(x); //~ ERROR mismatched types - //~| expected `Box` - //~| found `Box` + //~| expected `Box` + //~| found `Box` //~| expected bounds `Send` //~| found no bounds } diff --git a/src/test/run-pass/issue-21058.rs b/src/test/run-pass/issue-21058.rs index 9e8bfc884c98..5fe3434e499e 100644 --- a/src/test/run-pass/issue-21058.rs +++ b/src/test/run-pass/issue-21058.rs @@ -26,5 +26,5 @@ fn main() { std::intrinsics::type_name::(), // DST std::intrinsics::type_name::() - )}, ("[u8]", "str", "core::marker::Copy", "NT", "DST")); + )}, ("[u8]", "str", "core::marker::Copy + 'static", "NT", "DST")); }