Conversation
…tests This not only reduces code duplication already, it also gives us revision parsing for free which we need in an upcoming commit.
…, `no-SingleUseConsts-mir-pass` To prevent the test from regressing both with and without `SingleUseConsts` MIR pass.
Now `Iterator::last`'s docs specify that it might panic only if the iterator is infinite, rather than if it has more than `usize::MAX` elements.
…, r=Zalathar
compiletest: Support revisions in debuginfo (read: debugger) tests
And start using revisions in `tests/debuginfo/macro-stepping.rs` to prevent regressing both with and without `SingleUseConsts` MIR pass.
I recommend commit-by-commit review.
## ~TODO~
- [x] Verify this more carefully.
- [x] Possibly do some preparatory PRs before taking this PR out of draft.
- [x] Rebase on rust-lang#150205 once merged so we don't have to add another "`+ 1`".
## CC
CC ``@Zalathar`` since you might have opinions about that I expose a helper function to reduce duplication
CC ``@saethlin`` since this is what we will use for `tests/debuginfo/basic-stepping.rs` in rust-lang#147426 (in the same way I use it in `tests/debuginfo/macro-stepping.rs` here)
…pratt
mutex.rs: remove needless-maybe-unsized bounds
Fixes for:
```text
warning: `?Sized` bound is ignored because of a `Sized` requirement
--> library/std/src/sync/nonpoison/mutex.rs:425:9
|
425 | impl<T: ?Sized + Default> Default for Mutex<T> {
| ^^^^^^
|
note: `T` cannot be unsized because of the bound
--> library/std/src/sync/nonpoison/mutex.rs:425:18
|
425 | impl<T: ?Sized + Default> Default for Mutex<T> {
| ^^^^^^^
= note: ...because `Default` has the bound `Sized`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized
= note: `-W clippy::needless-maybe-sized` implied by `-W clippy::suspicious`
= help: to override `-W clippy::suspicious` add `#[allow(clippy::needless_maybe_sized)]`
help: change the bounds that require `Sized`, or remove the `?Sized` bound
|
425 - impl<T: ?Sized + Default> Default for Mutex<T> {
425 + impl<T: Default> Default for Mutex<T> {
|
warning: `?Sized` bound is ignored because of a `Sized` requirement
--> library/std/src/sync/poison/mutex.rs:691:9
|
691 | impl<T: ?Sized + Default> Default for Mutex<T> {
| ^^^^^^
|
note: `T` cannot be unsized because of the bound
--> library/std/src/sync/poison/mutex.rs:691:18
|
691 | impl<T: ?Sized + Default> Default for Mutex<T> {
| ^^^^^^^
= note: ...because `Default` has the bound `Sized`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized
help: change the bounds that require `Sized`, or remove the `?Sized` bound
|
691 - impl<T: ?Sized + Default> Default for Mutex<T> {
691 + impl<T: Default> Default for Mutex<T> {
```
… r=tgross35 vec in-place-drop: avoid creating an intermediate slice Avoids clippy warning: ```text warning: implicitly casting the result of `from_raw_parts_mut` to `*mut [T]` --> library/alloc/src/vec/in_place_drop.rs:25:32 | 25 | ptr::drop_in_place(slice::from_raw_parts_mut(self.inner, self.len())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace_with: `core::ptr::slice_from_raw_parts_mut(self.inner, self.len())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_from_raw_parts = note: `-W clippy::cast-slice-from-raw-parts` implied by `-W clippy::suspicious` = help: to override `-W clippy::suspicious` add `#[allow(clippy::cast_slice_from_raw_parts)]` ```
Forbid generic parameters in types of #[type_const] items fixes rust-lang#150614 we enforce the same restriction on `#[type_const]` const items that already exists for const generic parameters - when `generic_const_parameter_types` feature gate is not enabled, the type of a `#[type_const]` item cannot reference generic parameters. implementation follows the same pattern used for const generic parameters. we check if the item has the `#[type_const]` attribute and if the feature gate is disabled, then we apply `RibKind::ConstParamTy` restrictions when visiting the type, which prevents the use of generic parameters. check is added in three places: - Free const items (`ItemKind::Const`) - Trait associated consts (`AssocItemKind::Const` in traits) - Impl associated consts (`AssocItemKind::Const` in impls) added tests for new feature, hope i get this task right :> r? `@BoxyUwU`
Clarify panic conditions in `Iterator::last` Follow-up PR to rust-lang#150580. Now `Iterator::last`'s docs specify that it might panic only if the iterator is infinite, rather than if it has more than `usize::MAX` elements. # Motivation This is because `Iterator::last`, unlike `count`, also works on iterators with more than `usize::MAX` elements, but could panic on infinite iterators (as in `Repeat`), as discussed in rust-lang#150580. r? ``@jhpratt``
Add missing translator resources for interface parse_cfg and parse_check_cfg Missing resources leads to the failure of `translate_message`. Fixes rust-lang#150654
Fix ambig-unambig-ty-and-consts link cc: rust-lang/rustc-dev-guide#2677
|
Rollup of almost everything. @bors r+ rollup=never p=5 |
|
☀️ Test successful - checks-actions |
|
📌 Perf builds for each rolled up PR:
previous master: f8b1d59a81 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 f8b1d59 (parent) -> 5afdf5d (this PR) Test differencesShow 601 test diffsStage 1
Stage 2
Additionally, 575 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 5afdf5d8c0377d6babd2504986982b5e5d724798 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (5afdf5d): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 475.255s -> 475.624s (0.08%) |
|
The cargo benchmark seems a bit noisy, over a longer time period, the "up" jumps seem to come and go:
Over all benchmarks it's a wash, I don't think we need to investigate further. @rustbot label: +perf-regression-triaged |

Successful merges:
Iterator::last#150658 (Clarify panic conditions inIterator::last)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup