Make crate_inherent_impls fallible and stop using track_errors
for it
This commit is contained in:
parent
49347ee12d
commit
557b111870
19 changed files with 115 additions and 73 deletions
|
@ -283,7 +283,7 @@ provide! { tcx, def_id, other, cdata,
|
|||
tcx.arena.alloc_from_iter(cdata.get_associated_item_or_field_def_ids(def_id.index))
|
||||
}
|
||||
associated_item => { cdata.get_associated_item(def_id.index, tcx.sess) }
|
||||
inherent_impls => { cdata.get_inherent_implementations_for_type(tcx, def_id.index) }
|
||||
inherent_impls => { Ok(cdata.get_inherent_implementations_for_type(tcx, def_id.index)) }
|
||||
item_attrs => { tcx.arena.alloc_from_iter(cdata.get_item_attrs(def_id.index, tcx.sess)) }
|
||||
is_mir_available => { cdata.is_item_mir_available(def_id.index) }
|
||||
is_ctfe_mir_available => { cdata.is_ctfe_mir_available(def_id.index) }
|
||||
|
@ -328,7 +328,7 @@ provide! { tcx, def_id, other, cdata,
|
|||
traits => { tcx.arena.alloc_from_iter(cdata.get_traits()) }
|
||||
trait_impls_in_crate => { tcx.arena.alloc_from_iter(cdata.get_trait_impls()) }
|
||||
implementations_of_trait => { cdata.get_implementations_of_trait(tcx, other) }
|
||||
crate_incoherent_impls => { cdata.get_incoherent_impls(tcx, other) }
|
||||
crate_incoherent_impls => { Ok(cdata.get_incoherent_impls(tcx, other)) }
|
||||
|
||||
dep_kind => { cdata.dep_kind }
|
||||
module_children => {
|
||||
|
|
|
@ -1485,7 +1485,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||
}
|
||||
|
||||
let inherent_impls = tcx.with_stable_hashing_context(|hcx| {
|
||||
tcx.crate_inherent_impls(()).inherent_impls.to_sorted(&hcx, true)
|
||||
tcx.crate_inherent_impls(()).unwrap().inherent_impls.to_sorted(&hcx, true)
|
||||
});
|
||||
for (def_id, impls) in inherent_impls {
|
||||
record_defaulted_array!(self.tables.inherent_impls[def_id.to_def_id()] <- impls.iter().map(|def_id| {
|
||||
|
@ -2028,7 +2028,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||
empty_proc_macro!(self);
|
||||
let tcx = self.tcx;
|
||||
let all_impls = tcx.with_stable_hashing_context(|hcx| {
|
||||
tcx.crate_inherent_impls(()).incoherent_impls.to_sorted(&hcx, true)
|
||||
tcx.crate_inherent_impls(()).unwrap().incoherent_impls.to_sorted(&hcx, true)
|
||||
});
|
||||
|
||||
let all_impls: Vec<_> = all_impls
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue