Rollup of 17 pull requests - #161959
Conversation
seek(SeekFrom::End(0)) special-cased the offset to the UEFI 0xFFFFFFFFFFFFFFFF "set position to end of file" sentinel, then returned that value as the new stream position. so seek reported u64::MAX instead of the file size, and the default Seek::stream_len did too. compute the offset from the file size in every End case instead.
On Windows `/` is converted to `\`.
Back when hooks were first introduced, the `hooks/mod.rs` file structure would have matched `query/mod.rs`. But the list of queries has since been moved to `queries.rs`, making the hooks file seem awkward in comparison. Since the hooks module has no submodules, making it a top-level file seems simpler.
std: optimise IO error formatting The current OS error formatting logic goes through a bit of trouble (the `format!` macro, temporary allocations and unnecessary copying) to create a `String` for `Formatter::write_str`. It's more efficient and arguably simpler to have the formatting logic write into the `Formatter` directly instead.
…ures, r=nikic attach global target features to module-level assembly fixes rust-lang#80608 fixes rust-lang#127269 At long last, we can forward global target features to LLVM and it will preserve the target features a block of module-level assembly was defined with through LTO. cc @nikic (who made this happen) cc @RalfJung any nasty side-effects we might be overlooking here?
…, r=nia-e implement [u8]::split_ascii_whitespace Had to create a new pr because in the previous one i somehow deleted all the commits with git. Tracking issue: rust-lang#147878 [u8] is also missing normal split_whitespace, but that seems like an issue for another pr.
…er_types, r=BoxyUwU fix ICE in generic_const_parameter_types with inherents tracking issue: rust-lang#137626 relevant PR where the code was added: rust-lang#154853 (fyi ping @lapla-cogito - nws that this was buggy, it's extreeeemely subtle and easy to miss! ❤️ I mean, I also reviewed that PR and missed it too :3 ) discovered when implementing a change that explicitly tracks whether the args for inherent associated consts are in "self form" or "impl form" Following along the test case: - `normalize_canonicalized_inherent_projection` is called with `AliasTermKind::InherentConst` with the generic args being in "self form", i.e. `[ThreeTypes<u8, u16, u32>]` - `traits::normalize_inherent_projection` is called with said alias - it calls `compute_inherent_assoc_term_args`, which does the dance of generating fresh vars for each param in the impl block, equating with the self type, and returning what the fresh vars solved to. This converts from "self args" to "impl args", i.e. `[u8, u16, u32]` - it then calls `const_of_item` and instantiates with `[u8, u16, u32]`. this is correct and good, `const_of_item` expects "impl form" args. - it then calls `push_const_arg_has_type_obligation` - which calls `type_of` and instantiates with `[u8, u16, u32]` to fetch the type of the const, to be able to register a `ConstArgHasType`. this is correct and good, `type_of` expects "impl form" args. - `traits::normalize_inherent_projection` returns, dropping the impl form args it computed - `normalize_canonicalized_inherent_projection` calls `ocx.register_obligations(const_arg_has_type_obligation(...))`, passing `goal`. Remember that `goal` has the original "self args" generic arg format. - `const_arg_has_type_obligation` calls `type_of` and instantiates with `[ThreeTypes<u8, u16, u32>]`. This is no good very bad!! `type_of` expects "impl form" args, not "self form"!! - ICE!! `type parameter T3/#2 (T3/#2/2) out of range when instantiating, args=[ThreeTypes<u8, u16, u32>]` The reason I filed this under `feature(generic_const_parameter_types)` is because for this bug to manifest, `type_of` must return a type that actually references a generic param to be able to trigger an ICE. Otherwise, the buggy incorrect args are silently ignored and compilation continues "fine". The fix: `normalize_inherent_projection` already registers a `ConstArgHasType`. why are we doing it a second time. just delete it. 💀 r? @BoxyUwU
…eyouxu [bootstrap] Don't reverse the order of dylib search path entries The `add_dylib_path` helper function prepends paths to the beginning of the dynamic linker search path, but it reverses their order while doing so. This is surprising and undocumented, and seems to be unexpected by several callers of this function. Particularly, [`rustc_lib_paths`](https://github.com/rust-lang/rust/blob/f7d782a3be46d6bb4b9792fe69a61db389ba1769/src/bootstrap/src/core/builder/mod.rs#L1375) appends the `ci-llvm` path to the list it returns; reversing the order puts `ci-llvm` at a higher priority than the compiler's lib directory. On my system, this currently causes `./x test` to fail (when building the unstable book), because the stage0 compiler is run using CI LLVM instead of stage0 LLVM (which are currently different because stage0 is on LLVM 22 while main is on LLVM 23). Might be worth a try build as this change could potentially cause issues if there is somewhere we depend on this ordering reversal. I checked all the call-sites (and ran `./x test` locally) and I don't think anyone *intentionally* relied on the ordering being reversed. I did find one snippet that concerned me (from rust-lang#144303, cc @Kobzol): https://github.com/rust-lang/rust/blob/f7d782a3be46d6bb4b9792fe69a61db389ba1769/src/bootstrap/src/core/build_steps/test.rs#L437-L448 The comment states we're inserting `builder.rustc_libdir(tested_compiler)` at the highest priority in the search path, but because `add_dylib_path` reversed the ordering, it's actually inserted at the *lowest* priority. I don't know how to reproduce the issue this was supposed to fix, so I can't be sure that this PR doesn't cause a regression. Follow-up to rust-lang#161335. r? @jieyouxu
…, r=nia-e Document PartialOrd behavior for Option<T> where T: PartialOrd Fixes [rust-lang#161746]("rust-lang#161746") This is my first time contributing to Rust and all feedback is welcome. I ran these after making changes. `./x test library/core --stage 1` `./x.py setup` `./x test tidy --bless`
loongarch: support passing `u128`/`i128` to inline assembly Tracking issue: rust-lang#133416 LLVM support: llvm/llvm-project#211464 cc @taiki-e
|
@bors r+ p=5 |
This comment has been minimized.
This comment has been minimized.
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 17fd5b8 (parent) -> 58ae2c4 (this PR) Test differencesShow 1128 test diffsStage 1
Stage 2
Additionally, 1062 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 58ae2c4315128abc40be24b429dfb68bf27510b3 --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 (58ae2c4): comparison URL. Overall result: ❌ regressions - no action needed@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 0.1%, secondary 1.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 474.378s -> 475.447s (0.23%) |
|
📌 Perf builds for each rolled up PR:
parent commit: 17fd5b8a37 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Successful merges:
u128/i128to inline assembly #161865 (loongarch: support passingu128/i128to inline assembly)bool::{ok_or,ok_or_else}(1.98.0) #161914 (Retroactively add relnotes forbool::{ok_or,ok_or_else}(1.98.0))normalize_lexicallyconverts/to\#161924 (Windows: document thatnormalize_lexicallyconverts/to\)rustc_middle/src/hooks/mod.rstohooks.rs#161927 (Changerustc_middle/src/hooks/mod.rstohooks.rs)r? @ghost
Create a similar rollup