binds can only appear once in the argument list

This commit is contained in:
Jorge Aparicio 2019-02-23 22:38:10 +01:00
parent e167af01f0
commit 2fd6ae69d1

View file

@ -973,6 +973,13 @@ fn parse_args(
let ident_s = ident.to_string(); let ident_s = ident.to_string();
match &*ident_s { match &*ident_s {
"binds" if accepts_binds => { "binds" if accepts_binds => {
if binds.is_some() {
return Err(parse::Error::new(
ident.span(),
"argument appears more than once",
));
}
// #ident // #ident
let ident = content.parse()?; let ident = content.parse()?;