Skip to content

Commit

Permalink
Now that I made the warning smarter, these tests no longer require mo…
Browse files Browse the repository at this point in the history
…dification
  • Loading branch information
nikomatsakis committed Jul 3, 2015
1 parent 18e9007 commit 65a456d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/test/compile-fail/object-lifetime-default-elision.rs
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion src/test/compile-fail/object-lifetime-default-mybox.rs
Expand Up @@ -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>,
Expand All @@ -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() {
}

0 comments on commit 65a456d

Please sign in to comment.