From 327eac8b4b00bf369ca89eca6e051ad9973b1d18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 18:02:43 +0000 Subject: [PATCH 1/3] build(deps): bump syn from 2.0.118 to 3.0.2 Bumps [syn](https://github.com/dtolnay/syn) from 2.0.118 to 3.0.2. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.118...3.0.2) --- updated-dependencies: - dependency-name: syn dependency-version: 3.0.2 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 24 ++++++++++++------------ usdt-attr-macro/Cargo.toml | 2 +- usdt-impl/Cargo.toml | 2 +- usdt-macro/Cargo.toml | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dfcfc444..8b850a4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -431,7 +431,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -601,7 +601,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.118", + "syn 2.0.119", "unicode-ident", ] @@ -637,7 +637,7 @@ checksum = "22fc4f90c27b57691bbaf11d8ecc7cfbfe98a4da6dbe60226115d322aa80c06e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -707,7 +707,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -762,9 +762,9 @@ dependencies = [ [[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", @@ -872,7 +872,7 @@ checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -980,7 +980,7 @@ dependencies = [ "quote", "rstest", "serde_tokenstream", - "syn 2.0.118", + "syn 3.0.2", "usdt-impl", ] @@ -996,7 +996,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.118", + "syn 3.0.2", "thiserror", "thread-id", ] @@ -1009,7 +1009,7 @@ dependencies = [ "proc-macro2", "quote", "serde_tokenstream", - "syn 2.0.118", + "syn 3.0.2", "usdt-impl", ] @@ -1253,7 +1253,7 @@ checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] diff --git a/usdt-attr-macro/Cargo.toml b/usdt-attr-macro/Cargo.toml index f0f7afd7..3b7dec49 100644 --- a/usdt-attr-macro/Cargo.toml +++ b/usdt-attr-macro/Cargo.toml @@ -13,7 +13,7 @@ proc-macro = true dtrace-parser = { path = "../dtrace-parser", version = "=0.3.0" } proc-macro2 = "1" serde_tokenstream = "0.2" -syn = { version = "2", features = ["full"] } +syn = { version = "3", features = ["full"] } quote = "1" usdt-impl = { path = "../usdt-impl", default-features = false, version = "=0.6.0" } diff --git a/usdt-impl/Cargo.toml b/usdt-impl/Cargo.toml index 321594a9..e1b821d4 100644 --- a/usdt-impl/Cargo.toml +++ b/usdt-impl/Cargo.toml @@ -14,7 +14,7 @@ proc-macro2 = "1" quote = "1" serde = { version = "1", features = ["derive"] } serde_json = "1" -syn = { version = "2", features = ["full", "extra-traits"] } +syn = { version = "3", features = ["full", "extra-traits"] } thiserror = "2" thread-id = "5" diff --git a/usdt-macro/Cargo.toml b/usdt-macro/Cargo.toml index 5e735c94..262b0c48 100644 --- a/usdt-macro/Cargo.toml +++ b/usdt-macro/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/oxidecomputer/usdt.git" dtrace-parser = { path = "../dtrace-parser", version = "=0.3.0" } proc-macro2 = "1" serde_tokenstream = "0.2" -syn = { version = "2", features = ["full"] } +syn = { version = "3", features = ["full"] } quote = "1" usdt-impl = { path = "../usdt-impl", default-features = false, version = "=0.6.0" } From 057e5f7d4a1112f192f57c2701d57a87fabe0346 Mon Sep 17 00:00:00 2001 From: Benjamin Naecker Date: Tue, 28 Jul 2026 10:17:43 -0700 Subject: [PATCH 2/3] Move to syn3 --- usdt-attr-macro/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usdt-attr-macro/src/lib.rs b/usdt-attr-macro/src/lib.rs index d5b9fc9f..c458ebc5 100644 --- a/usdt-attr-macro/src/lib.rs +++ b/usdt-attr-macro/src/lib.rs @@ -197,8 +197,11 @@ fn parse_probe_argument( } } syn::Type::Ptr(ref pointer) => { - if pointer.mutability.is_some() { - return Err(syn::Error::new(item.span(), "Pointer types must be const")); + match pointer.mutability { + syn::PointerMutability::Const(_) => {} + syn::PointerMutability::Mut(_) => { + return Err(syn::Error::new(item.span(), "Pointer types must be const")); + } } let ty = &*pointer.elem; if let syn::Type::Path(ref path) = ty { @@ -389,7 +392,7 @@ fn check_probe_function_signature( signature: &syn::Signature, ) -> Result<&syn::Signature, syn::Error> { let to_err = |span, msg| Err(syn::Error::new(span, msg)); - if let Some(item) = signature.unsafety { + if let syn::Safety::Safe(item) = signature.safety { return to_err(item.span(), "Probe functions may not be unsafe"); } if let Some(ref item) = signature.abi { From d93932098b9a4741fff16451d08482cfc9791adc Mon Sep 17 00:00:00 2001 From: Benjamin Naecker Date: Tue, 28 Jul 2026 10:23:51 -0700 Subject: [PATCH 3/3] err on unsafe functions, not safe ones --- usdt-attr-macro/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usdt-attr-macro/src/lib.rs b/usdt-attr-macro/src/lib.rs index c458ebc5..1a19cc2a 100644 --- a/usdt-attr-macro/src/lib.rs +++ b/usdt-attr-macro/src/lib.rs @@ -392,7 +392,7 @@ fn check_probe_function_signature( signature: &syn::Signature, ) -> Result<&syn::Signature, syn::Error> { let to_err = |span, msg| Err(syn::Error::new(span, msg)); - if let syn::Safety::Safe(item) = signature.safety { + if let syn::Safety::Unsafe(item) = signature.safety { return to_err(item.span(), "Probe functions may not be unsafe"); } if let Some(ref item) = signature.abi {