-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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
Self
is commonly used to avoid having to repeat the same type name over and over again. This makes renaming the type in the future, etc. easier, and DRY code is generally desirable.
Currently, the following produces a link with the literal text self::new
instead of a correct link:
/// Use [`new`] to create a new instance.
///
/// [`new`]: Self::new
pub struct Foo;
impl Foo {
/// Creates a new instance.
pub fn new() -> Self {
unimplemented!()
}
}
Ref #43466
sunjay
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.