4

Remove `DefPath` from `Visibility` and calculate it on demand

 3 years ago
source link: https://github.com/rust-lang/rust/pull/80099
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Member

jyn514 commented 17 days ago

edited

Depends on #80090 and should not be merged before. Helps with #79103 and #76382.

cc #80014 (comment) - @nnethercote I figured it out! It was simpler than I expected :)

This brings the size of clean::Visibility down from 40 bytes to 8.

Note that this does not remove clean::Visibility, even though it's now basically the same as ty::Visibility, because the Invsible variant means something different from Inherited and I thought it would be be confusing to merge the two. See the new comments on impl Clean for ty::Visibility for details.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK