-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
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
lilymara-onesignal, Fireboltofdeath, dank, jangernert, PerfectLaugh and 2 more
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Projects
Status
Done