Skip to content
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 Sized trait display when implemented on type #78181

Merged
merged 2 commits into from
Feb 20, 2021

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Oct 21, 2020

Fixes #24183.

I'm not too happy about the hack I had to add in here, however, it seems like the Sized trait is very special.

cc @jyn514
r? @ollie27

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 21, 2020
@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 22, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 30, 2020

Oops, looks like triagebot got confused. @GuillaumeGomez I think you need to put cc after the r??

r? @ollie27

@rust-highfive rust-highfive assigned ollie27 and unassigned jyn514 Oct 30, 2020
@GuillaumeGomez
Copy link
Member Author

ping

@bors

This comment has been minimized.

src/librustdoc/clean/auto_trait.rs Outdated Show resolved Hide resolved
src/test/rustdoc/empty-section.rs Outdated Show resolved Hide resolved
@JohnCSimon JohnCSimon added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 30, 2020
@GuillaumeGomez GuillaumeGomez force-pushed the sized-trait branch 2 times, most recently from ab48efc to 56a60ea Compare December 4, 2020 12:50
@GuillaumeGomez
Copy link
Member Author

Ok, seems to be ready!

@bors

This comment has been minimized.

@crlf0710 crlf0710 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 15, 2021
@GuillaumeGomez GuillaumeGomez added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 29, 2021
@JohnCSimon
Copy link
Member

triage: merge conflict

@rustbot label: -S-waiting-on-review +S-waiting-on-author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2021
@GuillaumeGomez
Copy link
Member Author

It's still waiting for a review.

@rustbot label: -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 14, 2021
@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 17, 2021
@GuillaumeGomez
Copy link
Member Author

It now only displays in case the Sized trait isn't implemented.

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.

Note this will have major conflicts with #82020, so you may want to wait to work on it more until that's merged.

src/librustdoc/clean/auto_trait.rs Outdated Show resolved Hide resolved
src/librustdoc/core.rs Outdated Show resolved Hide resolved
src/librustdoc/core.rs Show resolved Hide resolved
@bors

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the sized-trait branch 2 times, most recently from 4abb66d to fbc8c70 Compare February 19, 2021 21:09
@GuillaumeGomez
Copy link
Member Author

Updated!

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.

This looks good :) r=me with nit fixed, it took me a second to understand the code the first time.

src/librustdoc/clean/auto_trait.rs Show resolved Hide resolved
@GuillaumeGomez
Copy link
Member Author

it took me a second to understand the code the first time.

Oh sorry, I tried to make the parameter name as explicit as possible but I realize that some comments would have make it much better. I added another one in addition to the one you suggested. :)

@GuillaumeGomez
Copy link
Member Author

@bors: r=jyn514

@bors
Copy link
Contributor

bors commented Feb 19, 2021

📌 Commit 46f24c9 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 19, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 19, 2021
Add Sized trait display when implemented on type

Fixes rust-lang#24183.

I'm not too happy about the hack I had to add in here, however, it seems like the `Sized` trait is **very** special.

cc `@jyn514`
r? `@ollie27`
@bors
Copy link
Contributor

bors commented Feb 20, 2021

⌛ Testing commit 46f24c9 with merge b75baad...

@bors
Copy link
Contributor

bors commented Feb 20, 2021

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 20, 2021
@bors bors merged commit b75baad into rust-lang:master Feb 20, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 20, 2021
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  CACHE_DOMAIN: ci-caches.rust-lang.org
  TOOLSTATE_REPO_ACCESS_TOKEN: ***
##[endgroup]
Cloning into 'rust-toolstate'...
/home/runner/work/rust/rust/src/tools/publish_toolstate.py:121: DeprecationWarning: 'U' mode is deprecated
📣 Toolstate changed by rust-lang/rust#78181!

Tested on commit rust-lang/rust@b75baad5c3fcb85676c4df648962e53c9756e7ba.
Direct link to PR: <https://github.com/rust-lang/rust/pull/78181>

💔 miri on windows: test-fail → build-fail (cc @oli-obk @RalfJung @eddyb).
💔 miri on linux: test-fail → build-fail (cc @oli-obk @RalfJung @eddyb).

  with open(path, 'rU') as f:
Traceback (most recent call last):
  File "/home/runner/work/rust/rust/src/tools/publish_toolstate.py", line 338, in <module>
    response = urllib2.urlopen(urllib2.Request(
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 522, in open
    req = meth(req)
  File "/usr/lib/python3.8/urllib/request.py", line 1281, in do_request_
    raise TypeError(msg)
TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.
##[error]Process completed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

rustdoc: Self: Sized bounds in different crates are pruned