Skip to content

Rollup of 7 pull requests #102814

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 26 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

chrysn and others added 26 commits October 5, 2022 19:29
…rminal

The UNIX and WASI implementations use `isatty`. The Windows
implementation uses the same logic the `atty` crate uses, including the
hack needed to detect msys terminals.

Implement this trait for `File` and for `Stdin`/`Stdout`/`Stderr` and
their locked counterparts on all platforms. On UNIX and WASI, implement
it for `BorrowedFd`/`OwnedFd`. On Windows, implement it for
`BorrowedHandle`/`OwnedHandle`.

Based on rust-lang#91121

Co-authored-by: Matt Wilkinson <mattwilki17@gmail.com>
If a process has no console, it'll have NULL in place of a console
handle, so return early with `false` in that case without making any OS
calls.
Rather than referencing a slice's pointer and then creating a new slice
with a longer length, offset from the base structure pointer instead.
This makes some choices of Rust semantics happier.
PR rust-lang#98165 with commits 7c360dc and c1a2db3
has moved all of the components of these modules into different places,
namely {std,core}::sync and {std,core}::cell. The empty
modules remained. As they are unstable, we can simply remove them.
… r=thomcc

Add `IsTerminal` trait to determine if a descriptor or handle is a terminal

The UNIX implementation uses `isatty`. The Windows implementation uses
the same logic the `atty` crate uses, including the hack needed to
detect msys terminals.

Implement this trait for `Stdin`/`Stdout`/`Stderr`/`File` on all
platforms. On Unix, implement it for `BorrowedFd`/`OwnedFd`. On Windows,
implement it for `BorrowedHandle`/`OwnedHandle`.

Based on rust-lang#91121

Co-authored-by: Matt Wilkinson <mattwilki17@gmail.com>
…AGS, r=notriddle

Change default level of INVALID_HTML_TAGS to warning and stabilize it

Fixes of rust-lang#67799.

cc `@Nemo157`
r? `@notriddle`
…t-of-fundamental, r=notriddle

rustdoc: Document effect of fundamental types

This was implemented in rust-lang#96565, but not documented. But it's a useful feature for everyone who implements own wrapper (especially wrappers-around-pointers) types, so that they can behave like pointers (and stdlib wrappers) do -- so here goes a mention in the unstable section of the rustdoc book.

(That is where I initially looked to find tricks for making my own wrapper types be transparent to documentation).
…n2, r=bjorn3

nicer errors from assert_unsafe_precondition

This makes the errors shown by cargo-careful nicer, and since `panic_no_unwind` is `nounwind noreturn` it hopefully doesn't have bad codegen impact. Thanks to `@bjorn3` for the hint!

Would be nice if we could somehow supply our own (static) message to print, currently it always prints `panic in a function that cannot unwind`. But still, this is better than before.
Fix llvm-tblgen for cross compiling

- Let llvm-config tell us where to find its tools
- Add llvm-tblgen to rust-dev for cross-compiling

Fixes rust-lang#86890.
r? `@jyn514`
…yn514

Document `rust-docs-json` component

Follow up to rust-lang#102241

r? `@jyn514`
Remove empty core::lazy and std::lazy

PR rust-lang#98165 with commits 7c360dc and c1a2db3 has moved all of the components of these modules into different places, namely {std,core}::sync and {std,core}::cell. The empty modules remained. As they are unstable, we can simply remove them.
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. labels Oct 8, 2022
@rustbot rustbot added the rollup A PR which is a rollup label Oct 8, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Collaborator

bors commented Oct 8, 2022

📌 Commit 8e4edd1 has been approved by matthiaskrgr

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 Oct 8, 2022
@bors
Copy link
Collaborator

bors commented Oct 8, 2022

⌛ Testing commit 8e4edd1 with merge 57d57a453521bfcc5e81622d85611adcee45b8a4...

@bors
Copy link
Collaborator

bors commented Oct 8, 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 Oct 8, 2022
@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)
[RUSTC-TIMING] gimli test:false 4.166
[RUSTC-TIMING] object test:false 4.599
warning: dropping unsupported crate type `dylib` for target `wasm32-wasi`

error[E0277]: the trait bound `io::stdio::Stdin: owned::AsFd` is not satisfied
     |
1034 | / macro_rules! impl_is_terminal {
1034 | / macro_rules! impl_is_terminal {
1035 | |     ($($t:ty),*$(,)?) => {$(
1036 | |         #[unstable(feature = "sealed", issue = "none")]
1037 | |         impl crate::sealed::Sealed for $t {}
1043 | |                 crate::sys::io::is_terminal(self)
1043 | |                 crate::sys::io::is_terminal(self)
     | |                 --------------------------- ^^^^ the trait `owned::AsFd` is not implemented for `io::stdio::Stdin`
     | |                 required by a bound introduced by this call
...    |
1046 | |     )*}
1047 | | }
1047 | | }
     | |_- in this expansion of `impl_is_terminal!`
1048 |
1049 |   impl_is_terminal!(File, Stdin, StdinLock<'_>, Stdout, StdoutLock<'_>, Stderr, StderrLock<'_>);
     |
     |
     = help: the following other types implement trait `owned::AsFd`:
               &T
               Arc<T>
               Box<T>
               Socket
               StderrLock<'a>
               StderrLock<'a>
               StdinLock<'a>
               StdoutLock<'a>
             and 11 others
note: required by a bound in `is_terminal`
    --> library/std/src/sys/wasi/io.rs:76:30
     |
76   | pub fn is_terminal(fd: &impl AsFd) -> bool {
     |                              ^^^^ required by this bound in `is_terminal`

error[E0277]: the trait bound `io::stdio::Stdout: owned::AsFd` is not satisfied
     |
1034 | / macro_rules! impl_is_terminal {
1034 | / macro_rules! impl_is_terminal {
1035 | |     ($($t:ty),*$(,)?) => {$(
1036 | |         #[unstable(feature = "sealed", issue = "none")]
1037 | |         impl crate::sealed::Sealed for $t {}
1043 | |                 crate::sys::io::is_terminal(self)
1043 | |                 crate::sys::io::is_terminal(self)
     | |                 --------------------------- ^^^^ the trait `owned::AsFd` is not implemented for `io::stdio::Stdout`
     | |                 required by a bound introduced by this call
...    |
1046 | |     )*}
1047 | | }
1047 | | }
     | |_- in this expansion of `impl_is_terminal!`
1048 |
1049 |   impl_is_terminal!(File, Stdin, StdinLock<'_>, Stdout, StdoutLock<'_>, Stderr, StderrLock<'_>);
     |
     |
     = help: the following other types implement trait `owned::AsFd`:
               &T
               Arc<T>
               Box<T>
               Socket
               StderrLock<'a>
               StderrLock<'a>
               StdinLock<'a>
               StdoutLock<'a>
             and 11 others
note: required by a bound in `is_terminal`
    --> library/std/src/sys/wasi/io.rs:76:30
     |
76   | pub fn is_terminal(fd: &impl AsFd) -> bool {
     |                              ^^^^ required by this bound in `is_terminal`

error[E0277]: the trait bound `io::stdio::Stderr: owned::AsFd` is not satisfied
     |
1034 | / macro_rules! impl_is_terminal {
1034 | / macro_rules! impl_is_terminal {
1035 | |     ($($t:ty),*$(,)?) => {$(
1036 | |         #[unstable(feature = "sealed", issue = "none")]
1037 | |         impl crate::sealed::Sealed for $t {}
1043 | |                 crate::sys::io::is_terminal(self)
1043 | |                 crate::sys::io::is_terminal(self)
     | |                 --------------------------- ^^^^ the trait `owned::AsFd` is not implemented for `io::stdio::Stderr`
     | |                 required by a bound introduced by this call
...    |
1046 | |     )*}
1047 | | }
1047 | | }
     | |_- in this expansion of `impl_is_terminal!`
1048 |
1049 |   impl_is_terminal!(File, Stdin, StdinLock<'_>, Stdout, StdoutLock<'_>, Stderr, StderrLock<'_>);
     |
     |
     = help: the following other types implement trait `owned::AsFd`:
               &T
               Arc<T>
               Box<T>
               Socket
               StderrLock<'a>
               StderrLock<'a>
               StdinLock<'a>
               StdoutLock<'a>
             and 11 others
note: required by a bound in `is_terminal`
    --> library/std/src/sys/wasi/io.rs:76:30
     |
76   | pub fn is_terminal(fd: &impl AsFd) -> bool {
     |                              ^^^^ required by this bound in `is_terminal`
For more information about this error, try `rustc --explain E0277`.
[RUSTC-TIMING] std test:false 1.831
warning: `std` (lib) generated 1 warning
error: could not compile `std` due to 3 previous errors; 1 warning emitted

# for free to join this conversation on GitHub. Already have an account? # 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.