Fix bad key names in a couple of queries.

Due to a bug, you can currently use `key` within the `desc` block and
it'll just work regardless of what actual key name you specified. A
subsequent commit will fix this, so let's correct the affected queries
first.
This commit is contained in:
Nicholas Nethercote
2026-02-20 16:41:49 +11:00
parent d8b2222b11
commit 46ccd829eb
+2 -2
View File
@@ -589,7 +589,7 @@
}
/// Checks whether a type is representable or infinitely sized
query representability(_: LocalDefId) -> rustc_middle::ty::Representability {
query representability(key: LocalDefId) -> rustc_middle::ty::Representability {
desc { "checking if `{}` is representable", tcx.def_path_str(key) }
// infinitely sized types will cause a cycle
cycle_delay_bug
@@ -600,7 +600,7 @@
}
/// An implementation detail for the `representability` query
query representability_adt_ty(_: Ty<'tcx>) -> rustc_middle::ty::Representability {
query representability_adt_ty(key: Ty<'tcx>) -> rustc_middle::ty::Representability {
desc { "checking if `{}` is representable", key }
cycle_delay_bug
anon