Do not error if there are duplicated doc attributes

This commit is contained in:
Guillaume Gomez 2025-12-11 01:35:28 +01:00
parent 2bc2a0db69
commit 51806323f9

View file

@ -358,10 +358,14 @@ impl DocParser {
return;
}
if self.attribute.$ident.is_some() {
cx.duplicate_key(path.span(), path.word_sym().unwrap());
return;
}
// FIXME: It's errorring when the attribute is passed multiple times on the command
// line.
// The right fix for this would be to only check this rule if the attribute is
// not set on the command line but directly in the code.
// if self.attribute.$ident.is_some() {
// cx.duplicate_key(path.span(), path.word_sym().unwrap());
// return;
// }
self.attribute.$ident = Some(path.span());
}};