diff options
author | bors <bors@rust-lang.org> | 2023-01-09 13:34:51 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-01-09 13:34:51 +0000 |
commit | b0214d81e85c5bd82ae470f1291472a9eb8a0068 (patch) | |
tree | 0dff31da57853a4dd2795f1a7a917fb9551369ce /tests/rustdoc-js-std/parser-errors.js | |
parent | ae659125a509967f09665b96d06f6ce6bf1ddd1b (diff) | |
parent | b8f5115b847252c4cbf9b02a83e5c0e788763e1e (diff) | |
download | rust-b0214d81e85c5bd82ae470f1291472a9eb8a0068.tar.gz |
Auto merge of #13843 - Overpeek:master, r=Veykril
fix: generate async delegate methods
Fixes a bug where the generated async method doesn't await the result before returning it.
This is an example of what the output looked like:
```rust
struct Age<T>(T);
impl<T> Age<T> {
pub(crate) async fn age<J, 'a>(&'a mut self, ty: T, arg: J) -> T {
self.0
}
}
struct Person<T> {
age: Age<T>,
}
impl<T> Person<T> {
pub(crate) async fn age<J, 'a>(&'a mut self, ty: T, arg: J) -> T {
self.age.age(ty, arg) // .await is missing
}
}
```
The `.await` is missing, so the return type is `impl Future<Output = T>` instead of `T`
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions