Rollup of 9 pull requests#153086
Open
JonathanBrouwer wants to merge 26 commits intorust-lang:mainfrom
Open
Conversation
…t_abi for ABI determination Currently on PowerPC64 targets, llvm_abiname and target_abi will be the same unless we're on AIX. Since llvm_abiname is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than target_abi. All PowerPC64 targets set both llvm_abiname and target_abi to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.
Previously this was not correctly implemented. Each funclet may need its own terminate block, so this changes the `terminate_block` into a `terminate_blocks` `IndexVec` which can have a terminate_block for each funclet. We key on the first basic block of the funclet -- in particular, this is the start block for the old case of the top level terminate function. Rather than using a catchswitch/catchpad pair, I used a cleanuppad. The reason for the pair is to avoid catching foreign exceptions on MSVC. On wasm, it seems that the catchswitch/catchpad pair is optimized back into a single cleanuppad and a catch_all instruction is emitted which will catch foreign exceptions. Because the new logic is only used on wasm, it seemed better to take the simpler approach seeing as they do the same thing.
- Hide common linker output behind `linker-info` - Add tests - Account for different capitalization on windows-gnu when removing "warning" prefix - Add some more comments - Add macOS deployment-target test - Ignore linker warnings from trying to statically link glibc I don't know what's going on in `nofile-limit.rs` but I want no part of it. - Use a fake linker so tests are platform-independent
It's an incomplete feature anyway, it's ok for it to be broken.
This reverts commit 2257ffc. Let's land all the intermediate work before we try to make this apply everywhere.
All callers of `is_ty_must_use()`, recursive or not, pass `span` as equal to `expr.span` alongside `expr`. The `span` parameter can be safely removed.
The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`. The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints: - `disallowed_macros` - `disallowed_methods` - `disallowed_names` - `disallowed_script_idents` - `disallowed_types` The `pass_by_value` part of the name aligns with the following clippy lints: - `needless_pass_by_value` - `needless_pass_by_ref_mut` - `trivially_copy_pass_by_ref` - `large_types_passed_by_value` (less so)
It has a single use and doesn't provide any real value. Removing it allows the removal of two `for<'tcx>` qualifiers.
`QuerySystem` has two function pointers: `encode_query_results` and `try_mark_green`. These exist so that `rustc_middle` can call functions from upstream crates. But we have a more general mechanism for that: hooks. So this commit converts these two cases into hooks.
spliit out `linker-info` from `linker-messages` *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/149937)* Helps with rust-lang#136096.
Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup Previously this was not correctly implemented. Each funclet may need its own terminate block, so this changes the `terminate_block` into a `terminate_blocks` `IndexVec` which can have a terminate_block for each funclet. We key on the first basic block of the funclet -- in particular, this is the start block for the old case of the top level terminate function. I also fixed the `terminate` handler to not be invoked when a foreign exception is raised, mimicking the behavior from msvc. On wasm, in order to avoid generating a `catch_all` we need to call `llvm.wasm.get.exception` and `llvm.wasm.get.ehselector`.
…ame, r=RalfJung rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`. All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change. Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)). r? @RalfJung
mGCA: Lower negated literals directly and reject non-integer negations follow up rust-lang#152001 resolve: rust-lang#152246 r? BoxyUwU
…etrochenkov Remove `QuerySystemFns` Two small query-related cleanups. r? petrochenkov
…od, r=madsmtm deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls The `Eq::assert_receiver_is_total_eq` method is purely meant as an implementation detail by `#[derive(Eq)]` to add checks that all fields of the type the derive is applied to also implement `Eq`. The method is already `#[doc(hidden)]` and has a comment saying `// This should never be implemented by hand.`. Unfortunately, it has been stable since 1.0 and there are some cases on GitHub (https://github.com/search?q=assert_receiver_is_total_eq&type=code) where people have implemented this method manually, sometimes even with actual code in the method body (example: https://github.com/Shresht7/codecrafters-redis-rust/blob/31f0ec453c504b4ab053a7b1c3ff548ff36a9db5/src/parser/resp/types.rs#L255). To prevent further confusion from this, this PR is deprecating the method and adds a FCW when it is manually implemented (this is necessary as the deprecation warning is not emitted when the method is implemented, only when it is called). This is similar to what was previously done with the `soft_unstable` lint (rust-lang#64266). See also rust-lang/libs-team#704.
…, r=Urgau Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`. The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`. The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints: - `disallowed_macros` - `disallowed_methods` - `disallowed_names` - `disallowed_script_idents` - `disallowed_types` The `pass_by_value` part of the name aligns with the following clippy lints: - `needless_pass_by_value` - `needless_pass_by_ref_mut` - `trivially_copy_pass_by_ref` - `large_types_passed_by_value` (less so) r? @Urgau
…-parameter, r=petrochenkov `is_ty_must_use`: do not require a `span` argument All callers of `is_ty_must_use()`, recursive or not, pass `span` as equal to `expr.span` alongside `expr`. The `span` parameter can be safely removed.
Update books ## rust-lang/reference 4 commits in 442cbef9105662887d5eae2882ca551f3726bf28..50a1075e879be75aeec436252c84eef0fad489f4 2026-02-25 00:55:28 UTC to 2026-02-24 17:09:35 UTC - Fix formatting of markdown grammar with cut (rust-lang/reference#2183) - Add support for named repeat ranges (rust-lang/reference#2181) - paths: align singular/plural in `paths.canonical.intro` (rust-lang/reference#2142) - `cfg_select!` macro (rust-lang/reference#2103)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
linker-infofromlinker-messages#149937 (spliit outlinker-infofromlinker-messages)panic_in_cleanupif panic occurs in cleanup #151771 (Fix: On wasm targets, callpanic_in_cleanupif panic occurs in cleanup)QuerySystemFns#153078 (RemoveQuerySystemFns)Eq::assert_receiver_is_total_eqand emit FCW on manual impls #149978 (deprecateEq::assert_receiver_is_total_eqand emit FCW on manual impls)rustc::pass_by_valuelint asrustc::disallowed_pass_by_ref. #153029 (Renamerustc::pass_by_valuelint asrustc::disallowed_pass_by_ref.)is_ty_must_use: do not require aspanargument #153063 (is_ty_must_use: do not require aspanargument)r? @ghost
Create a similar rollup