-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 9 pull requests #140239
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 #140239
Conversation
Included API: impl<T: Copy> Cell<T> { pub fn update(&self, f: impl FnOnce(T) -> T); } Closes: rust-lang#50186
Signed-off-by: xizheyin <[email protected]>
- With `Context` wrapped by `SmirInterface`, the stable-mir's TLV stores a pointer to `SmirInterface`, while the rustc-specific TLV stores a pointer to tables. - This PR make the `rustc_smir` mod public.
Co-authored-by: Jonas Böttiger <[email protected]>
Specifically, this allows string literal patterns to be used where a `str` is expected when `deref_patterns` is enabled.
Specifically, this allows byte string literal patterns to be used where a `[u8]` or `[u8;N]` is expected when `deref_patterns` is enabled.
This has other warnings if necessary and doesn't need extra warnings from this FCW. cc rust-lang#138762
The `synstructure` docs say "This method is a no-op, underscore consts are used by default now." The behaviour change occurred going from `synstructure` version 0.13.0 to 0.13.1.
Co-authored-by: Celina G. Val <[email protected]>
Tracking issue rust-lang#139324 Signed-off-by: Jiahao XU <[email protected]>
An upcoming lint will want to be able to know if a lifetime is hidden (e.g. `&u8`, `ContainsLifetime`) or anonymous: (e.g. `&'_ u8`, `ContainsLifetime<'_>`). It will also want to know if the lifetime is related to a reference (`&u8`) or a path (`ContainsLifetime`).
I found these by grepping for `&[a-z_\.]*\.clone()`, i.e. expressions like `&a.b.clone()`, which are sometimes unnecessary clones, and also looking at clones nearby to cases like that.
Pass `args` to `run` instead of storing it in a field. This avoids the need to clone it within `run`. Also, change `args` from `Vec<String>` to `&[String]`, avoiding the need for some vecs and clones.
…jhpratt Stabilize the `cell_update` feature Included API: ```rust impl<T: Copy> Cell<T> { pub fn update(&self, f: impl FnOnce(T) -> T); } ``` FCP completed once at rust-lang#50186 (comment) but the signature has since changed. Closes: rust-lang#50186
std: Add performance warnings to HashMap::get_disjoint_mut Closes rust-lang#139296 The `get_disjoint_mut` in `HashMap` also performs a complexity O(n^2) check. So we need to be reminded of that as well. https://github.com/rust-lang/hashbrown/blob/b5b0655a37e156f9798ac8dd7e970d4adba9bf90/src/raw/mod.rs#L1216-L1220
…ss35 Impl new API `std::os::unix::fs::mkfifo` under feature `unix_fifo` Tracking issue rust-lang#139324
…fJung Don't warn about `v128` in wasm ABI transition The `-Zwasm-c-abi=spec` mode of `extern "C"` does not actually change the meaning of `v128` meaning that the FCW lint firing is a false positive. cc rust-lang#138762 (comment)
StableMIR: Implement `CompilerInterface` This PR implements part of [the document](https://hackmd.io/``@celinaval/H1lJBGse0).`` With `TablesWrapper` wrapped by `CompilerInterface`, the stable-mir's TLV stores a pointer to `CompilerInterface`, while the rustc-specific TLV stores a pointer to tables.
…rce, r=nnethercote Extend HIR to track the source and syntax of a lifetime An upcoming lint will want to be able to know if a lifetime is hidden (e.g. `&u8`, `ContainsLifetime`) or anonymous: (e.g. `&'_ u8`, `ContainsLifetime<'_>`). It will also want to know if the lifetime is related to a reference (`&u8`) or a path (`ContainsLifetime`). r? ``@nnethercote``
`deref_patterns`: support string and byte string literals in explicit `deref!("...")` patterns When `deref_patterns` is enabled, this allows string literal patterns to be used where `str` is expected and byte string literal patterns to be used where `[u8]` or `[u8; N]` is expected. This lets them be used in explicit `deref!("...")` patterns to match on `String`, `Box<str>`, `Vec<u8>`, `Box<[u8;N]>`, etc. (as well as to match on slices and arrays obtained through other means). Implementation-wise, this follows up on rust-lang#138992: similar to how byte string literals matching on `&[u8]` is implemented, this changes the type of the patterns as determined by HIR typeck, which informs const-to-pat on how to translate them to THIR (though strings needed a bit of extra work since we need references to call `<str as PartialEq>::eq` in the MIR lowering for string equality tests). This PR does not add support for implicit deref pattern syntax (e.g. `"..."` matching on `String`, as `string_deref_patterns` allows). I have that implemented locally, but I'm saving it for a follow-up PR[^1]. This also does not add support for using named or associated constants of type `&str` where `str` is expected (nor likewise with named byte string constants). It'd be possible to add that if there's an appetite for it, but I figure it's simplest to start with literals. This is gated by the `deref_patterns` feature since it's motivated by deref patterns. That said, its impact reaches outside of deref patterns; it may warrant a separate experiment and feature gate, particularly factoring in the follow-up[^1]. Even without deref patterns, I think there's probably motivation for these changes. The update to the unstable book added by this will conflict with rust-lang#140022, so they shouldn't be merged at the same time. Tracking issue for deref patterns: rust-lang#87121 r? ``@oli-obk`` cc ``@Nadrieril`` [^1]: The piece missing from this PR to support implicit deref pattern syntax is to allow string literal patterns to implicitly dereference their scrutinees before matching (see rust-lang#44849). As a consequence, it also makes examples like the one in that issue work (though it's still gated by `deref_patterns`). I can provide more information on how I've implemented it or open a draft if it'd help in reviewing this PR.
…=compiler-errors Remove `synstructure::Structure::underscore_const` calls. The `synstructure` docs say "This method is a no-op, underscore consts are used by default now." The behaviour change occurred going from `synstructure` version 0.13.0 to 0.13.1. r? ``@SparrowLii``
… r=SparrowLii Remove unnecessary clones r? `@SparrowLii`
@bors r+ rollup=never p=5 |
⌛ Testing commit 986750d with merge dc8fe1f81c6cf13c0987944c525b2aa81625b5d0... |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 7f69523 (parent) -> dc8fe1f (this PR) Test differencesShow 374 test diffsStage 0
Stage 1
Stage 2
Additionally, 366 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard dc8fe1f81c6cf13c0987944c525b2aa81625b5d0 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
📌 Perf builds for each rolled up PR:
previous master: 7f695232a8 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (dc8fe1f): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 0.8%, secondary -5.1%)This 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.
CyclesResults (primary -0.4%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.02s -> 777.711s (0.22%) |
Successful merges:
cell_update
feature #134446 (Stabilize thecell_update
feature)std::os::unix::fs::mkfifo
under featureunix_fifo
#139450 (Impl new APIstd::os::unix::fs::mkfifo
under featureunix_fifo
)v128
in wasm ABI transition #139809 (Don't warn aboutv128
in wasm ABI transition)CompilerInterface
#139852 (StableMIR: ImplementCompilerInterface
)deref_patterns
: support string and byte string literals in explicitderef!("...")
patterns #140028 (deref_patterns
: support string and byte string literals in explicitderef!("...")
patterns)synstructure::Structure::underscore_const
calls. #140181 (Removesynstructure::Structure::underscore_const
calls.)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup