Conversation
The full paths are annoying me, especially when there are also some short paths also present. I allow the "well-known" qualifiers (`ty::`, `mir::`, `hir::`, `thir::`) to be used and fully import all other names. This results in a lot of reordering due to the alphabetical order requirement.
The rationale is that doing `Erasable` impls via the macro is preferable because the type in the `size_of` is the same as the impl type. In contrast, for the hand-written ones the type in the `size_of` is a de-genericized version of the impl type, which is a bit odd and only works for pointer types. So the hand-written ones should only be used if they covers many cases, and the remaining ones do. (The removed hand-written impls are replaced with at most eight macro entries. The remaining hand-written impls cover dozens and dozens of cases.)
|
☔ The latest upstream changes (presumably #154916) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Both changes seem questionable to me. In the first commit, I'd rather normalize to absolute paths (this approach is used in other similar lists like In the second commit I asked myself whether I'd approve a change doing the opposite thing (introducing generic trait impls instead of filling the lists manually), and I think I certainly would. |
This PR moves more of the hand-written
Erasableimpls into theimpl_erasable_for_types_with_no_type_params!macro. A follow-up to #154351. Details in individual commits.r? @petrochenkov