-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Rollup of 5 pull requests #148010
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
Closed
Closed
Rollup of 5 pull requests #148010
+514
−343
Conversation
This file contains hidden or 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
This commit demonstrates that `rustdoc --emit=depinfo=-` hasn't yet supported emitting to stdout.
rustdoc's `--emit=depinfo` flag now supports using `-` to write the output to stdout.
This patch adds a new flag to the [`CommandExt`](1) trait to set whether to inherit the handles of the calling process (2) on Windows systems. ACP: rust-lang/libs-team#264 [1]: https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html [2]: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
Rebased and modified by zachs18. Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
…les, r=ChrisDenton Add new inherit_handles flag to CommandExt trait This PR adds a new flag to the [`CommandExt`](https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html) trait to set whether to inherit the handles of the calling process ([ref][1]). This is necessary when, for example, spawning a process with a `pseudoconsole` attached. r? `@ChrisDenton` ACP: rust-lang/libs-team#264 [1]: <https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw>
…base, r=joshtriplett Add `String::replace_first` and `String::replace_last` Rebase of rust-lang#97977 (cc `@WilliamVenner)` > Convenience methods that use `match_indices` and `replace_range` to efficiently replace a substring in a string without reallocating, if capacity (and the implementation of `Vec::splice`) allows. The intra-doc link to `str::replacen` is a direct url-based link to `str::replacen` in `std`'s docs to work around rust-lang#98941. This means that when building only `alloc`'s docs (and not `std`'s), it will be a broken link. There is precedent for this e.g. in [`core::hint::spin_loop`](https://doc.rust-lang.org/nightly/src/core/hint.rs.html#214) which links to `std::thread::yield_now` using a [url-based link](https://github.com/rust-lang/rust/blob/master/library/core/src/hint.rs#L265) and thus is a dead link when only building `core`'s docs. ACP: rust-lang/libs-team#506
std: reorganize the UNIX-internal `weak` module This moves the `dlsym`-based and weak-linkage versions of the `weak!` macro into separate files, both of which include a common test file. As a result, both versions will be tested on all the platforms where they are used. Since the `#[link_name]` arm of the `dlsym` version was unused, I've removed it. I've also removed the unused `raw_syscall!` and non-Linux `syscall!` macros and gated the `#[allow(dead_code, unused_macros)]` to only apply on non-Linux platforms, so compilation will fail if `weak` turns out to be unused on all platforms. The last change concerns the use of `dlsym!` on FreeBSD: it is only used once, to link against `sysctlbyname`. But that symbol is always available, so there is no need for weak linkage.
…r=fmease feat(rustdoc): `--emit=depinfo` output to stdout via `-` rustdoc's `--emit=depinfo` flag now supports using `-` to write the output to stdout, aligning with rustc's behavior. This will fix <rust-lang#147649>. ### How to review * The first commit demonstrates that `rustdoc --emit=depinfo=-` hasn't yet supported emitting to stdout. * The second implements it and the diff shows how the behavior changes.
…-lines, r=fmease fix: Don't add diff symbol to unchanged lines When rendering a "multi-line" suggestion with the [`Diff`](https://github.com/rust-lang/rust/blob/dc1feabef242259d61bd930713de3250577c1c71/compiler/rustc_errors/src/emitter.rs#L3078) format, `rustc` uses a [diff symbol](https://github.com/rust-lang/rust/blob/dc1feabef242259d61bd930713de3250577c1c71/compiler/rustc_errors/src/emitter.rs#L3017-L3022) for [any line that has a highlight part](https://github.com/rust-lang/rust/blob/dc1feabef242259d61bd930713de3250577c1c71/compiler/rustc_errors/src/emitter.rs#L2705-L2713). This includes highlight parts that are highlighting nothing, i.e., a span of `0..0`. This leads `rustc` to add a diff symbol unnecessarily to lines that have no changes and are not highlighted. This PR makes it so that `rustc` will not add a diff symbol to lines that contain no changes/highlights. Note: This PR is part of my ongoing effort to have `rustc` use `annotate-snippets` for rendering. This change will make it so that `rustc` and `annotate-snippets` will match in this case.
Rollup of everything. @bors r+ rollup=never p=5 |
The job Click to see the possible cause of the failure (guessed by this bot)
For more information how to resolve CI failures of this job, visit this link. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-run-make
Area: port run-make Makefiles to rmake.rs
O-unix
Operating system: Unix-like
O-windows
Operating system: Windows
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-clippy
Relevant to the Clippy team.
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.
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:
String::replace_first
andString::replace_last
#134316 (AddString::replace_first
andString::replace_last
)weak
module #146629 (std: reorganize the UNIX-internalweak
module)--emit=depinfo
output to stdout via-
#147762 (feat(rustdoc):--emit=depinfo
output to stdout via-
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup