Stream: t-compiler/help

Topic: missing specialization


lcnr (Jul 06 2020 at 22:12, on Zulip):

While implementing https://github.com/rust-lang/rust/pull/74113 I had to revert part of https://github.com/rust-lang/rust/pull/70674
which ended up causing the following ICE:

thread 'rustc' panicked at 'missing specialization: `<rustc_middle::ty::query::on_disk_cache::CacheDecoder as SpecializedDecoder<&rustc_middle::mir::Body>>::specialized_decode` not overridden', /home/lcnr/rust4/src/libstd/macros.rs:16:9
lcnr (Jul 06 2020 at 22:13, on Zulip):

Afaict UseSpecializedDecode is not implemented for &'tcx Body, so I can't really tell where this ICE is coming from/what I have to do here

Matthew Jasper (Jul 06 2020 at 22:13, on Zulip):

UseSpecializedDecode is implemented for &T.

lcnr (Jul 06 2020 at 22:15, on Zulip):

I still don't know what I missed from #70674 though :/ Do we now have to manually implement SpecializedDecodable for arena allocated structs?

Matthew Jasper (Jul 06 2020 at 22:17, on Zulip):

You need to add decode in the macro in rustc_middle::arena

lcnr (Jul 06 2020 at 22:17, on Zulip):

Thanks :heart:

Last update: Sep 27 2020 at 14:30UTC