When run on an async fn with elided lifetimes, rustdoc generates documentation containing the anonymous elided lifetimes in the function's signature. Running rustdoc on the blocking variant of the same function produces a correct signature.
You can reproduce this issue by generating docs for the following code:
#![feature(async_await)]
pub async fn asynchronous(foo: &str, bar: &str) -> String {
format!("{}{}", foo, bar)
}
pub fn blocking(foo: &str, bar: &str) -> String {
format!("{}{}", foo, bar)
}
The asynchronous function's docs show the elided lifetimes, the blocking function's docs don't:
pub async fn asynchronous<'_, '_>(foo: &'_ str, bar: &'_ str) -> String
pub fn blocking(foo: &str, bar: &str) -> String
Meta
rustdoc --version --verbose:
rustdoc 1.38.0-nightly (c43753f91 2019-07-26)
binary: rustdoc
commit-hash: c43753f910aae000f8bcb0a502407ea332afc74b
commit-date: 2019-07-26
host: x86_64-unknown-linux-gnu
release: 1.38.0-nightly
LLVM version: 9.0
When run on an
async fnwith elided lifetimes,rustdocgenerates documentation containing the anonymous elided lifetimes in the function's signature. Runningrustdocon the blocking variant of the same function produces a correct signature.You can reproduce this issue by generating docs for the following code:
The asynchronous function's docs show the elided lifetimes, the blocking function's docs don't:
Meta
rustdoc --version --verbose: