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 |
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