This commit is contained in:
lcnr 2022-05-10 12:02:20 +02:00
parent 7cf9f1ab91
commit ebf95836e3

View File

@ -83,7 +83,7 @@ fn collect_item(tcx: TyCtxt<'_>, items: &mut DiagnosticItems, name: Symbol, item
}
}
/// Extract the first `rustc_diagnostic_item = "$name"` out of a list of attributes.p
/// Extract the first `rustc_diagnostic_item = "$name"` out of a list of attributes.
fn extract(attrs: &[ast::Attribute]) -> Option<Symbol> {
attrs.iter().find_map(|attr| {
if attr.has_name(sym::rustc_diagnostic_item) { attr.value_str() } else { None }