diff --git a/src/macros.rs b/src/macros.rs index 3eded45..8fd0577 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -206,7 +206,9 @@ macro_rules! check_no_children { macro_rules! check_no_attributes { ($elem:ident, $name:tt) => ( - check_no_unknown_attributes!($elem, $name, []); + for _ in $elem.attrs() { + return Err(Error::ParseError(concat!("Unknown attribute in ", $name, " element."))); + } ); }