Skip to content

Commit cdefdd0

Browse files
committed
Fix a metadata table name.
The table names usually match the name of the corresponding query. The `trait_impl_trait_tys` table is an exception; this commit renames it `collect_return_position_impl_trait_in_trait_tys` to match the query.
1 parent 0d0aaa1 commit cdefdd0

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ provide! { tcx, def_id, other, cdata,
261261
.coerce_unsized_info
262262
.get(cdata, def_id.index)
263263
.map(|lazy| lazy.decode((cdata, tcx)))
264-
.process_decoded(tcx, || panic!("{def_id:?} does not have coerce_unsized_info"))) }
264+
.process_decoded(tcx, || panic!("{def_id:?} does not have coerce_unsized_info")))
265+
}
265266
mir_const_qualif => { table }
266267
rendered_const => { table }
267268
rendered_precise_capturing_args => { table }
@@ -300,10 +301,10 @@ provide! { tcx, def_id, other, cdata,
300301
Ok(cdata
301302
.root
302303
.tables
303-
.trait_impl_trait_tys
304+
.collect_return_position_impl_trait_in_trait_tys
304305
.get(cdata, def_id.index)
305306
.map(|lazy| lazy.decode((cdata, tcx)))
306-
.process_decoded(tcx, || panic!("{def_id:?} does not have trait_impl_trait_tys")))
307+
.process_decoded(tcx, || panic!("{def_id:?} does not have collect_return_position_impl_trait_in_trait_tys")))
307308
}
308309

309310
associated_types_for_impl_traits_in_trait_or_impl => { table }
@@ -695,6 +696,7 @@ impl CrateStore for CStore {
695696
fn as_any(&self) -> &dyn Any {
696697
self
697698
}
699+
698700
fn untracked_as_any(&mut self) -> &mut dyn Any {
699701
self
700702
}

compiler/rustc_metadata/src/rmeta/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
16281628
if tcx.impl_method_has_trait_impl_trait_tys(def_id)
16291629
&& let Ok(table) = self.tcx.collect_return_position_impl_trait_in_trait_tys(def_id)
16301630
{
1631-
record!(self.tables.trait_impl_trait_tys[def_id] <- table);
1631+
record!(self.tables.collect_return_position_impl_trait_in_trait_tys[def_id] <- table);
16321632
}
16331633
if let DefKind::Impl { .. } | DefKind::Trait = def_kind {
16341634
let table = tcx.associated_types_for_impl_traits_in_trait_or_impl(def_id);

compiler/rustc_metadata/src/rmeta/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ define_tables! {
466466
macro_definition: Table<DefIndex, LazyValue<ast::DelimArgs>>,
467467
proc_macro: Table<DefIndex, MacroKind>,
468468
deduced_param_attrs: Table<DefIndex, LazyArray<DeducedParamAttrs>>,
469-
trait_impl_trait_tys: Table<DefIndex, LazyValue<DefIdMap<ty::EarlyBinder<'static, Ty<'static>>>>>,
469+
collect_return_position_impl_trait_in_trait_tys: Table<DefIndex, LazyValue<DefIdMap<ty::EarlyBinder<'static, Ty<'static>>>>>,
470470
doc_link_resolutions: Table<DefIndex, LazyValue<DocLinkResMap>>,
471471
doc_link_traits_in_scope: Table<DefIndex, LazyArray<DefId>>,
472472
assumed_wf_types_for_rpitit: Table<DefIndex, LazyArray<(Ty<'static>, Span)>>,

0 commit comments

Comments
 (0)