We can print futures with {integer} too
This commit is contained in:
parent
2c94102df5
commit
97668a5589
@ -923,7 +923,7 @@ fn pretty_print_opaque_impl_type(
|
||||
{
|
||||
if let ty::Generator(_, substs, _) = substs.type_at(0).kind() {
|
||||
let return_ty = substs.as_generator().return_ty();
|
||||
if !return_ty.is_ty_infer() {
|
||||
if !return_ty.is_ty_var() {
|
||||
return_ty.into()
|
||||
} else {
|
||||
continue;
|
||||
|
@ -91,7 +91,7 @@ LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
|
||||
| ------------------------------- the found opaque type
|
||||
|
|
||||
= note: expected struct `Pin<Box<(dyn Future<Output = i32> + Send + 'static)>>`
|
||||
found opaque type `impl Future`
|
||||
found opaque type `impl Future<Output = {integer}>`
|
||||
help: you need to pin and box this expression
|
||||
|
|
||||
LL ~ Box::pin(async {
|
||||
|
Loading…
Reference in New Issue
Block a user