In https://github.com/rust-lang/rust/issues/65983#issuecomment-638352731, @Manish Goregaokar mentioned a 'resolver tree' in
rustc_resolve. Does anyone know what that is? I see a
Resolver that implements
DefIdTree, is that it?
There was also something about 'self-referential arena's which I don't quite understand - is this arenas like the memory allocation strategy? What makes those self-referential?
Partially related - how do I serialize a rustc data structure? I assume it's not as simple as
No the whole issue here is that all the resolution information is stored in an arena, it's not something that's easy to serialize. We need to convert it to a datastructure that _is_ easy to serialize and query, one that _just_ has the list of resolutions for a given module defid.
Ok, and arenas are self-referential because they use indices instead of the data itself?
What's the trait I need to implement?
looks like Decodable and Encodable
I can't even import rustc_serialize :(
error[E0463]: can't find crate for `rustc_serialize` --> src/librustc_resolve/lib.rs:56:1 | 56 | extern crate rustc_serialize; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate