-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 8 pull requests #102222
Closed
Closed
Rollup of 8 pull requests #102222
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ls/alloc.rs` nicer - Use `.addr()` instead of `as`-cast - Use `add` instead of `offset` and remove some `as isize` casts by doing that - Remove some casts
…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 <[email protected]>
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.
First try to use the system preferred RNG but if that fails (e.g. due to a broken system configuration) then fallback to manually opening an algorithm handle.
`fn is_zero` has been renamed to `fn count_is_zero` in 1b1bf24. This patch updates the documentation accordingly.
… 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 <[email protected]>
Refactor some `std` code that works with pointer offstes This PR replaces `pointer::offset` in standard library with `pointer::add` and `pointer::sub`, [re]moving some casts and using `.addr()` while we are at it. This is a more complicated refactor than all other sibling PRs, so take a closer look when reviewing, please 😃 (though I've checked this multiple times and it looks fine). r? ``@scottmcm`` _split off from rust-lang#100746, continuation of #100822_
…shtriplett Add a platform support document for Android r? `@joshtriplett`
…thomcc Remove `RtlGenRandom` (take two) First try to use the system preferred RNG but if that fails (e.g. due to a broken system configuration) then fallback to manually opening an algorithm handle.
…r=GuillaumeGomez rustdoc: CSS prevent sidebar width change jank This commit makes the `width` and `min-width` of the sidebar the same. They originally were when cad0fce added the `min-width` rule, but 6a5f8b1 changed the `width` without changing the `min-width`, causing it to sometimes oscilate between 200 and 250 pixels depending on the main content. # Before [Screencast from 09-22-2022 10:25:29 AM.webm](https://user-images.githubusercontent.com/1593513/191813469-ea00f30f-6f49-40fc-9a26-e1dfd5068d2b.webm) # After [Screencast from 09-22-2022 10:32:20 AM.webm](https://user-images.githubusercontent.com/1593513/191813642-ae0902da-5262-403a-bbdf-995334201acb.webm)
…=fee1-dead Add const_closure, Constify Try trait Adds a struct for creating const `FnMut` closures (for now just copy pasted form my [const_closure](https://crates.io/crates/const_closure) crate). I'm not sure if this way is how it should be done. The `ConstFnClosure` and `ConstFnOnceClosure` structs can probably also be entirely removed. This is then used to constify the try trait. Not sure if i should add const_closure in its own pr and maybe make it public behind a perma-unstable feature gate. cc `@fee1-dead` `@rust-lang/wg-const-eval`
…n514 Update doc after renaming `fn is_zero` `fn is_zero` has been renamed to `fn count_is_zero` in 1b1bf24. This patch updates the documentation accordingly.
Document some missing command-line arguments The rustc command-line arguments docs should document all of the stable arguments for rustc. Two were missing, `--force-warn` which was somewhat documented in the lint-levels chapter, but should also include a mention in the arguments list. `--diagnostic-width` was stabilized in rust-lang#95635, but the docs weren't updated.
rustbot
added
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 24, 2022
@bors r+ rollup=never p=5 |
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 24, 2022
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-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
IsTerminal
trait to determine if a descriptor or handle is a terminal #98033 (AddIsTerminal
trait to determine if a descriptor or handle is a terminal)std
code that works with pointer offstes #100823 (Refactor somestd
code that works with pointer offstes)RtlGenRandom
(take two) #102044 (RemoveRtlGenRandom
(take two))fn is_zero
#102188 (Update doc after renamingfn is_zero
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup