-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Remove HIR inlining (now that we don't need it for constant evaluation anymore) #49690
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
Comments
Can somebody point me in the right direction? I tried grepping for HIR inline but didn't find anything conclusive. |
Thanks for taking an interest in this, @wesleywiser! "HIR inlining" means importing pieces of HIR from external crates into the current HIR map. Historically we have done this for everything that needed to be translated in the current crate (most prominently all generic functions) but with MIR the need to do this mostly went away. Constant evaluation was the last thing we needed this for and with MIRI in place now, we should be able to get rid of it. The relevant parts are in the HIR map: rust/src/librustc/hir/map/mod.rs Lines 925 to 933 in 8ae79ef
and in crate metadata encoding: Before you go ahead and do anything though, we should confirm with @oli-obk and @eddyb that we can actually remove it. |
Rustdoc is still using it in |
Oh, now I remember you mentioning that, @oli-obk. Not sure how to deal with that. Maybe implement something simpler especially for rustdoc? |
We could, specifically for constants, create a "rendered" field that just contains the string that rustdoc would expect anyway |
I found that function yesterday and thought that might be what you were referring to. After removing it, the only tests that failed were a few rustdoc tests around the behavior of inlined external items (as you mentioned). The good news is that the rest of the test suite passed, so it's just rustdoc that needs a fix. |
I'd suggest looking at how this is done for function arguments (also only needed by rustdoc): rust/src/librustc_metadata/schema.rs Line 403 in a1c21ed
|
Sounds like the way to go. The |
Thanks! I'll start working on that. |
Great! Thanks, @wesleywiser! |
Remove HIR inlining Fixes #49690 r? @michaelwoerister
…ister Remove HIR inlining Fixes #49690 r? @michaelwoerister
Now that we have MIRI-based constant evaluation, we should be able to remove cross-crate HIR inlining and thus a source of mutability in the HIR map. This is needed for query parallelization.
The text was updated successfully, but these errors were encountered: