1
Fork 0

Make async fn in traits work

This commit is contained in:
Michael Goulet 2022-09-02 15:57:31 +00:00
parent ed2a32f22c
commit 5be30f9d79
10 changed files with 46 additions and 41 deletions

View file

@ -2367,9 +2367,9 @@ impl Async {
}
/// In this case this is an `async` return, the `NodeId` for the generated `impl Trait` item.
pub fn opt_return_id(self) -> Option<NodeId> {
pub fn opt_return_id(self) -> Option<(NodeId, Span)> {
match self {
Async::Yes { return_impl_trait_id, .. } => Some(return_impl_trait_id),
Async::Yes { return_impl_trait_id, span, .. } => Some((return_impl_trait_id, span)),
Async::No => None,
}
}