-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 12 pull requests #138267
Rollup of 12 pull requests #138267
Conversation
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
It was added in rust-lang#129523 to enable building on stable when there were `cfg(bootstrap)` occurrences in the crate. But those are gone now, so the section can be removed.
`llvm_enzyme` is now in the extra `check-cfg` list in bootstrap, so it doesn't need to be handled explicitly here.
By naming them in `[workspace.lints.rust]` in the top-level `Cargo.toml`, and then making all `compiler/` crates inherit them with `[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`, because they're a bit different.) The advantages of this over the current approach: - It uses a standard Cargo feature, rather than special handling in bootstrap. So, easier to understand, and less likely to get accidentally broken in the future. - It works for proc macro crates. It's a shame it doesn't work for rustc-specific lints, as the comments explain.
And fix the new errors in the handful of crates that didn't have a `#![warn(unreachable_pub)]`.
(Except for `rustc_codegen_cranelift`.) It's no longer necessary now that `unreachable_pub` is in the workspace lints.
...either as: - methods on LayoutCalculator, for faillible operations; - constructors on LayoutData, for infaillible ones.
Also properly attaches spans on layouts of non-promoted coroutine locals, which slightly improves the error messages for some coroutine tests.
the errors should not be there, this is a bug/missing feature.
this prevents us from trying unsizing coercion in cases like `*const W<dyn T>` -> `*const dyn T`, where it would later cause a compilation error since `W<dyn T>: Sized` and `W<dyn T>: T` do not hold.
yay, I fixed the bug/missing feature :')
This feature was approved for stabilization in rust-lang#129041 (comment) so this change stabilizes it.
This reverts commit ae42814.
…r=compiler-errors Allow `*const W<dyn A> -> *const dyn A` ptr cast Followup of rust-lang#120248 (comment). This PR allows casting pointers from something wrapping a trait object, to the trait object, i.e. `*const W<dyn A> -> *const dyn A` where `W` is `struct W<T: ?Sized>(T);`. r? compiler-errors Fixes rust-lang#128625
Turn order dependent trait objects future incompat warning into a hard error fixes rust-lang#56484 r? ``@ghost`` will FCP when we have a crater result
…-slice, r=dtolnay Stabilize `const_vec_string_slice` This feature was approved for stabilization in rust-lang#129041 (comment) so this change stabilizes it.
tidy: add triagebot checks Validates triagebot.toml to have existing paths: `[mentions."*"]` sections, i.e. ```toml [mentions."compiler/rustc_const_eval/src/"] ``` or ```toml [assign.owners] "/.github/workflows" = ["infra-ci"] ``` or ```toml trigger_files = [ "src/librustdoc/html/static/js/search.js", "tests/rustdoc-js", "tests/rustdoc-js-std", ] ``` Looked at rust-lang#137876 and implemented check.
…mpiler, r=compiler-errors compiler: Use `size_of` from the prelude instead of imported Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. Apply this change across the compiler. These functions were added to all preludes in Rust 1.80. r? ``@compiler-errors``
…youxu Use workspace lints for crates in `compiler/` This is nicer and hopefully less error prone than specifying lints via bootstrap. r? ``@jieyouxu``
…r=workingjubilee Move more layouting logic to `rustc_abi` Move all `LayoutData`-constructing code to `rustc_abi`: - Infaillible operations get a new `LayoutData` constructor method; - Faillible ones get a new method on `LayoutCalculator`.
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
📌 Perf builds for each rolled up PR:
previous master: 4f52199194 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (ed897d5): comparison URL. Overall result: ❌ regressions - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 1.9%, secondary 3.0%)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.
CyclesResults (primary 1.3%, secondary 5.0%)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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 765.417s -> 768.783s (0.44%) |
This was a pretty big regression. Trying: |
Successful merges:
*const W<dyn A> -> *const dyn A
ptr cast #136127 (Allow*const W<dyn A> -> *const dyn A
ptr cast)const_vec_string_slice
#137319 (Stabilizeconst_vec_string_slice
)size_of
from the prelude instead of imported #138040 (compiler: Usesize_of
from the prelude instead of imported)compiler/
#138084 (Use workspace lints for crates incompiler/
)rustc_abi
#138158 (Move more layouting logic torustc_abi
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup