about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-04-08 23:06:20 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-04-09 10:54:43 +0200
commitf89d64d7aa91f7ba5ca4ffd4eb6ab42cf61b12c0 (patch)
tree22d08eb713a19a1e92df9f41b955f8d454d77011 /compiler/rustc_monomorphize
parentb5dfa6a78df6eb934c353e94cf679af03235d21a (diff)
downloadrust-f89d64d7aa91f7ba5ca4ffd4eb6ab42cf61b12c0.tar.gz
rust-f89d64d7aa91f7ba5ca4ffd4eb6ab42cf61b12c0.zip
Use def_key in `tcx.item_name` when possible.
Diffstat (limited to 'compiler/rustc_monomorphize')
-rw-r--r--compiler/rustc_monomorphize/src/polymorphize.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/polymorphize.rs b/compiler/rustc_monomorphize/src/polymorphize.rs
index 489d513c104..cf13c856a71 100644
--- a/compiler/rustc_monomorphize/src/polymorphize.rs
+++ b/compiler/rustc_monomorphize/src/polymorphize.rs
@@ -201,7 +201,7 @@ fn emit_unused_generic_params_error<'tcx>(
         return;
     }
 
-    let fn_span = match tcx.opt_item_name(def_id) {
+    let fn_span = match tcx.opt_item_ident(def_id) {
         Some(ident) => ident.span,
         _ => tcx.def_span(def_id),
     };