mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 05:04:24 +00:00
adjust test to be check-pass
This commit is contained in:
parent
832199ee76
commit
7ee1af51cc
@ -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() { }
|
||||
|
@ -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`.
|
Loading…
Reference in New Issue
Block a user