Skip to content

Commit

Permalink
Fix is_diagnostic_item() example
Browse files Browse the repository at this point in the history
  • Loading branch information
trevyn authored and Noratrieb committed Sep 24, 2024
1 parent 957ea06 commit b65af7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diagnostics/diagnostic-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ use rustc_span::symbol::sym;
/// `TyCtxt::is_diagnostic_item()`
fn example_1(cx: &LateContext<'_>, ty: Ty<'_>) -> bool {
match ty.kind() {
ty::Adt(adt, _) => cx.tcx.is_diagnostic_item(sym::HashMap, adt.did),
ty::Adt(adt, _) => cx.tcx.is_diagnostic_item(sym::HashMap, adt.did()),
_ => false,
}
}
Expand Down

0 comments on commit b65af7c

Please sign in to comment.