Skip to content

Commit 5180632

Browse files
Do not error if there are duplicated doc attributes
1 parent 2bc2a0d commit 5180632

File tree

1 file changed

+8
-4
lines changed
  • compiler/rustc_attr_parsing/src/attributes

1 file changed

+8
-4
lines changed

compiler/rustc_attr_parsing/src/attributes/doc.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,14 @@ impl DocParser {
358358
return;
359359
}
360360

361-
if self.attribute.$ident.is_some() {
362-
cx.duplicate_key(path.span(), path.word_sym().unwrap());
363-
return;
364-
}
361+
// FIXME: It's errorring when the attribute is passed multiple times on the command
362+
// line.
363+
// The right fix for this would be to only check this rule if the attribute is
364+
// not set on the command line but directly in the code.
365+
// if self.attribute.$ident.is_some() {
366+
// cx.duplicate_key(path.span(), path.word_sym().unwrap());
367+
// return;
368+
// }
365369

366370
self.attribute.$ident = Some(path.span());
367371
}};

0 commit comments

Comments
 (0)