We can print futures with {integer} too
This commit is contained in:
parent
2c94102df5
commit
97668a5589
2 changed files with 2 additions and 2 deletions
|
|
@ -923,7 +923,7 @@ pub trait PrettyPrinter<'tcx>:
|
|||
{
|
||||
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…
Add table
Add a link
Reference in a new issue