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

Rollup of 11 pull requests #102448

Closed
wants to merge 30 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

sunfishcode and others added 30 commits August 29, 2022 08:31
`std::os::fd` defines types like `OwnedFd` and `RawFd` and is common
between Unix and non-Unix platforms that share a basic file-descriptor
concept. Rust currently uses this internally to simplify its own code,
but it would be useful for external users in the same way, so make it
public.

This means that `OwnedFd` etc. will all appear in three places, for
example on unix platforms:
 - `std::os::fd::OwnedFd`
 - `std::os::unix::io::OwnedFd`
 - `std::os::unix::prelude::OwnedFd`
Add `#[unstable(feature = "os_fd", issue = "98699")]` to the new
`pub use` declarations.
Fixes a regression caused by 8846c08, where
a header's top margin used to be collapsed, but isn't any more.
These rules were copied from normalize.css 3, and are mostly redundant.

* `optgroup` isn't used in rustdoc at all
* `textarea` is only used for the "copy" button, so it's not visible
* The remaining buttons and inputs mostly have styles set anyway.
* We should never be setting `color` without also setting the
  background to something. Otherwise, you get white-on-gray
  text. That seems to be [the reason] why `normalize.css` changed this.

[the reason]: necolas/normalize.css#502
This line was added in c494a06, because at
the time, the headers had these classes on them. Now, the headers are
children of the `<section>` with the class on it.

This commit also adds a test case, to make sure the srclink font weight does
not regress again.
More cleanup for 8846c08, this time in trait
layouts when things are collapsed.
…r=joshtriplett

Make `std::os::fd` public.

`std::os::fd` defines types like `OwnedFd` and `RawFd` and is common
between Unix and non-Unix platforms that share a basic file-descriptor
concept. Rust currently uses this internally to simplify its own code,
but it would be useful for external users in the same way, so make it
public.

This means that `OwnedFd` etc. will all appear in three places, for
example on unix platforms:
 - `std::os::fd::OwnedFd`
 - `std::os::unix::io::OwnedFd`
 - `std::os::unix::prelude::OwnedFd`

r? ```@joshtriplett```
Code refactoring smart_resolve_report_errors

`smart_resolve_report_errors` https://github.com/rust-lang/rust/blob/4ecfdfac51b159f68fce608792affb34a70e6f73/compiler/rustc_resolve/src/late/diagnostics.rs#L143
is almost 600 lines of code, we should do some code refactoring.
Add a niche to `Duration`, unix `SystemTime`, and non-apple `Instant`

As the nanoseconds fields is always between `0` and `(NANOS_PER_SEC - 1)` inclusive, use the `rustc_layout_scalar_valid_range` attributes to create a niche in the nanosecond field of `Duration` and `Timespec` (which is used to implement unix `SystemTime` and non-apple unix `Instant`; windows `Instant` is implemented with `Duration` and therefore will also benefit). This change has the benefit of making `Option<T>` the same size as `T` for the previously mentioned types. Also shrinks the nanoseconds field of `Timespec` to a `u32` as nanoseconds do not need the extra range of an `i64`, shrinking `Timespec` by 4 bytes on 32-bit platforms.

r? `@joshtriplett`
…issue-94923, r=JohnTitor

Add regression test for issue 94923

Fixes rust-lang#94923
Account for use of index-based lifetime names in print of binder

Fixes rust-lang#102374

r? `@lcnr`

cc `@steffahn`
…ler-errors

remove FIXME, improve documentation

r? types
…, r=GuillaumeGomez

rustdoc: clean up "normalize.css 8" input override CSS

These rules were copied from normalize.css 3, and are mostly redundant.

* `optgroup` isn't used in rustdoc at all
* `textarea` is only used for the "copy" button, so it's not visible
* The remaining buttons and inputs mostly have styles set anyway.
* We should never be setting `color` without also setting the background to something. Otherwise, you get white-on-gray text. That seems to be [the reason] why `normalize.css` changed this.

[the reason]: necolas/normalize.css#502
… r=jsha

rustdoc: cut margin-top from first header in docblock

Fixes a regression caused by 8846c08, where a header's top margin used to be collapsed, but isn't any more.

## Before

![image](https://user-images.githubusercontent.com/1593513/192893092-8e158bf7-ae18-41ef-8f11-6f34c724d345.png)

## After

![image](https://user-images.githubusercontent.com/1593513/192893139-d6ee06bf-9c0b-4194-bd5d-636312c89367.png)
… r=GuillaumeGomez

rustdoc: remove bad CSS font-weight on `.impl`, `.method`, etc

This line was added in c494a06, because at the time, the headers had these classes on them. Now, the headers are children of the `<section>` with the class on it.

This commit also adds a test case, to make sure the srclink font weight does not regress again.
… r=jsha

rustdoc: add method spacing to trait methods

More cleanup for 8846c08, this time in trait layouts when things are collapsed.

This PR makes two changes to the appearance of trait pages:

* It adds the `method-toggle` class to method toggles on traits, making the DOM more consistent with type pages (which already have this class).

  ## Before

  ![image](https://user-images.githubusercontent.com/1593513/192914353-ed17e1eb-df1d-480b-9998-3b5e8283b0ee.png)

  ## After

  ![image](https://user-images.githubusercontent.com/1593513/192914570-bdd0f2e1-5254-4e2e-9576-a797b82b3b3b.png)

* It adds a bottom margin to docblocks nested directly in the implementors list, giving it a similar appearance to if it was nested within a toggle.

  ## Before

  ![image](https://user-images.githubusercontent.com/1593513/192914503-1c3f39d5-690f-44ec-8f11-385302477d04.png)

  ## After

  ![image](https://user-images.githubusercontent.com/1593513/192914702-cbce4b3b-5cc6-49dc-b7f8-73be9e76791c.png)
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Sep 29, 2022
@JohnTitor
Copy link
Member Author

@bors r+ rollup=never p=11

@bors
Copy link
Contributor

bors commented Sep 29, 2022

📌 Commit b1bded7 has been approved by JohnTitor

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 29, 2022
@bors
Copy link
Contributor

bors commented Sep 29, 2022

⌛ Testing commit b1bded7 with merge 4e0fb5a0f91c8ff80e4fd6f1a2a7dac5c785ecfd...

@bors
Copy link
Contributor

bors commented Sep 29, 2022

💔 Test failed - checks-actions

@bors bors 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 Sep 29, 2022
@JohnTitor JohnTitor closed this Sep 29, 2022
@JohnTitor JohnTitor deleted the rollup-74oh98b branch September 29, 2022 01:46
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [rustdoc] src/test/rustdoc/toggle-trait-fn.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/toggle-trait-fn" "/checkout/src/test/rustdoc/toggle-trait-fn.rs"
stdout: none
--- stderr -------------------------------
7: @has check failed
 `XPATH PATTERN` did not match
 // @has -  '//details[@class="rustdoc-toggle"]//summary//h4[@class="code-header"]' 'is_documented()'
9: @has check failed
 `XPATH PATTERN` did not match
 // @has -  '//details[@class="rustdoc-toggle"]//*[@class="docblock"]' 'is_documented is documented'
10: @has check failed
 `XPATH PATTERN` did not match
 // @has -  '//details[@class="rustdoc-toggle"]//summary//h4[@class="code-header"]' 'is_documented_optional()'
12: @has check failed
 `XPATH PATTERN` did not match
 // @has -  '//details[@class="rustdoc-toggle"]//*[@class="docblock"]' 'is_documented_optional is documented'
Encountered 4 errors
------------------------------------------


@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-stable failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=rustdoc mode=rustdoc host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu

---- [rustdoc] src/test/rustdoc/toggle-trait-fn.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/toggle-trait-fn" "/checkout/src/test/rustdoc/toggle-trait-fn.rs"
stdout: none
--- stderr -------------------------------
7: @has check failed
 `XPATH PATTERN` did not match
 // @has -  '//details[@class="rustdoc-toggle"]//summary//h4[@class="code-header"]' 'is_documented()'
9: @has check failed
 `XPATH PATTERN` did not match
 // @has -  '//details[@class="rustdoc-toggle"]//*[@class="docblock"]' 'is_documented is documented'
10: @has check failed
 `XPATH PATTERN` did not match
 // @has -  '//details[@class="rustdoc-toggle"]//summary//h4[@class="code-header"]' 'is_documented_optional()'
12: @has check failed
 `XPATH PATTERN` did not match
 // @has -  '//details[@class="rustdoc-toggle"]//*[@class="docblock"]' 'is_documented_optional is documented'
Encountered 4 errors
------------------------------------------


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. 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.