-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 9 pull requests #107823
Closed
Closed
Rollup of 9 pull requests #107823
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
…ize the tracing loggers at their own discretion
[svgo]: https://github.com/svg/svgo $ du -bs src/librustdoc/html/static/images/wheel.svg wheel-old.svg 2972 src/librustdoc/html/static/images/wheel.svg 3764 wheel-old.svg 100*((2972-3764)/3764) = -21.04%
To temporarily allow a `str` field in a packed struct using `derive`, along with `[u8]`.
Implement `AsFd` and `AsRawFd` for `Rc` Fixes rust-lang#105931.
…bilization, r=dtolnay Stabilize feature `cstr_from_bytes_until_nul` This PR seeks to stabilize `cstr_from_bytes_until_nul`. Partially addresses rust-lang#95027 This function has only been on nightly for about 10 months, but I think it is simple enough that there isn't harm discussing stabilization. It has also had at least a handful of mentions on both the user forum and the discord, so it seems like it's already in use or at least known. This needs FCP still. Comment on potential discussion points: - eventual conversion of `CStr` to be a single thin pointer: this function will still be useful to provide a safe way to create a `CStr` after this change. - should this return a length too, to address concerns about the `CStr` change? I don't see it as being particularly useful, and it seems less ergonomic (i.e. returning `Result<(&CStr, usize), FromBytesUntilNulError>`). I think users that also need this length without the additional `strlen` call are likely better off using a combination of other methods, but this is up for discussion - `CString::from_vec_until_nul`: this is also useful, but it doesn't even have a nightly implementation merged yet. I propose feature gating that separately, as opposed to blocking this `CStr` implementation on that Possible alternatives: A user can use `from_bytes_with_nul` on a slice up to `my_slice[..my_slice.iter().find(|c| c == 0).unwrap()]`. However; that is significantly less ergonomic, and is a bit more work for the compiler to optimize compared the direct `memchr` call that this wraps. ## New stable API ```rs // both in core::ffi pub struct FromBytesUntilNulError(()); impl CStr { pub const fn from_bytes_until_nul( bytes: &[u8] ) -> Result<&CStr, FromBytesUntilNulError> } ``` cc ``@ericseppanen`` original author, ``@Mark-Simulacrum`` original reviewer, ``@m-ou-se`` brought up some issues on the thin pointer CStr ``@rustbot`` modify labels: +T-libs-api +needs-fcp
…ACKED_STRUCT_WITH_DERIVE, r=RalfJung Extend `BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE`. To temporarily allow a `str` field in a packed struct using `derive`, along with `[u8]`. r? `@RalfJung`
Replace a command line flag with an env var to allow tools to initialize the tracing loggers at their own discretion fixes rust-lang/miri#2778 this was introduced in rust-lang#104645, so this PR reverts the flag-part and uses an env var instead.
…eaks, r=lcnr Implement some tweaks in the new solver I've been testing the new solver on some small codebases, and these are a few small changes I've needed to make. The most "controversial" here is implementing `trait_candidate_should_be_dropped_in_favor_of`, which I just implemented to always return false. This surprisingly allows some code to compile, without us having to actually decide on any semantics yet. r? `@rust-lang/initiative-trait-system-refactor`
…oli-obk correctly update goals in the cache we may want to actually write the response for our goal into the provisional or global cache instead of simply using the result from the last iteration '^^ r? ``@rust-lang/initiative-trait-system-refactor``
…macro-is-ok, r=estebank Do not eagerly recover for bad `impl Trait` types in macros Fixes rust-lang#107796 cc rust-lang#106712, ``@estebank`` and ``@Ezrashaw`` please make sure to use [`Parser::may_recover`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html#method.may_recover) for all eager-token-consuming parser recoveries. This also fixes a separate regression from rust-lang#99915, that was introduced before we added `may_recover` though.
…uillaumeGomez rustdoc: use svgo to shrink `wheel.svg` use [svgo] to shrink `wheel.svg` [svgo]: https://github.com/svg/svgo $ du -bs src/librustdoc/html/static/images/wheel.svg wheel-old.svg 2972 src/librustdoc/html/static/images/wheel.svg 3764 wheel-old.svg 100*((2972-3764)/3764) = -21.04%
Set `rust-analyzer.check.invocationLocation` to `root` Add ```json "rust-analyzer.check.invocationLocation": "root", "rust-analyzer.check.invocationStrategy": "once", ``` to the bundled VS code config. This prevents an error with r-a invoking `python3 x.py` in `src/bootstrap` where `x.py` does not exist. r? `@jyn514`
rustbot
added
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.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
rollup
A PR which is a rollup
labels
Feb 9, 2023
@bors r+ rollup=never p=6 |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 9, 2023
The job Click to see the possible cause of the failure (guessed by this bot)
|
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-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.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
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:
AsFd
andAsRawFd
forRc
#107317 (ImplementAsFd
andAsRawFd
forRc
)cstr_from_bytes_until_nul
#107429 (Stabilize featurecstr_from_bytes_until_nul
)BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE
. #107713 (ExtendBYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE
.)impl Trait
types in macros #107813 (Do not eagerly recover for badimpl Trait
types in macros)wheel.svg
#107817 (rustdoc: use svgo to shrinkwheel.svg
)rust-analyzer.check.invocationLocation
toroot
#107819 (Setrust-analyzer.check.invocationLocation
toroot
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup