-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Move variant_size_differences out of trans #34755
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
r? @eddyb (I'm so out of date with trans nowadays) |
let lvlsrc = cx.lints.get_level_source(lint_id); | ||
match lvlsrc { | ||
(lvl, _) if lvl != Allow => { | ||
cx.node_levels.borrow_mut() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anything else use node_levels
? Can it be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like it, I'll get rid of this then 🎉
r=me with comments answered/resolved. |
No need to store all sizes in a vector
Presumably, this ICEs when translating an inlined item from another crate. There shouldn't be a need to track dependencies in that case.
Comments addressed. The last commit fixes a bug where I tried to register a trans task for items from other crates (should also fix Travis). Am I correct in assuming that this doesn't need any dependency tracking? |
@bors r+ |
📌 Commit 37d5c06 has been approved by |
⌛ Testing commit 37d5c06 with merge 278c803... |
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
Apparently trans dep tracking was only supposed to be used for items, not impl items? The failure happens because I'm trying to register reads on an impl item (a Should trans dependencies of methods not get tracked in the dep graph? |
Yes, at the moment only track things at the HIR item level, which has the somewhat surprising consequence that we do not track single methods, only entire impls. This will probably change at some point. I'll have a closer at the dependency tracking side of this PR shortly. |
This last commit looks good to me! |
...and Travis is happy, too! |
@bors r+ |
📌 Commit fd2b65e has been approved by |
🎉 |
Also enhances the error message a bit, fixes #30505 on the way, and adds
a test (which was missing).
Closes #34018