Add regression test for #152893 (EII foreign item sig ICE)#154786
Add regression test for #152893 (EII foreign item sig ICE)#154786Herrtian wants to merge 1 commit intorust-lang:mainfrom
Conversation
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.
|
r? @davidtwco rustbot has assigned @davidtwco. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
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. |
|
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. |
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.rsCloses #152893