1
Fork 0

Rollup merge of #119869 - oli-obk:track_errors2, r=matthewjasper

replace `track_errors` usages with bubbling up `ErrorGuaranteed`

more of the same as https://github.com/rust-lang/rust/pull/117449 (removing `track_errors`)
This commit is contained in:
Matthias Krüger 2024-01-18 20:56:20 +01:00 committed by GitHub
commit fa52edaa51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 342 additions and 192 deletions

View file

@ -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 => {

View file

@ -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