Rollup of 5 pull requests#154802
Conversation
Implement Step for NonZero unsigned integers as discussed in [libs-team#130][1]. [1]: rust-lang/libs-team#130 `step_nonzero_impls` was adapted from `step_integer_impls` and the tests were adapted from the step tests. Signed-off-by: Jalil David Salamé Messina <jalil.salame@gmail.com>
…o downcast to `Session`
LLVM has moved memcmp expansion in the pipeline, resulting in the bcmp call being expanded into loads and register comparisons, which breaks the test. Based on history, I believe the test actually intended validate that these arrays were being passed as pointer arguments, which can be done more directly.
…athanBrouwer Remove more BuiltinLintDiag variants - part 4 Part of rust-lang#153099. I wonder if there will be any impact on perf by doing this code all the time. Gonna check. r? @JonathanBrouwer
llvm: Fix array ABI test to not check equality implementation LLVM has moved memcmp expansion in the pipeline, resulting in the bcmp call being expanded into loads and register comparisons, which breaks the test. See llvm/llvm-project#77370 Based on history, I believe the test actually intended validate that these arrays were being passed as pointer arguments, which can be done more directly. r? @durin42 cc @scottmcm (author of the test being modified) @rustbot label llvm-main
…programmerjake,tgross35 feat(core): impl Step for NonZero<u*> Implement Step for NonZero unsigned integers as discussed in [libs-team#130][1]. [1]: rust-lang/libs-team#130 `step_nonzero_impls` was adapted from `step_integer_impls` and the tests were adapted from the step tests. It seems to compile and pass the tests c: I would like to test the edge cases, specially around overflows. To ensure safe code cannot generate a 0 `NonZero`, but I don't know how to go about it. I would love some feedback on that (and the PR overall). The impls are tagges with `#[unstable(feature = "step_trait", reason = "recently redesigned", issue = "42168")]`. I assumed this was appropriate, but I am not sure.
…ma, r=chenyukang Fix trailing comma in lifetime suggestion for empty angle brackets Fixes rust-lang#154600 When suggesting a lifetime parameter (e.g., `'a`) for a type like `Foo<>` (empty angle brackets), the compiler was incorrectly producing `Foo<'a, >` with a trailing comma. ## Root Cause The `has_existing_params` check used `segment.args` to determine if generic parameters exist. However, for empty angle brackets (`<>`), the parser doesn't create any `args`, so `has_existing_params` was `false` — even though the angle brackets themselves exist. This caused the suggestion logic to skip the comma+space suffix (`"'a, "`), but the insert position was still inside the angle brackets, leading to `Foo<'a, >` instead of `Foo<'a>`. ## Fix Replace the `segment.args`-based check with a source text inspection using `span_to_snippet`. The new logic: 1. Finds the `<` character in the source text 2. Extracts the content between `<` and `>` 3. Checks if that content is non-empty (after trimming whitespace) This correctly identifies `<>` as having no existing parameters, avoiding the trailing comma. ## Test Added `tests/ui/lifetimes/E0106-trailing-comma-in-lifetime-suggestion.rs` covering the specific case of empty angle brackets with lifetime suggestions.
…e, r=RalfJung Fix ICE in read_discriminant for enums with non-contiguous discriminants so, investigation of rust-lang#153758 took a while. it seems, that reverting back to older approach is the best we can do there. > `read_discriminant `ICEs (unwrap on `None`) when an enum's `valid_range` is wider than its set of actual discriminants. this happens for enums with gaps in their discriminant values — e.g. `{0, 2, 3, 4, 5} `has `` valid_range`` 0..=5 `` which includes `1`, or `{i64::MIN, i64::MAX}` has a wrapping range covering everything. [b840338](rust-lang@b840338) commit added a `valid_range` check and replaced the prior `.ok_or_else(|| err_ub!(InvalidTag(...)))` with `.unwrap()`, assuming the range check would guarantee a matching variant. that assumption is wrong for non-contiguous discriminants. my fix restores the fallible lookup, returning `InvalidTag` UB instead of panicking. also it affected crates - **sec1, ntex-mqtt**, when compiled with optimizations, where the `jump_threading` MIR pass constructs constants with tag values inside the `valid_range` but not matching any actual variant.
|
@bors r+ rollup=never p=5 |
|
@bors try jobs=aarch64-msvc-1 |
This comment has been minimized.
This comment has been minimized.
Rollup of 5 pull requests try-job: aarch64-msvc-1
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: 981cf69479 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 981cf69 (parent) -> 0312a55 (this PR) Test differencesShow 55 test diffsStage 1
Stage 2
Additionally, 36 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 0312a55fe4200208170b94bf287ca3cc7ea499ae --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 (0312a55): 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 -1.0%, secondary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -0.4%, secondary -4.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 485.459s -> 489.356s (0.80%) |
|
Regression almost certainly due to #154376 (comment), that perf run matches pretty closely what we see here. I don't think further investigation is warranted, the affected benchmark intentionally stresses the lint system (unused-warnings). |
Successful merges:
r? @ghost
Create a similar rollup