-
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 #107828
Rollup of 9 pull requests #107828
Conversation
…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.
x.py fails all downloads that use a tempdir with snap curl rust-lang#107722 Have used the open() library from python to capture the binary output of the curl command and write it to a file using stdout of the subprocess. Added a single-line comment mentioning the redirect operator.
…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``
@bors r+ rollup=never p=9 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 575d424c94 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (e7acd07): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
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