Skip to content

Commit 65a456d

Browse files
committed
Now that I made the warning smarter, these tests no longer require modification
1 parent 18e9007 commit 65a456d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

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

4242
deref(ss)
4343
//~^ ERROR cannot infer
44-
//~| WARNING E0398
4544
}
4645

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

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

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

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

3433
fn load1<'a,'b>(a: &'a MyBox<SomeTrait>,
@@ -40,5 +39,9 @@ fn load1<'a,'b>(a: &'a MyBox<SomeTrait>,
4039
//~| ERROR mismatched types
4140
}
4241

42+
fn load2<'a>(ss: &MyBox<SomeTrait+'a>) -> MyBox<SomeTrait+'a> {
43+
load0(ss) //~ WARNING E0398
44+
}
45+
4346
fn main() {
4447
}

0 commit comments

Comments
 (0)