Stream: t-compiler/help

Topic: GlobalCtxt::enter_local a nop?


bjorn3 (Jun 28 2020 at 09:29, on Zulip):

Does GlobalCtxt::enter_local do anything anymore? It sets a new ImplicitCtxtwhile only "changing" tcx in TLS when an existing already exists. TyCtxt only has a single field (gcx) and with_related_context checks that the passed tcx.gcx matches the tcx.gcx of the TLS ImplicitCtxt. Also the documentation of the relevant methods are outdated, as they still talk about an arena being passed in.

https://github.com/rust-lang/rust/blob/0c04344d86f9598f20d9ec86fe87ea2a5d6ff8e6/src/librustc_middle/ty/context.rs#L1560-L1575
https://github.com/rust-lang/rust/blob/0c04344d86f9598f20d9ec86fe87ea2a5d6ff8e6/src/librustc_middle/ty/context.rs#L1825

Matthew Jasper (Jun 28 2020 at 09:31, on Zulip):

It's a nop

bjorn3 (Jun 28 2020 at 09:32, on Zulip):

I will remove it then.

bjorn3 (Jun 28 2020 at 09:47, on Zulip):

#73833

Last update: Sep 28 2020 at 14:15UTC