mirror of
https://github.com/aphrody-labs/cef-rs.git
synced 2026-10-13 21:06:46 +00:00
chore(deps): update syn to v3
* Update Rust crate syn to v3 * Fix syn v3 API compatibility in update-bindings/src/parse_tree.rs * fix: run cargo fmt to fix formatting in parse_tree.rs --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
b7d68d071a
commit
a001794ac9
2 files changed
+8
-5
No files matched your search
+1
-1
@@ -53,7 +53,7 @@ regex = "1"
|
||||
semver = "1"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
syn = { version = "2", features = ["full"] }
|
||||
syn = { version = "3", features = ["full"] }
|
||||
thiserror = "2"
|
||||
toml_edit = "0.25"
|
||||
tracing = "0.1"
|
||||
|
||||
@@ -1299,6 +1299,7 @@ impl<'a> TryFrom<&'a syn::Field> for SignatureRef<'a> {
|
||||
let syn::Type::Path(syn::TypePath {
|
||||
qself: None,
|
||||
path: syn::Path { segments, .. },
|
||||
..
|
||||
}) = &value.ty
|
||||
else {
|
||||
return Err(Unrecognized::FieldType);
|
||||
@@ -1341,7 +1342,7 @@ impl<'a> TryFrom<&'a syn::Field> for SignatureRef<'a> {
|
||||
// See if the Option<T> type is a function pointer
|
||||
let mut args = args.iter();
|
||||
let (
|
||||
Some(syn::GenericArgument::Type(syn::Type::BareFn(syn::TypeBareFn {
|
||||
Some(syn::GenericArgument::Type(syn::Type::FnPtr(syn::TypeFnPtr {
|
||||
unsafety: Some(_),
|
||||
abi: Some(syn::Abi {
|
||||
name: Some(abi), ..
|
||||
@@ -1778,7 +1779,9 @@ impl ParseTree<'_> {
|
||||
|
||||
fn resolve_type_aliases(&self, ty: &syn::Type) -> proc_macro2::TokenStream {
|
||||
match ty {
|
||||
syn::Type::Path(syn::TypePath { qself: None, path }) => {
|
||||
syn::Type::Path(syn::TypePath {
|
||||
qself: None, path, ..
|
||||
}) => {
|
||||
let ty = path.to_token_stream().to_string();
|
||||
if is_custom_string_userfree_alias(ty.as_str()) {
|
||||
path.to_token_stream()
|
||||
@@ -1811,10 +1814,10 @@ impl ParseTree<'_> {
|
||||
quote! { [#elem] }
|
||||
}
|
||||
syn::Type::Ptr(syn::TypePtr {
|
||||
const_token, elem, ..
|
||||
mutability, elem, ..
|
||||
}) => {
|
||||
let elem = self.resolve_type_aliases(elem.as_ref());
|
||||
if const_token.is_some() {
|
||||
if matches!(mutability, syn::PointerMutability::Const(_)) {
|
||||
quote! { *const #elem }
|
||||
} else {
|
||||
quote! { *mut #elem }
|
||||
|
||||
Reference in new issue
Block a user