Rollup of 4 pull requests#155599
Conversation
In cg_gcc ModuleBuffer already only contains a path anyway. And for moving LTO into -Zlink-only we will need to serialize MaybeLtoModules. By storing a path cached modules we avoid writing them to the disk a second time during serialization of MaybeLtoModules.
Another interal change that shouldn't impact rustc users. The goal (of this commit and a few afterwards) is to break apart the gigantic visit_type function into more managable and easily-editable bits that focus on specific parts of FFI safety. For now, we break the code specific to enums one side, and structs/unions on the other, into separate visit_? methods
Another interal change that shouldn't impact rustc users. the list of simpler type-based decisions made by `visit_type` are reordered and are given better documentation.
Another interal change that shouldn't impact rustc users. This time, regroup into `visit_indirections` the code dealing with the FFI safety of Boxes, Refs and RawPtrs.
Another interal change that shouldn't impact rustc users. Code called outside of `visit_type` (and callees) is moved inside, by adding new types to properly track the state of a type visitation. - OuterTyKind tracks the knowledge of the type "directly outside of" the one being visited (if we are visiting a struct's field, an array's element, etc) - RootUseFlags tracks the knowledge of how the "original type being visited" is used: static variable, function argument/return, etc.
Modify error message of importing inherent associated items when `#[feature(import_trait_associated_functions)]` is enabled Fixes rust-lang#148009 This PR improves the diagnostic for importing inherent associated items from a struct or union when `#[feature(import_trait_associated_functions)]` (rust-lang#134691) is enabled. Previously, this would result in a "not a module" error. This change provides a more specific error message clarifying that only trait associated items can be imported, while inherent associated items remain ineligible for import. Enums are currently excluded from this change because their variants are valid import targets and require distinct handling.
….2, r=petrochenkov Improperctypes refactor2.2 This is "part 2/3 of 2/3 of 1/2" of the original pull request rust-lang#134697 (refactor plus overhaul of the ImproperCTypes family of lints) (all pulls of this series of pulls are supersets of the previous pulls.) previous pull: rust-lang#155358 next pull: rust-lang#146273 This commit splits the lint's `visit_type` function into multiple functions that focus on specific things: - visit_indirection (references, boxes, raw pointers) - visit_variant_fields (the list of fields of a struct, enum variant, or union) - visit_enum - visit_struct_or_union - visit_type (most "easy" decisions such as labeling `char` unsafe are here) since, during these visits, we often move from an "outer type" to an "inner type" (structs, arrays, pointers, etc...), two structs have been added to track the current state of a visit: - VisitorState tracks the state related to the "original type" being checked (function argument/return, static variable) - OuterTyData tracks the data related to the type "immediately outer to the current visited type" r? petrochenkov (because you asked me to)
Store a PathBuf rather than SerializedModule for cached modules In cg_gcc `ModuleBuffer` already only contains a path anyway. And for moving LTO into `-Zlink-only` we will need to serialize `MaybeLtoModules`. By storing a path cached modules we avoid writing them to the disk a second time during serialization of `MaybeLtoModules`. Some further improvements will require changes to cg_gcc that I would prefer landing in the cg_gcc repo to actually test the LTO changes in CI. Part of rust-lang/compiler-team#908
add warning message when using x fix Fix for issue: rust-lang#155545 Before: <img width="1880" height="329" alt="image" src="https://github.com/user-attachments/assets/b713d940-f229-4c63-8df8-93634f017793" /> After: <img width="1897" height="387" alt="image" src="https://github.com/user-attachments/assets/5bbca701-b319-45ca-9d46-39847c50b6f8" /> Text added ``` WARNING: `x fix` is provided on a best-effort basis and does not support all `cargo fix` options correctly. ```
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: 365515367b 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 3655153 (parent) -> d2f88d4 (this PR) Test differencesShow 7 test diffsStage 1
Stage 2
Additionally, 5 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 d2f88d4b65f64f61293b739bc0c7f97b3a7805a8 --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 (d2f88d4): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (secondary 3.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.0%)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: 490.033s -> 494.08s (0.83%) |
Successful merges:
#[feature(import_trait_associated_functions)]is enabled #152611 (Modify error message of importing inherent associated items when#[feature(import_trait_associated_functions)]is enabled)r? @ghost
Create a similar rollup