Skip to content

Commit 9a7955b

Browse files
Remove usage of name_or_empty
1 parent 6298327 commit 9a7955b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_passes/src/check_attr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
13181318
}
13191319
MetaItemKind::List(list) => {
13201320
for item in list {
1321-
let attr_name = item.name_or_empty();
1321+
let Some(attr_name) = item.name() else { continue };
13221322
if attr_name != sym::hide && attr_name != sym::show {
13231323
self.tcx.emit_node_span_lint(
13241324
INVALID_DOC_ATTRIBUTES,

0 commit comments

Comments
 (0)