Now that I made the warning smarter, these tests no longer require modification

This commit is contained in:
Niko Matsakis 2015-06-17 14:11:58 -04:00
parent 18e9007ac2
commit 65a456df43
2 changed files with 4 additions and 2 deletions

View file

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

View file

@ -28,7 +28,6 @@ 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>,
@ -40,5 +39,9 @@ fn load1<'a,'b>(a: &'a MyBox<SomeTrait>,
//~| ERROR mismatched types
}
fn load2<'a>(ss: &MyBox<SomeTrait+'a>) -> MyBox<SomeTrait+'a> {
load0(ss) //~ WARNING E0398
}
fn main() {
}