style: Enforce order of any `s_*!` macro call
Before this change, only the order of `s!` was checked.
After, it also checks `s_no_extra_traits!` and `s_paren!`.
Only the order is checked, not the number of calls. This is
required because multiple calls have to be allowed.
@@ -142,6 +142,12 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
} else if line.starts_with("s! {") {
s_macros += 1;
State::Structs
+ } else if line.starts_with("s_no_extra_traits! {") {
+ // multiple macros of this type are allowed
+ State::Structs
+ } else if line.starts_with("s_paren! {") {
+ // multiple macros of this type are allowed
+ State::Structs
} else if line.starts_with("f! {") {
f_macros += 1;
State::FunctionDefinitions
