Skip to content

Remove is_spotlight field from Trait - #80914

Merged
bors merged 5 commits into
rust-lang:masterfrom
GuillaumeGomez:remove-is_spotlight
Feb 24, 2021
Merged

Remove is_spotlight field from Trait#80914
bors merged 5 commits into
rust-lang:masterfrom
GuillaumeGomez:remove-is_spotlight

Conversation

@GuillaumeGomez

@GuillaumeGomezGuillaumeGomez commented Jan 11, 2021

Copy link
Copy Markdown
Member

Small PR, only the last commit is relevant here. The rest is coming from #80883 because I need the TyCtxt stored inside Cache.

The point is to make ItemKind looks as close as possible to the compiler type so that it makes the switch simpler (which is why I make all these "small" PRs).

r? @jyn514

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 11, 2021
Comment threadsrc/librustdoc/clean/utils.rs Outdated
@GuillaumeGomez
GuillaumeGomezforce-pushed the remove-is_spotlight branch 2 times, most recently from 7254d97 to 2ef594dCompareJanuary 11, 2021 21:34
@jyn514

Copy link
Copy Markdown
Member

@camelid would you like to review?

@camelidcamelid added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 12, 2021
@camelid

Copy link
Copy Markdown
Member

@jyn514 Thanks for giving me the opportunity to review! :)

I'll give it a look, but it's probably still a good idea for you to take a look as well since I'm still learning the intricacies of rustdoc.

@camelidcamelid added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Jan 12, 2021
@camelid

Copy link
Copy Markdown
Member

(Marking as blocked on #80883.)

@camelidcamelid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this field being removed because it's only used in one place and we don't want to pile stuff onto clean::Trait?

Comment threadsrc/librustdoc/clean/inline.rs Outdated
Comment threadsrc/librustdoc/clean/utils.rs Outdated
Comment threadsrc/librustdoc/html/render/mod.rs Outdated
@bors

bors commented Jan 21, 2021

Copy link
Copy Markdown
Collaborator

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

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2021
…n514
Remove CACHE_KEY global
We realized in rust-lang#80914 that the cache handling (through a global) needed to be updated to make it much easier to handle.
r? `@jyn514`
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Rebased! Only the last commit is from this PR, the others still come from #80883.

cc @CraftSpider@ollie27
r? @camelid

@rust-highfiverust-highfive assigned camelid and unassigned jyn514Jan 28, 2021
@rust-log-analyzer

This comment has been minimized.

@CraftSpiderCraftSpider left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. As far as I can tell this should behave the same, just with spotlight calculated at use instead of early. Only question is: How is spotlight_decl called, will this end up duplicating the spotlight lookup? Not too terrible if it does, but want to make sure I understand.

@GuillaumeGomezGuillaumeGomez changed the title Remove is spotlight field from TraitRemove is_spotlight field from TraitJan 28, 2021
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

That's actually a pretty good point. It forces us to run this check every time a function returns a "spotlighted" item. That's not great.

* Improve documentation
* Add a test to ensure that spotlighted traits from dependencies are taken into account as expected
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

r=me with nits fixed and the description updated - I don't think this needs to mention #80883 now that it's been merged.

I updated the description but I'll keep the mention to the other PR. ;)

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

@bors: r=jyn514

@bors

bors commented Feb 23, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 33aaead has been approved by jyn514

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 23, 2021
@bors

bors commented Feb 24, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 33aaead with merge f46c0e49c6121d2ea31376c25c1ac1b7b91d0c91...

@bors

bors commented Feb 24, 2021

Copy link
Copy Markdown
Collaborator

💥 Test timed out

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

Copy link
Copy Markdown
MemberAuthor

@bors: retry

@borsbors 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 24, 2021
@bors

bors commented Feb 24, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 33aaead with merge a8486b6...

@bors

bors commented Feb 24, 2021

Copy link
Copy Markdown
Collaborator

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

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Feb 24, 2021
@bors
bors merged commit a8486b6 into rust-lang:masterFeb 24, 2021
@rustbotrustbot added this to the 1.52.0 milestone Feb 24, 2021
@GuillaumeGomez
GuillaumeGomez deleted the remove-is_spotlight branch February 24, 2021 18:15
camelid added a commit to camelid/rust that referenced this pull request Apr 2, 2021
I didn't make these renames in rust-lang#80965 because I didn't want the PR to
conflict with rust-lang#80914.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 3, 2021
…ht, r=GuillaumeGomez
rustdoc: Rename internal uses of `spotlight`
I didn't make these renames in rust-lang#80965 because I didn't want the PR to
conflict with rust-lang#80914.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant 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.

10 participants

@GuillaumeGomez@jyn514@camelid@bors@rust-log-analyzer@CraftSpider@rust-timer@LingMan@rust-highfive@rustbot