Repository navigation
Rollup of 8 pull requests - #163984
Closed
JonathanBrouwer wants to merge 21 commits into
Closed
Rollup of 8 pull requests#163984JonathanBrouwer wants to merge 21 commits into
JonathanBrouwer wants to merge 21 commits into
Conversation
When `TypeVisitable` is implemented but `GenericTypeVisitable` isn't,
the lint (which we'll add soon) recommends adding
`#[derive(GenericTypeVisitable)]`. However, this suggestion is incorrect
for types whose impls ought to be trivial. There, the problem occurs
because the type was added to `TrivialTypeTraversalImpls!` in
`macros.rs`, which added the `TypeVisitable` impl, but wasn't added to
`trivial_impls!` in `generic_visit.rs`, such that the
`GenericTypeVisitable` impl wasn't added.
Imo, the root cause of this problem is that we have two separate macros
for adding trivial impls. So this commit merges them into one, by making
`TrivialTypeTraversalImpls!` add a `GenericTypeVisitable` impl as well.
RE: `Variance`: its `GenericTypeVisitable` impl is now provided by
`TrivialTypeTraversalImpls!`, making the derive unnecessary.
RE: `rustc_hash::FxBuildHasher`: its `GenericTypeVisitable` impl ended
up being removed, because `TypeVisitable` can't be implemented due to it
not implemnting `Debug`. This shouldn't be a problem however, as
`{Generic,}TypeVisitable` should always be implemented in pairs anyway.
I confirmed this by removing the impl from `ra-ap-rustc_type_ir` and
`cargo check`-ing r-a.
The missing impl for arrays was (indirectly) highlighted by the test suite, the rest -- by the `#[deny]`
Carry more information for well-formed obligations coming from expressions.
Reduces the number of errors being emitted by a single unmet `Sized` (or other) bound in method call chains.
…ff, r=bjorn3 Fix COFF renaming of decorated (stdcall/fastcall/vectorcall) exports rust-lang#163188 handled Arm64EC's `#` mangling in `symbol_edit`, but COFF decoration support there was still incomplete: matching against exported symbols only stripped the i686 `_` prefix, so `stdcall`/`fastcall`/`vectorcall` exports were wrongly treated as internal and renamed. `link.rs` already had the full undecoration, so this shares it as `symbol_export::undecorate_coff_symbol`, uses it from both places, and covers the decorated calling conventions in the run-make test. LLM disclosure: Initially, I mistakenly over-scoped the extraction of the shared undecorate logic; the LLM helped me narrow the scope and ultimately pinpoint a single function, and I am currently using the streamlined version it suggested. Additionally, the LLM assisted me in designing the specific test functions within `decorated_lib.rs`. r? @bjorn3
…i-obk
Include enclosing item's context on const errors
On const errors, when they occur on an item that might be relevant, like in an associated const, render the line of the enclosing item in the error:
```
error[E0080]: evaluation panicked: not yet implemented
--> $DIR/ice-normalize-inherent-assoc-const.rs:10:28
|
LL | impl Foo {
LL | const ASSOC_C: usize = todo!();
| ^^^^^^^ evaluation of `Foo::ASSOC_C` failed here
```
```
error[E0080]: writing to ALLOC$ID which is read-only
--> $DIR/issue-100313.rs:18:5
|
LL | const _: () = {
LL | let x = T::<{ &true }>;
LL | x.set_false();
| ^^^^^^^^^^^^^ evaluation of `_` failed inside this call
|
note: inside `T::<&true>::set_false`
--> $DIR/issue-100313.rs:11:13
|
LL | impl<const B: &'static bool> T<B> {
LL | const fn set_false(&self) {
LL | unsafe {
LL | *(B as *const bool as *mut bool) = false;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here
```
Silence redundant failed obligations on the same statement Fix rust-lang#84346, fix rust-lang#105753. On multiple unment obligations in the same method chain, only emit one. On unmet `Sized` obligations on a binding, its type and its init expression, only emit one.
…le, r=JonathanBrouwer Add `rustc::missing_generic_type_visitable` lint Best reviewed commit-by-commit. The CI will probably complain about the TODOs, but I've added them deliberately, as a way to ask questions. r? @JonathanBrouwer cc @rust-lang/rust-analyzer
mips: make `Complex<T>` ABI match GCC tracking issue: rust-lang#154023 The implementation is consistent with GCC and clang 24 (but not clang <= 23). Validated with abi-cafe. r? beetrees
…ke-2-partial, r=oli-obk only make `RustaceansAreAwesome` satisfy trait clauses Fixes rust-lang#163550 but unfortunately partially un-fixes a variant of rust-lang#161621 that hadn't been reported. I have a followup to re-fix that, but I ended up deciding that it would probably be easier to review separately; I'll open a PR for that later. The variant in question: ```rust trait HasAssoc { type Assoc; } trait Parent<T> {} trait Trait where (Self,): HasAssoc<Assoc = str>, Self: Parent<<<(Self,) as HasAssoc>::Assoc as ToOwned>::Owned>, { fn f(&self); //~^ ERROR: the trait bound `<(RustaceansAreAwesome,) as HasAssoc>::Assoc: Clone` is not satisfied //~| NOTE: required for `<(RustaceansAreAwesome,) as HasAssoc>::Assoc` to implement `ToOwned` } ``` This fails to prove `<(RustaceansAreAwesome,) as HasAssoc>::Assoc: Owned` because it can't normalize that alias to `str`. The followup will re-add projections as necessary for this in a hopefully-non-breaking way.
Condense AdtDef lang item checks into one match Trading one hash table lookup for 8 array element accesses. Efficiency wise probably not useful, but the code is nicer imo
…features, r=folkertdev Add `bf16` to arm features A 32bit armv8 target can have support for `bf16` r? folkertdev
Member
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
Rollup of 8 pull requests try-job: dist-various-1 try-job: test-various try-job: test-x86_64-gnu-aux try-job: test-x86_64-msvc-1 try-job: test-aarch64-apple-1 try-job: test-aarch64-apple-2 try-job: test-x86_64-mingw-1 try-job: test-i686-msvc try-job: test-armhf-gnu try-job: test-x86_64-gnu-llvm-22-3
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
PR #163913, which is a member of this rollup, was unapproved. This rollup was thus unapproved. |
Contributor
|
💔 Test for 803a89c failed: CI. Failed jobs:
|
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:
rustc::missing_generic_type_visitablelint #163538 (Addrustc::missing_generic_type_visitablelint)Complex<T>ABI match GCC #163617 (mips: makeComplex<T>ABI match GCC)RustaceansAreAwesomesatisfy trait clauses #163958 (only makeRustaceansAreAwesomesatisfy trait clauses)bf16to arm features #163979 (Addbf16to arm features)Failed merges:
r? @ghost
Create a similar rollup