Skip to content

Add regression test for #152893 (EII foreign item sig ICE)#154786

Closed
Herrtian wants to merge 1 commit intorust-lang:mainfrom
Herrtian:add-test-152893-eii-ice
Closed

Add regression test for #152893 (EII foreign item sig ICE)#154786
Herrtian wants to merge 1 commit intorust-lang:mainfrom
Herrtian:add-test-152893-eii-ice

Conversation

@Herrtian
Copy link
Copy Markdown

@Herrtian Herrtian commented Apr 3, 2026

Summary

Adds a regression test for #152893.

Using #[eii] on a function that shadows a struct name used to cause an ICE with "foreign item sig". The compiler now correctly reports a name redefinition error (E0428) without crashing.

Test

tests/ui/eii/ice-foreign-item-sig-152893.rs

Closes #152893

This code used to ICE with "foreign item sig" when using `#[eii]`
on a function that shadows a struct name. The compiler now correctly
reports a name redefinition error without crashing.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 3, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 3, 2026

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 10 candidates

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 3, 2026

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@jieyouxu
Copy link
Copy Markdown
Member

jieyouxu commented Apr 4, 2026

Hi, you've opened 10 PRs in very quick succession, and looking at the PR descriptions and some of the tests, I have some doubts regarding if the contributions are adaqutely self-reviewed. Recently, we have seen waves of automated contributions that are not adequately self-reviewed, which is why we are being more cautious.

In my capacity as a venue moderator, I am requesting that you respond to reviewer questions to

I am hereby placing a temporary embargo on creation of new PRs from you before the PRs mentioned above are responded to, and the reviewers develop more confidence that you are self-reviewing and understand your contributions. The temporary embargo will be lifted if the reviewers have sufficient confidence in your contributions.

Before the temporary embargo is lifted, any further PRs from your account will be closed. If new PRs continue to be raised from your account before so, further moderation action may be applied.

I am closing and locking this PR before the review discussions in the PRs linked above are settled and the temporary embargo lifted. If the temporary embargo is lifted, I will unlock and reopen this PR.

@jieyouxu jieyouxu closed this Apr 4, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 4, 2026
@lqd
Copy link
Copy Markdown
Member

lqd commented Apr 4, 2026

As mentioned in the issue, this test is so close to https://github.com/rust-lang/rust/blob/main/tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs that it should probably be added there anyways. This PR wouldn’t land as-is IMO anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

[ICE]: foreign item sig

5 participants