-
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 10 pull requests #133770
Rollup of 10 pull requests #133770
Conversation
Signed-off-by: onur-ozkan <work@onurozkan.dev>
As of rust-lang#133155 `Formatter:new` uses `as_results_cursor` to create a non-mutable results reference, and then later that is accessed via `deref_mut` which results in a runtime abort. Changing to `as_results_cursor_mut` fixes it. Fixes rust-lang#133641.
The `Borrowed` variant is no longer used. This commit removes it, along with the `as_results_cursor` method that produces it, and renames `as_results_cursor_mut` as `as_results_cursor`.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Mark the following API const stable: impl<T> MaybeUninit<T> { pub const fn write(&mut self, val: T) -> &mut T; } This depends on `const_mut_refs` and `const_maybe_uninit_assume_init`, both of which have recently been stabilized. Tracking issue: <rust-lang#63567>
These operations are much more about lowering the HIR than about `Const`s themselves. They fit better in hir_ty_lowering with `lower_const_arg` (formerly `Const::from_const_arg`) and the rest. To accomplish this, `const_evaluatable_predicates_of` had to be changed to not use `from_anon_const` anymore. Instead of visiting the HIR and lowering anon consts on the fly, it now visits the `rustc_middle::ty` data structures instead and directly looks for `UnevaluatedConst`s. This approach was proposed in: rust-lang#131081 (comment)
…nit_write, r=RalfJung,dtolnay Stabilize `const_maybe_uninit_write` Mark the following API const stable: ```rust impl<T> MaybeUninit<T> { pub const fn write(&mut self, val: T) -> &mut T; } ``` This depends on `const_mut_refs` and [`const_maybe_uninit_assume_init`](rust-lang#86722), both of which have recently been stabilized. Closes: <rust-lang#63567>
…ure-compat, r=davidtwco show forbidden_lint_groups in future-compat reports Part of rust-lang#81670. This has been a future-compat lint for a while, time to dial it up to show up in reports.
…xyUwU Move `Const::{from_anon_const,try_from_lit}` to hir_ty_lowering Fixes rust-lang#128176. This accomplishes one of the followup items from rust-lang#131081. These operations are much more about lowering the HIR than about `Const`s themselves. They fit better in hir_ty_lowering with `lower_const_arg` (formerly `Const::from_const_arg`) and the rest. To accomplish this, `const_evaluatable_predicates_of` had to be changed to not use `from_anon_const` anymore. Instead of visiting the HIR and lowering anon consts on the fly, it now visits the `rustc_middle::ty` data structures instead and directly looks for `UnevaluatedConst`s. This approach was proposed in: rust-lang#131081 (comment) r? `@BoxyUwU`
Use c"lit" for CStrings without unwrap I've reviewed uses of `CString::new("lit")`. Some could be changed to `c"lit"`. Some could be changed to `c"lit".to_owned()`, avoiding an `unwrap()`. Many `CString` documentation examples could be simplified. I deliberately haven't changed all the examples to use the exact same expression, so that they can demonstrate many ways of creating `CString`s. I've left UI tests mostly unchanged, because `c""` requires edition 2021, but most UI tests use 2015, and I didn't want to accidentally change what the tests are testing.
…e, r=compiler-errors fix ICE when promoted has layout size overflow Turns out there is no reason to distinguish `tainted_by_errors` and `can_be_spurious` here, we can just track whether we allow this even in "infallible" constants. Fixes rust-lang#125476
add "profiler" and "optimized-compiler-builtins" option coverage for ci-rustc Adds "profiler" and "optimized-compiler-builtins" option coverage in CI-rustc config compatibility check. Resolves rust-lang#133675
…cs, r=jieyouxu Reducing `target_feature` check-cfg merge conflicts It was rightfully pointed in rust-lang#133099 (comment) that the expected values for the `target_feature` cfg are regularly updated and unfortunately the check-cfg tests for it are very merge-conflict prone. This PR aims at drastically reducing the likely-hood of those, by normalizing the "and X more" diagnostic, as well as making the full expected list multi-line instead of being on a single one. cc `@RalfJung` r? `@jieyouxu`
…w, r=compiler-errors Fix `-Zdump-mir-dataflow` r? `@cjgillot`
Change `AttrArgs::Eq` to a struct variant Cleanups for simplifying rust-lang#131808 Basically changes `AttrArgs::Eq` to a struct variant and then avoids several matches on `AttrArgsEq` in favor of methods on it. This will make future refactorings simpler, as they can either keep methods or switch to field accesses without having to restructure code
…manieu Fix `f16::midpoint` const feature gate cc rust-lang#131784 (comment)
@bors r+ p=10 rollup=never |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 42b4b9c669 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (41cbe3e): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -1.5%)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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 768.021s -> 767.847s (-0.02%) |
Successful merges:
const_maybe_uninit_write
#131713 (Stabilizeconst_maybe_uninit_write
)Const::{from_anon_const,try_from_lit}
to hir_ty_lowering #133610 (MoveConst::{from_anon_const,try_from_lit}
to hir_ty_lowering)target_feature
check-cfg merge conflicts #133710 (Reducingtarget_feature
check-cfg merge conflicts)-Zdump-mir-dataflow
#133732 (Fix-Zdump-mir-dataflow
)AttrArgs::Eq
to a struct variant #133746 (ChangeAttrArgs::Eq
to a struct variant)f16::midpoint
const feature gate #133763 (Fixf16::midpoint
const feature gate)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup