Skip to content

Rustdoc lists empty opaque type for async fn #109931

Closed
@est31

Description

@est31

Since beta 1.69.0 (and also in nightly), the rustdoc output has an empty opaque type listed. Take this code:

fn main() {}
async fn foo() {}

Then save it as main.rs and do:

rustdoc +beta main.rs --crate-type bin --edition=2021 --document-private-items

There will be an empty opaque type listed, which is not clickable like the other things (probably due to being empty):

Screenshot_20230404_114551

If you navigate to the opaque..html file manually, you get this:

Screenshot_20230404_114451

It also reproduces on current nightly as of filing this bug. And also for cargo init --bin followed by adding an async function and then cargo +beta doc. The option to document private items is important.

@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged +T-rustdoc

Metadata

Metadata

Labels

A-async-awaitArea: Async & AwaitA-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions