Restrict EII declarations to functions at lowering time#152384
Restrict EII declarations to functions at lowering time#152384enthropy7 wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
rustbot has assigned @petrochenkov. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
0ba99f1 to
d2f08a3
Compare
|
previously I tightened |
|
Reminder, once the PR becomes ready for a review, use |
|
r? me I'll look at this tomorrow morning but don't merge anything similar to this pr until I did |
|
I agree with petrochenkov, this has to be solved using PathSource @enthropy7 @rustbot author |
d2f08a3 to
2f52ca9
Compare
|
Moved EII declaration target validation from also updated tests |
2f52ca9 to
6e6d79e
Compare
This comment has been minimized.
This comment has been minimized.
6e6d79e to
76d908b
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready rebased onto latest main. updated |
This comment has been minimized.
This comment has been minimized.
76d908b to
f939ce3
Compare
This comment has been minimized.
This comment has been minimized.
f939ce3 to
5961ba1
Compare
We tighten EII declaration resolution so that
lower_path_simple_eiionly accepts function‑like items (Fn, AssocFn, Ctor(_, Fn)) as valid EII targets. If name resolution points at something else (like a const with the same name), we now emit a direct error (“externally implementable items must refer to a function”) at the declaration site, which prevents badDefIdsfrom ever reachingcompare_eii_function_typesand turning into an ICEthis is more robust and root-cause oriented fix to #152337 issue and an alternate of my more simple PR #152365
test included