Use def_key in tcx.item_name
when possible.
This commit is contained in:
parent
b5dfa6a78d
commit
f89d64d7aa
10 changed files with 41 additions and 42 deletions
|
@ -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),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue