Skip to content

Commit 50e2795

Browse files
committed
remove out-of-date fixme
1 parent 31c269a commit 50e2795

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compiler/rustc_passes/src/diagnostic_items.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ fn collect_item(tcx: TyCtxt<'_>, items: &mut DiagnosticItems, name: Symbol, item
4545
Some(span) => tcx.sess.emit_err(DuplicateDiagnosticItem { span, name }),
4646
None => tcx.sess.emit_err(DuplicateDiagnosticItemInCrate {
4747
span: orig_span,
48-
// FIXME: We should not provide `name` to `orig_crate_name`. How do you create a blank/empty symbol?
4948
orig_crate_name: orig_crate_name.unwrap_or(Empty),
5049
have_orig_crate_name: orig_crate_name.map(|_| ()),
5150
crate_name: tcx.crate_name(item_def_id.krate),
@@ -59,7 +58,11 @@ fn collect_item(tcx: TyCtxt<'_>, items: &mut DiagnosticItems, name: Symbol, item
5958
/// Extract the first `rustc_diagnostic_item = "$name"` out of a list of attributes.
6059
fn extract(attrs: &[ast::Attribute]) -> Option<Symbol> {
6160
attrs.iter().find_map(|attr| {
62-
if attr.has_name(sym::rustc_diagnostic_item) { attr.value_str() } else { None }
61+
if attr.has_name(sym::rustc_diagnostic_item) {
62+
attr.value_str()
63+
} else {
64+
None
65+
}
6366
})
6467
}
6568

0 commit comments

Comments
 (0)