Only compute specializes query if specialization is enabled in the crate of the specialized impl
This commit is contained in:
parent
1653a2d34a
commit
4b188d9d66
8 changed files with 39 additions and 37 deletions
|
@ -314,6 +314,7 @@ provide! { tcx, def_id, other, cdata,
|
|||
extern_crate => { cdata.extern_crate.map(|c| &*tcx.arena.alloc(c)) }
|
||||
is_no_builtins => { cdata.root.no_builtins }
|
||||
symbol_mangling_version => { cdata.root.symbol_mangling_version }
|
||||
specialization_enabled_in => { cdata.root.specialization_enabled_in }
|
||||
reachable_non_generics => {
|
||||
let reachable_non_generics = tcx
|
||||
.exported_symbols(cdata.cnum)
|
||||
|
|
|
@ -741,6 +741,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||
expn_data,
|
||||
expn_hashes,
|
||||
def_path_hash_map,
|
||||
specialization_enabled_in: tcx.specialization_enabled_in(LOCAL_CRATE),
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
@ -290,6 +290,8 @@ pub(crate) struct CrateRoot {
|
|||
panic_runtime: bool,
|
||||
profiler_runtime: bool,
|
||||
symbol_mangling_version: SymbolManglingVersion,
|
||||
|
||||
specialization_enabled_in: bool,
|
||||
}
|
||||
|
||||
/// On-disk representation of `DefId`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue