-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate span
info on-demand
#80339
Conversation
This comment has been minimized.
This comment has been minimized.
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
The failure is strange - it looks like the file |
that did not help :( |
This comment has been minimized.
This comment has been minimized.
5d3d456
to
30d2b24
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Box Item::Attributes This reduces the size of Item from 128 to 40 bytes. I think this is as small as it needs to get 🎉 Builds on rust-lang#80339 and should not be merged before. r? `@GuillaumeGomez`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Up to -1.2% in instruction counts on many of the -doc benchmarks. Max-rss looks like noise. @bors r=GuillaumeGomez |
📌 Commit 63a08e6d29463892a0dbdb828aa193454e7c79d8 has been approved by |
Less than what I was hoping for but still great! |
This comment has been minimized.
This comment has been minimized.
The only bit failing was the module, so change that before removing the `span` field.
- Remove `span` field, adding `Item::span()` instead - Special-case `Impl` and `Module` items - Use dummy spans for primitive items
@bors r=GuillaumeGomez |
📌 Commit ba36142 has been approved by |
☀️ Test successful - checks-actions |
attr_span
for common reused functionSpan
s onItem
directly; calculate them on demand insteadyou use inner or outer attributes
source()
know that it should use a dummy span instead of the span ofthe crate.
This shrinks
Item
from 48 to 40 bytes.Helps with #76382.