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 12 pull requests #82472

Closed
wants to merge 28 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

LeSeulArtichaut and others added 28 commits February 19, 2021 17:50
This is in preparation to upgrade to 8.0.1, so the next commit
can contain more meaningful diffs.
This bypasses tidy's complaints about tab indent. Also, this lets us
remove comments while keeping the MIT license comment.
WASI's `filestat` type includes a size field, so expose it in
`MetadataExt` via a `size()` function, similar to the corresponding Unix
function.
These ensure that these tests pass regardless of what RUST_BACKTRACE is
set to in the user's shell.
This adds API documentation support for `std::os::wasi` modeled after
how `std::os::unix` works, so that WASI can be documented [here] along
with the other platforms.

[here]: https://doc.rust-lang.org/stable/std/os/index.html

Two changes of particular interest:

 - This changes the `AsRawFd` for `io::Stdin` for WASI to return
   `libc::STDIN_FILENO` instead of `sys::stdio::Stdin.as_raw_fd()` (and
   similar for `Stdout` and `Stderr`), which matches how the `unix`
   version works. `STDIN_FILENO` etc. may not always be explicitly
   reserved at the WASI level, but as long as we have Rust's `std` and
   `libc`, I think it's reasonable to guarantee that we'll always use
   `libc::STDIN_FILENO` for stdin.

 - This duplicates the `osstr2str` utility function, rather than
   trying to share it across all the configurations that need it.
It makes it clearer that the `Namespace` is the one requested by the
disambiguator, rather than the actual namespace of the item. It said
that in the docs before, but now you can tell in the code so it reduces
the potential for confusion.
- Currently style triggers rust-lang#81183 so we can't add `#[instrument]` to
  this function.

- Having docs above the header is more consistent with the rest of the
  code base.
…nup, r=jyn514

rustdoc: Name fields of `ResolutionFailure::WrongNamespace`

It makes it clearer that the `Namespace` is the one requested by the
disambiguator, rather than the actual namespace of the item. It said
that in the docs before, but now you can tell in the code so it reduces
the potential for confusion.
…pastorino

Cleanup `PpMode` and friends

This PR:
 - Separates `PpSourceMode` and `PpHirMode` to remove invalid states
 - Renames the variant to remove the redundant `Ppm` prefix
 - Adds basic documentation for the different pretty-print modes
 - Cleanups some code to make it more idiomatic

Not sure if this is actually useful, but it looks cleaner to me.
…umeGomez

Update normalize.css to 8.0.1

From From https://github.com/necolas/normalize.css/releases/tag/8.0.1.

The old version was 3.0.0, from 2014. The new version is from 2018.

I noticed when looking at frontend performance for rustdoc that this file was out of date. The URL in the 3.0.0 license header now resolves to an incorrect destination. And generally it seems good to be up-to-date.

Before-and-after images, plus diff, under details. TL;DR: Nothing changes except a slight adjustment to line height.

<details>

![with-normalize-8 0 1](https://user-images.githubusercontent.com/220205/108581849-bd5c8800-72e4-11eb-9150-78c8d67ca37a.png)

![with-normalize-3 0 0](https://user-images.githubusercontent.com/220205/108581848-bcc3f180-72e4-11eb-8b45-0cd1415a51e5.png)

![diff](https://user-images.githubusercontent.com/220205/108581890-dfeea100-72e4-11eb-93c5-6284492f54a9.png)

</details>
…mps, r=petrochenkov

Test hexagon-enum only when llvm target is present

See rust-lang#82379 (comment)

r? ```@petrochenkov```

```@bors``` rollup
Enable API documentation for `std::os::wasi`.

This adds API documentation support for `std::os::wasi` modeled after
how `std::os::unix` works, so that WASI can be documented [here] along
with the other platforms.

[here]: https://doc.rust-lang.org/stable/std/os/index.html

Two changes of particular interest:

 - This changes the `AsRawFd` for `io::Stdin` for WASI to return
   `libc::STDIN_FILENO` instead of `sys::stdio::Stdin.as_raw_fd()` (and
   similar for `Stdout` and `Stderr`), which matches how the `unix`
   version works. `STDIN_FILENO` etc. may not always be explicitly
   reserved at the WASI level, but as long as we have Rust's `std` and
   `libc`, I think it's reasonable to guarantee that we'll always use
   `libc::STDIN_FILENO` for stdin.

 - This duplicates the `osstr2str` utility function, rather than
   trying to share it across all the configurations that need it.

r? ```@alexcrichton```
…lexcrichton

Add a `size()` function to WASI's `MetadataExt`.

WASI's `filestat` type includes a size field, so expose it in
`MetadataExt` via a `size()` function, similar to the corresponding Unix
function.

r? ```@alexcrichton```
Set RUST_BACKTRACE=0 when running `treat-err-as-bug` tests

These ensure that these tests pass regardless of what RUST_BACKTRACE is
set to in the user's shell.
…Gomez

Fix typo in sanitizer flag in unstable book.
panic_bounds_checks should be panic_bounds_check
Update outdated comment in unix Command.

The big comment in the `Command` struct has been incorrect for some time (at least since rust-lang#46789 which removed `envp`). Rather than try to remove the allocations, this PR just updates the comment to reflect reality. There is an explanation for the reasoning at rust-lang#31409 (comment), discussing the potential of being able to call `Command::exec` after `libc::fork`.  That can still be done in the future, but I think for now it would be good to just correct the comment.
…etrochenkov

Move pick_by_value_method docs above function header

- Currently style triggers rust-lang#81183 so we can't add `#[instrument]` to
  this function.

- Having docs above the header is more consistent with the rest of the
  code base.
@rustbot rustbot added the rollup A PR which is a rollup label Feb 24, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=12 rollup=never

@bors
Copy link
Contributor

bors commented Feb 24, 2021

📌 Commit 56fc3c5 has been approved by JohnTitor

@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 Feb 24, 2021
@bors
Copy link
Contributor

bors commented Feb 24, 2021

⌛ Testing commit 56fc3c5 with merge 1c1b8a85a036241728a28df6e5661853025df30a...

@rust-log-analyzer
Copy link
Collaborator

The job dist-various-2 failed! Check out the build log: (web) (plain)

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

error[E0308]: mismatched types
   --> library/std/src/sys/wasi/ext/io.rs:148:9
    |
147 |     fn as_raw_fd(&self) -> RawFd {
    |                            ----- expected `u32` because of return type
148 |         libc::STDIN_FILENO
    |         ^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`
    |
help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
148 |         libc::STDIN_FILENO.try_into().unwrap()
    |

error[E0308]: mismatched types
error[E0308]: mismatched types
   --> library/std/src/sys/wasi/ext/io.rs:154:9
    |
153 |     fn as_raw_fd(&self) -> RawFd {
    |                            ----- expected `u32` because of return type
154 |         libc::STDOUT_FILENO
    |         ^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`
    |
help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
154 |         libc::STDOUT_FILENO.try_into().unwrap()
    |

error[E0308]: mismatched types
error[E0308]: mismatched types
   --> library/std/src/sys/wasi/ext/io.rs:160:9
    |
159 |     fn as_raw_fd(&self) -> RawFd {
    |                            ----- expected `u32` because of return type
160 |         libc::STDERR_FILENO
    |         ^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`
    |
help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
160 |         libc::STDERR_FILENO.try_into().unwrap()
    |

error[E0308]: mismatched types
error[E0308]: mismatched types
   --> library/std/src/sys/wasi/ext/io.rs:166:9
    |
165 |     fn as_raw_fd(&self) -> RawFd {
    |                            ----- expected `u32` because of return type
166 |         libc::STDIN_FILENO
    |         ^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`
    |
help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
166 |         libc::STDIN_FILENO.try_into().unwrap()
    |

error[E0308]: mismatched types
error[E0308]: mismatched types
   --> library/std/src/sys/wasi/ext/io.rs:172:9
    |
171 |     fn as_raw_fd(&self) -> RawFd {
    |                            ----- expected `u32` because of return type
172 |         libc::STDOUT_FILENO
    |         ^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`
    |
help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
172 |         libc::STDOUT_FILENO.try_into().unwrap()
    |

error[E0308]: mismatched types
error[E0308]: mismatched types
   --> library/std/src/sys/wasi/ext/io.rs:178:9
    |
177 |     fn as_raw_fd(&self) -> RawFd {
    |                            ----- expected `u32` because of return type
178 |         libc::STDERR_FILENO
    |         ^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`
    |
help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
178 |         libc::STDERR_FILENO.try_into().unwrap()
    |

error: aborting due to 6 previous errors; 1 warning emitted
error: aborting due to 6 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0308`.
[RUSTC-TIMING] std test:false 1.959
error: could not compile `std`

To learn more, run the command again with --verbose.
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "wasm32-wasi" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --host= --target x86_64-fuchsia,aarch64-fuchsia,wasm32-unknown-unknown,wasm32-wasi,sparcv9-sun-solaris,x86_64-sun-solaris,x86_64-unknown-linux-gnux32,x86_64-fortanix-unknown-sgx,nvptx64-nvidia-cuda,armv7-unknown-linux-gnueabi,armv7-unknown-linux-musleabi,i686-unknown-freebsd
Build completed unsuccessfully in 0:19:00

@bors
Copy link
Contributor

bors commented Feb 24, 2021

💔 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 Feb 24, 2021
@JohnTitor JohnTitor closed this Feb 24, 2021
@JohnTitor JohnTitor deleted the rollup-ub84u01 branch February 24, 2021 14:51
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.