adjust test to be check-pass

This commit is contained in:
Niko Matsakis 2019-08-19 13:53:06 -04:00
parent 832199ee76
commit 7ee1af51cc
2 changed files with 4 additions and 13 deletions

View File

@ -3,14 +3,16 @@
// explicit lifetime bound.
//
// edition:2018
// check-pass
#![feature(async_await)]
trait Object {}
trait Alpha<Param> {}
trait Alpha<Param: ?Sized> {}
async fn foo<'a>(_: &'a ()) -> impl Alpha<dyn Object> {}
//~^ ERROR not satisfied
impl<T> Alpha<dyn Object> for T { }
fn main() { }

View File

@ -1,11 +0,0 @@
error[E0277]: the trait bound `(): Alpha<(dyn Object + 'static)>` is not satisfied
--> $DIR/issue-62517-2.rs:13:32
|
LL | async fn foo<'a>(_: &'a ()) -> impl Alpha<dyn Object> {}
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Alpha<(dyn Object + 'static)>` is not implemented for `()`
|
= note: the return type of a function must have a statically known size
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.