Skip to content

Rollup of 3 pull requests - #155205

Closed
JonathanBrouwer wants to merge 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-rDBOn2L
Closed

Rollup of 3 pull requests#155205
JonathanBrouwer wants to merge 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-rDBOn2L

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

petrochenkov and others added 18 commits April 8, 2026 14:43
The span location of the last segment in the desugared path is inherited from the star symbol's span
…on body

Instead of the last segment of the delegation path.
`self` is something that introduced by the whole delegation item, not some specific part of it, and the last segment may need to have a different context for path resolution purposes.
delegation: Track more precise spans for glob delegations

The last commit also fixes a macro hygiene issue with `self` in delegations found in rust-lang#154002.
…=jdonszelmann

Implement EII for statics

This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations.

This does not implement defaults for static EIIs yet, I will do that in a followup PR
…ouwer

Improve emission of `UnknownDiagnosticAttribute` lint

This checks features much less than the current implementation. See rust-lang#155155 for context. Minor fixes and comments are added in the second and third commit.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Apr 12, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 12, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6fbb2dd has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 12, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-03-05/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---

failures:

---- [ui] tests/ui/delegation/generics/query-cycle-oom-154169.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/delegation/generics/query-cycle-oom-154169/query-cycle-oom-154169.stderr`
diff of stderr:

52    = help: you might be missing a crate named `to_reuse`
53 
54 error[E0061]: this function takes 0 arguments but 1 argument was supplied
-   --> $DIR/query-cycle-oom-154169.rs:21:12
+   --> $DIR/query-cycle-oom-154169.rs:35:22
56    |
- LL |         fn foo() -> Self::Assoc;
-    |            ^^^
- ...
60 LL |         reuse Trait::* { &self.0 }
-    |                          ------- unexpected argument
+    |                      ^   ------- unexpected argument
62    |
63 note: associated function defined here
64   --> $DIR/query-cycle-oom-154169.rs:21:12

67    |            ^^^
68 help: remove the extra argument
69    |
- LL -         fn foo() -> Self::Assoc;
- LL -
- LL -
- LL -         fn bar(&self) -> u8;
- LL -     }
- LL - 
- LL -     impl Trait for u8 {
- LL -
- LL -         fn bar(&self) -> u8 { 1 }
- LL -     }
- LL - 
- LL -     struct S(u8);
- LL - 
- LL -     impl Trait for S {
84 LL -         reuse Trait::* { &self.0 }
- LL +         fn fo&self.0 }
+ LL +         reuse Trait::&self.0 }
86    |
87 
88 error[E0599]: no method named `foo` found for reference `&()` in the current scope

-   --> $DIR/query-cycle-oom-154169.rs:42:12
---
Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:35:22
-   --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:49:22
+   --> $DIR/query-cycle-oom-154169.rs:35:22
+    |                      ^   ------- unexpected argument
+ LL +         reuse Trait::&self.0 }
+   --> $DIR/query-cycle-oom-154169.rs:49:22
+ LL |         reuse Trait::*;
+    |                      ^ method not found in `&()`


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args delegation/generics/query-cycle-oom-154169.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/delegation/generics/query-cycle-oom-154169" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0107]: missing generics for struct `test_1::S`
##[error]  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:6:32
   |
LL |         fn foo(&self, x: T) -> S { x }
   |                                ^ expected 1 generic argument
   |
note: struct defined here, with 1 generic parameter: `T`
  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:11:12
   |
LL |     struct S<T>(F, T);
   |            ^ -
help: add missing generic argument
   |
LL |         fn foo(&self, x: T) -> S<T> { x }
   |                                 +++

error[E0220]: associated type `Assoc` not found for `Self`
##[error]  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:21:27
   |
LL |         fn foo() -> Self::Assoc;
   |                           ^^^^^ associated type `Assoc` not found

error[E0220]: associated type `Assoc` not found for `Self`
##[error]  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:42:32
   |
LL |         fn foo(&self) -> Self::Assoc<3> { //~ ERROR: associated type `Assoc` not found for `Self`
   |                                ^^^^^ associated type `Assoc` not found

error[E0046]: not all trait items implemented, missing: `foo`
##[error]  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:27:5
   |
LL |         fn foo() -> Self::Assoc;
---

error[E0390]: cannot define inherent `impl` for primitive types
##[error]  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:48:5
   |
LL |     impl () { //~ ERROR: cannot define inherent `impl` for primitive types
   |     ^^^^^^^
   |
   = help: consider using an extension trait instead

error[E0433]: cannot find module or crate `to_reuse` in this scope
##[error]  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:14:15
   |
LL |         reuse to_reuse::foo { &self.0 }
   |               ^^^^^^^^ use of unresolved module or unlinked crate `to_reuse`
   |
   = help: you might be missing a crate named `to_reuse`

error[E0061]: this function takes 0 arguments but 1 argument was supplied
##[error]  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:35:22
   |
LL |         reuse Trait::* { &self.0 }
   |                      ^   ------- unexpected argument
   |
note: associated function defined here
  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:21:12
   |
LL |         fn foo() -> Self::Assoc;
   |            ^^^
help: remove the extra argument
   |
LL -         reuse Trait::* { &self.0 }
LL +         reuse Trait::&self.0 }
   |

error[E0599]: no method named `foo` found for reference `&()` in the current scope
##[error]  --> /checkout/tests/ui/delegation/generics/query-cycle-oom-154169.rs:49:22
   |
LL |         reuse Trait::*;
   |                      ^ method not found in `&()`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `foo`, perhaps you need to implement one of them:
           candidate #1: `test_1::Trait`
           candidate #2: `test_2::Trait`
           candidate #3: `test_3::Trait`

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0046, E0061, E0107, E0220, E0390, E0433, E0599.
For more information about an error, try `rustc --explain E0046`.

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 12, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 12, 2026
@rust-bors

rust-bors Bot commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

PR #154049, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 12, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-rDBOn2L branch August 21, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. rollup A PR which is a rollup T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants