Skip to content

rustdoc: improve attribute span handling in diagnostics #150735

@folkertdev

Description

@folkertdev

In #150721 intra-doc links are rendered for deprecation notes.

Currently the span that is used when reporting an error (e.g. the link cannot be resolved) is a bit too broad. A span containing all doc comments and the deprecated attribute is used as a fallback.

Error reporting would improve slightly if just the span of the deprecation note would be used. That requires that that span is stored, and then used in report_diagnostic.

Metadata

Metadata

Labels

A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions