Skip to content

Commit

Permalink
deps: update to syn 2.0 (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpdrsn authored Mar 6, 2025
1 parent 238f340 commit 9ddbbd6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion quickcheck_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ proc-macro = true
[dependencies]
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0", features = ["full"] }
syn = { version = "2.0", features = ["full"] }

[dev-dependencies]
quickcheck = { path = "..", version = "1.0.0" }
9 changes: 8 additions & 1 deletion quickcheck_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,21 @@ pub fn quickcheck(_args: TokenStream, input: TokenStream) -> TokenStream {
if errors.is_empty() {
let attrs = mem::take(&mut item_fn.attrs);
let name = &item_fn.sig.ident;
if let Some(variadic) = &item_fn.sig.variadic {
// variadics are just for `extern fn`
errors.push(syn::parse::Error::new(
variadic.span(),
"unsupported variadic",
));
}
let fn_type = syn::TypeBareFn {
lifetimes: None,
unsafety: item_fn.sig.unsafety,
abi: item_fn.sig.abi.clone(),
fn_token: <syn::Token![fn]>::default(),
paren_token: syn::token::Paren::default(),
inputs,
variadic: item_fn.sig.variadic.clone(),
variadic: None,
output: item_fn.sig.output.clone(),
};

Expand Down

0 comments on commit 9ddbbd6

Please sign in to comment.