Skip to content

Commit 18e9007

Browse files
committed
Adjust tests to silence warnings (or record them, as appropriate).
1 parent 1e7a6b8 commit 18e9007

6 files changed

+8
-6
lines changed

src/test/compile-fail/issue-24446.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
fn main() {
1212
static foo: Fn() -> u32 = || -> u32 {
1313
//~^ ERROR: mismatched types:
14-
//~| expected `core::ops::Fn() -> u32`,
14+
//~| expected `core::ops::Fn() -> u32 + 'static`,
1515
//~| found closure
1616
//~| (expected trait core::ops::Fn,
1717
//~| found closure)

src/test/compile-fail/object-lifetime-default-elision.rs

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ fn load0<'a>(ss: &'a Box<SomeTrait>) -> Box<SomeTrait> {
4141

4242
deref(ss)
4343
//~^ ERROR cannot infer
44+
//~| WARNING E0398
4445
}
4546

4647
fn load1(ss: &SomeTrait) -> &SomeTrait {

src/test/compile-fail/object-lifetime-default-mybox.rs

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ fn deref<T>(ss: &T) -> T {
2828

2929
fn load0(ss: &MyBox<SomeTrait>) -> MyBox<SomeTrait> {
3030
deref(ss) //~ ERROR cannot infer
31+
//~^ WARNING E0398
3132
}
3233

3334
fn load1<'a,'b>(a: &'a MyBox<SomeTrait>,

src/test/compile-fail/object-lifetime-default.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
#![feature(rustc_attrs)]
1212

1313
#[rustc_object_lifetime_default]
14-
struct A<T>(T); //~ ERROR None
14+
struct A<T>(T); //~ ERROR BaseDefault
1515

1616
#[rustc_object_lifetime_default]
17-
struct B<'a,T>(&'a (), T); //~ ERROR None
17+
struct B<'a,T>(&'a (), T); //~ ERROR BaseDefault
1818

1919
#[rustc_object_lifetime_default]
2020
struct C<'a,T:'a>(&'a T); //~ ERROR 'a

src/test/compile-fail/trait-bounds-cant-coerce.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ fn c(x: Box<Foo+Sync+Send>) {
2222

2323
fn d(x: Box<Foo>) {
2424
a(x); //~ ERROR mismatched types
25-
//~| expected `Box<Foo + Send>`
26-
//~| found `Box<Foo>`
25+
//~| expected `Box<Foo + Send + 'static>`
26+
//~| found `Box<Foo + 'static>`
2727
//~| expected bounds `Send`
2828
//~| found no bounds
2929
}

src/test/run-pass/issue-21058.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ fn main() {
2626
std::intrinsics::type_name::<NT>(),
2727
// DST
2828
std::intrinsics::type_name::<DST>()
29-
)}, ("[u8]", "str", "core::marker::Copy", "NT", "DST"));
29+
)}, ("[u8]", "str", "core::marker::Copy + 'static", "NT", "DST"));
3030
}

0 commit comments

Comments
 (0)