]> git.lizzy.rs Git - rust.git/commitdiff
adjust test to be check-pass
authorNiko Matsakis <niko@alum.mit.edu>
Mon, 19 Aug 2019 17:53:06 +0000 (13:53 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Mon, 19 Aug 2019 17:53:06 +0000 (13:53 -0400)
src/test/ui/async-await/issues/issue-62517-2.rs
src/test/ui/async-await/issues/issue-62517-2.stderr [deleted file]

index 72dae58e51641d6521569ea1a83ef1c09abe6224..17fac408151eaeb359771c8c9e8c55b957dd2517 100644 (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() { }
diff --git a/src/test/ui/async-await/issues/issue-62517-2.stderr b/src/test/ui/async-await/issues/issue-62517-2.stderr
deleted file mode 100644 (file)
index 4f9b304..0000000
+++ /dev/null
@@ -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`.