diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-04-08 23:06:20 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-04-09 10:54:43 +0200 |
| commit | f89d64d7aa91f7ba5ca4ffd4eb6ab42cf61b12c0 (patch) | |
| tree | 22d08eb713a19a1e92df9f41b955f8d454d77011 /compiler/rustc_middle/src/query | |
| parent | b5dfa6a78df6eb934c353e94cf679af03235d21a (diff) | |
| download | rust-f89d64d7aa91f7ba5ca4ffd4eb6ab42cf61b12c0.tar.gz rust-f89d64d7aa91f7ba5ca4ffd4eb6ab42cf61b12c0.zip | |
Use def_key in `tcx.item_name` when possible.
Diffstat (limited to 'compiler/rustc_middle/src/query')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 89761bf4e27..bbe1d367b77 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -517,10 +517,7 @@ rustc_queries! { /// To avoid cycles within the predicates of a single item we compute /// per-type-parameter predicates for resolving `T::AssocTy`. query type_param_predicates(key: (DefId, LocalDefId, rustc_span::symbol::Ident)) -> ty::GenericPredicates<'tcx> { - desc { |tcx| "computing the bounds for type parameter `{}`", { - let id = tcx.hir().local_def_id_to_hir_id(key.1); - tcx.hir().ty_param_name(id) - }} + desc { |tcx| "computing the bounds for type parameter `{}`", tcx.hir().ty_param_name(key.1) } } query trait_def(key: DefId) -> ty::TraitDef { |
