Skip to content

Conversation

LeSeulArtichaut
Copy link
Contributor

Reverts #32558 as proposed in this Zulip discussion
r? @jyn514 cc @camelid

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 23, 2021
@rust-log-analyzer

This comment has been minimized.

@camelid

This comment has been minimized.

@camelid camelid added A-trait-system Area: Trait system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 23, 2021
@jyn514
Copy link
Member

jyn514 commented Jan 24, 2021

cc @sanxiyn, @nodakai, @steveklabnik

The reason I think it makes sense to revert is because the change was only made for traits, which makes the documentation look inconsistent - some pages have links to themselves and others don't. I would be okay with a general feature which never adds a link if it goes to the current page, but it would be quite a bit more work and I don't think special-casing traits is the right approach in the meantime.

@LeSeulArtichaut the implementation looks fine, but I'd prefer to hear back from one of the three people I pinged before merging this.

@camelid camelid added the I-needs-decision Issue: In need of a decision. label Jan 25, 2021
@steveklabnik
Copy link
Member

I am fine with whatever the rustdoc team feels is appropriate here.

@bors
Copy link
Collaborator

bors commented Jan 27, 2021

☔ The latest upstream changes (presumably #80987) made this pull request unmergeable. Please resolve the merge conflicts.

@camelid
Copy link
Member

camelid commented Jan 28, 2021

Steve said they're OK with whatever we (T-rustdoc) think. So: @rustbot label: -I-needs-decision

Is an FCP necessary here? I would think not, but wanted to check.

@rustbot rustbot removed the I-needs-decision Issue: In need of a decision. label Jan 28, 2021
@bors

This comment has been minimized.

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs an FCP, no, this is just fixing an inconsistency rather than adding a feature.

use_absolute: bool,
cache: &'a Cache,
) -> impl fmt::Display + 'a {
crate fn print<'a>(&'a self, cache: &'a Cache, use_absolute: bool) -> impl fmt::Display + 'a {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this ever called with use_absolute: true? If not, can you remove the parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used here:

write!(w, "{}", i.inner_impl().print(cx.cache(), use_absolute));

Where AFAICT use_absolute can be true from

let use_absolute = match implementor.inner_impl().for_ {
clean::ResolvedPath { ref path, is_generic: false, .. }
| clean::BorrowedRef {
type_: box clean::ResolvedPath { ref path, is_generic: false, .. },
..
} => implementor_dups[&path.last()].1,
_ => false,
};

@jyn514
Copy link
Member

jyn514 commented Feb 7, 2021

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 7, 2021

📌 Commit 1daddb4 has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 7, 2021
@bors
Copy link
Collaborator

bors commented Feb 8, 2021

⌛ Testing commit 1daddb4 with merge 921ec4b...

@bors
Copy link
Collaborator

bors commented Feb 8, 2021

☀️ Test successful - checks-actions
Approved by: jyn514
Pushing 921ec4b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 8, 2021
@bors bors merged commit 921ec4b into rust-lang:master Feb 8, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 8, 2021
@LeSeulArtichaut LeSeulArtichaut deleted the revert-32558 branch February 8, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trait-system Area: Trait system C-enhancement Category: An issue proposing an enhancement or a PR with one. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants