-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "self" intra-link support #52368
Add "self" intra-link support #52368
Conversation
src/librustdoc/core.rs
Outdated
@@ -82,7 +82,8 @@ pub struct DocContext<'a, 'tcx: 'a, 'rcx: 'a> { | |||
pub fake_def_ids: RefCell<FxHashMap<CrateNum, DefId>>, | |||
pub all_fake_def_ids: RefCell<FxHashSet<DefId>>, | |||
/// Maps (type_id, trait_id) -> auto trait impl | |||
pub generated_synthetics: RefCell<FxHashSet<(DefId, DefId)>> | |||
pub generated_synthetics: RefCell<FxHashSet<(DefId, DefId)>>, | |||
pub current_item_id: RefCell<Option<Name>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We tried so hard to keep from having to use a current_item
field in the DocContext
, but it looks like this is the easiest way, short of not processing attributes through the Clean
trait.
Could you make this say current_item_name
, since it's not really an ID we're putting here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh true, I changed meanwhile and forgot to update the variable's name.
259119b
to
88f2643
Compare
Updated. |
@bors: r=QuietMisdreavus |
📌 Commit 88f2643 has been approved by |
…re-documented, r=QuietMisdreavus Add "self" intra-link support Fixes #49583. r? @QuietMisdreavus
☀️ Test successful - status-appveyor, status-travis |
Fixes #49583.
r? @QuietMisdreavus