Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ proc-macro = true

[dependencies]
quote = "1.0.29"
syn = {version = "2", features = ["full", "extra-traits"]}
syn = { version = ">=2,<4", features = ["full", "extra-traits"] }
5 changes: 2 additions & 3 deletions macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn parse_pat_to_table<'a>(
}
}
_ => {
panic!("Unexpected pattern: {:?}. Buggy code ?", pat);
panic!("Unexpected or unsupported pattern: {:?}. Buggy code ?", pat);
}
}
}
Expand All @@ -80,7 +80,7 @@ fn parse_pat_to_table<'a>(
///
/// ## Example
///
/// ```rust
/// ```rust,ignore
/// match_byte! { tokenizer.next_byte_unchecked(),
/// b'a'..b'z' => { ... }
/// b'0'..b'9' => { ... }
Expand Down Expand Up @@ -109,7 +109,6 @@ pub fn match_byte(input: TokenStream) -> TokenStream {
let mut arms = Vec::new();
while !input.is_empty() {
let arm = input.call(syn::Arm::parse)?;
assert!(arm.guard.is_none(), "match_byte doesn't support guards");
assert!(
arm.attrs.is_empty(),
"match_byte doesn't support attributes"
Expand Down
Loading