Use identifiers in diagnostics more often
This commit is contained in:
parent
f85c6de552
commit
ac1c6c50f4
21 changed files with 83 additions and 72 deletions
|
@ -197,7 +197,7 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: LocalDefId) {
|
|||
|
||||
fn report_forbidden_specialization(tcx: TyCtxt<'_>, impl_item: DefId, parent_impl: DefId) {
|
||||
let span = tcx.def_span(impl_item);
|
||||
let ident = tcx.item_name(impl_item);
|
||||
let ident = tcx.item_ident(impl_item);
|
||||
|
||||
let err = match tcx.span_of_impl(parent_impl) {
|
||||
Ok(sp) => errors::ImplNotMarkedDefault::Ok { span, ident, ok_label: sp },
|
||||
|
@ -297,7 +297,7 @@ fn default_body_is_unstable(
|
|||
reason: Option<Symbol>,
|
||||
issue: Option<NonZero<u32>>,
|
||||
) {
|
||||
let missing_item_name = tcx.associated_item(item_did).name;
|
||||
let missing_item_name = tcx.item_ident(item_did);
|
||||
let (mut some_note, mut none_note, mut reason_str) = (false, false, String::new());
|
||||
match reason {
|
||||
Some(r) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue