Skip to content

rustdoc intra links are incorrect for trait provided methods #49582

Closed
@crumblingstatue

Description

@crumblingstatue
/// Always make sure to implement [`req`], but you don't have to implement [`prov`].
///
/// [`req`]: Foo::req
/// [`prov`]: Foo::prov
pub trait Foo {
	/// Required
	fn req();
	/// Provided
	fn prov() {}
}

req will link to #tymethod.req, which is exists, but prov will also link to #tymethod.prov, which doesn't exist. The correct link is #method.prov.

Ref #43466

Metadata

Metadata

Labels

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