Skip to content

Commit b65af7c

Browse files
trevynNoratrieb
authored andcommitted
Fix is_diagnostic_item() example
1 parent 957ea06 commit b65af7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diagnostics/diagnostic-items.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ use rustc_span::symbol::sym;
104104
/// `TyCtxt::is_diagnostic_item()`
105105
fn example_1(cx: &LateContext<'_>, ty: Ty<'_>) -> bool {
106106
match ty.kind() {
107-
ty::Adt(adt, _) => cx.tcx.is_diagnostic_item(sym::HashMap, adt.did),
107+
ty::Adt(adt, _) => cx.tcx.is_diagnostic_item(sym::HashMap, adt.did()),
108108
_ => false,
109109
}
110110
}

0 commit comments

Comments
 (0)