diff --git a/Cargo.lock b/Cargo.lock index eb89f25..3614e7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,7 +162,7 @@ dependencies = [ "itertools 0.15.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.2", "unicode-segmentation", ] @@ -174,7 +174,7 @@ dependencies = [ "bluejay-typegen-codegen", "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.2", ] [[package]] @@ -461,7 +461,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -712,7 +712,7 @@ dependencies = [ "quote", "regex-syntax", "rustc_version", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -792,7 +792,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -1031,14 +1031,14 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" dependencies = [ "proc-macro2", "quote", @@ -1232,7 +1232,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", "wasm-bindgen-shared", ] @@ -1349,7 +1349,7 @@ dependencies = [ "heck", "indexmap", "prettyplease", - "syn 2.0.118", + "syn 2.0.119", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -1365,7 +1365,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", "wit-bindgen-core", "wit-bindgen-rust", ] @@ -1430,7 +1430,7 @@ checksum = "0e8bc7269b54418e7aeeef514aa68f8690b8c0489a06b0136e5f57c4c5ccab89" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] diff --git a/bluejay-typegen-codegen/Cargo.toml b/bluejay-typegen-codegen/Cargo.toml index 49e6a90..d368d76 100644 --- a/bluejay-typegen-codegen/Cargo.toml +++ b/bluejay-typegen-codegen/Cargo.toml @@ -13,7 +13,7 @@ description = "Code generation utilities for `bluejay-typegen-macro`" bluejay-core = { workspace = true } bluejay-parser = { workspace = true, features = ["format-errors"] } bluejay-validator = { workspace = true } -syn = { version = "2.0", features = ["full"] } +syn = { version = "3.0", features = ["full"] } quote = "1.0" proc-macro2 = "1.0" convert_case = "0.10" diff --git a/bluejay-typegen-codegen/src/enum_type_definition.rs b/bluejay-typegen-codegen/src/enum_type_definition.rs index 6fde0ce..bf43ad2 100644 --- a/bluejay-typegen-codegen/src/enum_type_definition.rs +++ b/bluejay-typegen-codegen/src/enum_type_definition.rs @@ -60,7 +60,7 @@ impl<'a, S: SchemaDefinition, C: CodeGenerator> EnumTypeDefinitionBuilder<'a, S, .code_generator .additional_impls_for_enum(instance.enum_type_definition) .into_iter() - .map(Into::into), + .map(syn::Item::Impl), ); items diff --git a/bluejay-typegen-codegen/src/executable_definition/executable_enum_builder.rs b/bluejay-typegen-codegen/src/executable_definition/executable_enum_builder.rs index 6e6a639..9ced5f7 100644 --- a/bluejay-typegen-codegen/src/executable_definition/executable_enum_builder.rs +++ b/bluejay-typegen-codegen/src/executable_definition/executable_enum_builder.rs @@ -39,7 +39,7 @@ impl<'a, C: CodeGenerator> ExecutableEnumBuilder<'a, C> { .code_generator .additional_impls_for_executable_enum(instance.executable_enum) .into_iter() - .map(Into::into), + .map(syn::Item::Impl), ); items.extend(instance.nested_module()); diff --git a/bluejay-typegen-codegen/src/executable_definition/executable_struct_builder.rs b/bluejay-typegen-codegen/src/executable_definition/executable_struct_builder.rs index e6acb21..8049e10 100644 --- a/bluejay-typegen-codegen/src/executable_definition/executable_struct_builder.rs +++ b/bluejay-typegen-codegen/src/executable_definition/executable_struct_builder.rs @@ -37,7 +37,7 @@ impl<'a, C: CodeGenerator> ExecutableStructBuilder<'a, C> { .code_generator .additional_impls_for_executable_struct(instance.executable_struct) .into_iter() - .map(Into::into), + .map(syn::Item::Impl), ); items.extend(instance.nested_module()); diff --git a/bluejay-typegen-codegen/src/input_object_type_definition.rs b/bluejay-typegen-codegen/src/input_object_type_definition.rs index fe483a7..40c12cf 100644 --- a/bluejay-typegen-codegen/src/input_object_type_definition.rs +++ b/bluejay-typegen-codegen/src/input_object_type_definition.rs @@ -80,7 +80,7 @@ impl<'a, S: SchemaDefinition, C: CodeGenerator> InputObjectTypeDefinitionBuilder .code_generator() .additional_impls_for_one_of_input_object(self.input_object_type_definition) .into_iter() - .map(Into::into), + .map(syn::Item::Impl), ); items @@ -128,7 +128,7 @@ impl<'a, S: SchemaDefinition, C: CodeGenerator> InputObjectTypeDefinitionBuilder .code_generator() .additional_impls_for_input_object(self.input_object_type_definition) .into_iter() - .map(Into::into), + .map(syn::Item::Impl), ); items diff --git a/bluejay-typegen-codegen/src/lib.rs b/bluejay-typegen-codegen/src/lib.rs index 6c94aa0..a9d4695 100644 --- a/bluejay-typegen-codegen/src/lib.rs +++ b/bluejay-typegen-codegen/src/lib.rs @@ -234,7 +234,7 @@ fn custom_scalar_borrows( pub type #ident #lifetime = #ty; }; if let Some((_, items)) = module.content.as_mut() { - items.push(alias.into()); + items.push(syn::Item::Type(alias)); } custom_scalars.insert( name, @@ -329,7 +329,7 @@ fn process_module_item( )?; module.content = Some((syn::token::Brace::default(), items)); module.attrs = Vec::new(); - Ok(module.into()) + Ok(syn::Item::Mod(module)) } else { Err(syn::Error::new( list.delimiter.span().open(), diff --git a/bluejay-typegen-macro/Cargo.toml b/bluejay-typegen-macro/Cargo.toml index 5862941..6d86b60 100644 --- a/bluejay-typegen-macro/Cargo.toml +++ b/bluejay-typegen-macro/Cargo.toml @@ -14,7 +14,7 @@ description = "Macros for `bluejay-typegen`" [dependencies] bluejay-core = { workspace = true } bluejay-typegen-codegen = { workspace = true } -syn = { version = "2.0", features = ["full"] } +syn = { version = "3.0", features = ["full"] } quote = "1.0" proc-macro2 = "1.0" diff --git a/bluejay-typegen-macro/src/lib.rs b/bluejay-typegen-macro/src/lib.rs index 6ef76ff..a2897c1 100644 --- a/bluejay-typegen-macro/src/lib.rs +++ b/bluejay-typegen-macro/src/lib.rs @@ -125,7 +125,7 @@ impl CodeGenerator for SerdeCodeGenerator { let fields_named: syn::FieldsNamed = parse_quote! { { #(#fields,)* } }; - fields_named.into() + syn::Fields::Named(fields_named) } fn attributes_for_executable_enum(