Rollup of 7 pull requests - #161871
Closed
matthiaskrgr wants to merge 18 commits into
Closed
Conversation
... and related machienery
Remove trivial bounds Panic on NaN Make assert messages consistent with field names Add clamp_to coretests Update to fmt style Use target_has_reliable_fN_math Change existing clamp tests to use reliable_math Use reliable_math on doctests too Add #[expect] for NaN check
…lt implementations
Implement clamp_to Implements the revised version of rust-lang#147781. Supersedes rust-lang#147786. Currently I restrict the ClampBounds trait using a second, perma-unstable feature. I don't know if that's the usual way to deal with this kind of traits, I'd be happy to change it if not. ~~I currently define NaN as equal to no bound. This is consistent with `max` and `min`, but is inconsistent with `clamp`, which panics.~~ Changed so that the float versions panic if any bound is NaN, just like `clamp` does.
…ianqk Codegen Overloaded LLVM intrinsics based on their name This is a continuation of rust-lang#140763 - now codegenning overloaded LLVM intrinsics based on their name too. This PR parses the `link_name` of the LLVM intrinsics for the type parameters, partially inverting [`getMangledTypeStr`](https://llvm.org/doxygen/Intrinsics_8cpp_source.html#l00076) and [`getIntrinsicNameImpl`](https://llvm.org/doxygen/Intrinsics_8cpp_source.html#l00165) from LLVM. There is the concern that @nikic's work on LLVM intrinsics might remove the name mangling, but we can just retain that from the Rust side. I mean even though the LLVM IR wouldn't have the mangling, but we can require that the Rust `link_name` argument contain the mangling. This shouldn't break anything, as existing code already has the name mangling. There is also the concern that this cannot parse `TargetExt` types and non-literal struct types, as their mangling contains their name. If needed in future, we can maybe hardcode some known `TargetExt` types, but currently we don't support it. It also kinda helps that Rust currently cannot handle `TargetExt` types. The named struct one is not that big of a problem because courtesy of rust-lang#140763 we can already repack structs. I have not added support of LLVM `byte` type because it is only available in LLVM22, and we support min-LLVM version 20 afaik. I prefer this approach over the `IITDesc` approach highlighted in rust-lang#140763 because this approach allows code like ```rust #[link_name = "llvm.sqrt.v8bf16"] fn foo(a: u16x8) -> u16x8; ``` which pairs up with the autocasts of rust-lang#140763 to give a nice way to call overloaded intrinsics on `bf16`. Also this approach is a lot less work and more resilient to LLVM changes than the `IITDesc` approach. One important change - the parsing doesn't account for LLVM typed pointers, which were deprecated in LLVM15 and removed in LLVM17, so I didn't bother putting support for them. So, I also removed all uses of typed pointers from the tree. r? @dianqk as you might have more of a context on this due to reviewing the last 2 PRs cc @nikic
…ault-functions, r=petrochenkov delegation: add tests fixating behavior of delegating to default trait implementations This PR adds tests for delegation to trait functions that have default implementation, thus fixating current behavior. Part of rust-lang#118212. r? @petrochenkov
…ochenkov reduce perf impact of scalar size checks Attempting to undo the perf regression in rust-lang#161238.
…-type-mismatch-attribution, r=folkertdev Improve type mismatch annotation for lets with block-wrapped initializers Fixes rust-lang#127048
…=JonathanBrouwer Never type after-stabilization cleanup r? @JonathanBrouwer
atomicptr.rs test: remove unused import
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 27, 2026
Rollup of 7 pull requests Successful merges: - #150075 (Implement clamp_to) - #157145 (Codegen Overloaded LLVM intrinsics based on their name) - #161866 (delegation: add tests fixating behavior of delegating to default trait implementations) - #161456 (reduce perf impact of scalar size checks) - #161730 (Improve type mismatch annotation for lets with block-wrapped initializers) - #161828 (Never type after-stabilization cleanup) - #161860 (atomicptr.rs test: remove unused import)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 92f3c19 failed: CI. Failed job:
|
Contributor
|
PR #161456, which is a member of this rollup, was unapproved. |
Member
|
If I had to guess which PR is the cause, it would be #157145, as that messes with intrinsics. |
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:
r? @ghost
Create a similar rollup