Make async fn in traits work
This commit is contained in:
parent
ed2a32f22c
commit
5be30f9d79
10 changed files with 46 additions and 41 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue