Uh oh!
There was an error while loading. Please reload this page.
More thread-safety changes - #49390
Conversation
michaelwoerister
commented
Mar 27, 2018
@rust-lang/compiler Does anybody know what |
It's a hack! But it's used. |
Zoxc
commented
Mar 28, 2018
@petrochenkov Why do we keep the AST around in the token stream though? It seems more correct to use the original TokenStream instead of relying on an lossy AST -> TokenStream transformation |
petrochenkov
commented
Mar 28, 2018
Who knows. |
shepmaster
commented
Apr 7, 2018
Ping from triage, @michaelwoerister ! |
| pub fn intern_inlined_body(&self, def_id: DefId, body: Body) -> &'hir Body { | ||
| let mut inlined_bodies = self.inlined_bodies.borrow_mut(); | ||
| if let Some(&b) = inlined_bodies.get(&def_id) { | ||
| debug_assert_eq!(&body, b); |
There was a problem hiding this comment.
How can this condition hold? body is on the stack and b is in the arena. Am I overlooking something?
There was a problem hiding this comment.
This isn't a pointer comparison. This check ensures that we always give the same body for the same def_id to intern_inlined_body.
There was a problem hiding this comment.
Oh, you're right of course :)
michaelwoerister
commented
Apr 9, 2018
@Zoxc, looks good to me except for |
michaelwoerister
commented
Apr 10, 2018
@bors r+ |
bors
commented
Apr 10, 2018
📌 Commit 1e3f638 has been approved by |
bors
commented
Apr 10, 2018
More thread-safety changes r? @michaelwoerister
bors
commented
Apr 10, 2018
☀️ Test successful - status-appveyor, status-travis |
r? @michaelwoerister