Skip to content

rustdoc renders renamed imports using the new name #81141

Closed
@camelid

Description

@camelid

rustdoc renders renamed imports (use foo as bar;) using the new, private name
(e.g., bar in use foo as bar;). This is confusing behavior since the new
name is an implementation detail. I think it should be using the original
item's name instead.

As an example, chrono::Date::signed_duration_since returns a Duration, but
the module it's defined in renames Duration to OldDuration. I would expect
rustdoc to still show the item's definition name, but instead it shows the
private OldDuration name.

Metadata

Metadata

Labels

C-bugCategory: This is a bug.T-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