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
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion usdt-attr-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down
9 changes: 6 additions & 3 deletions usdt-attr-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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::Unsafe(item) = signature.safety {
return to_err(item.span(), "Probe functions may not be unsafe");
}
if let Some(ref item) = signature.abi {
Expand Down
2 changes: 1 addition & 1 deletion usdt-impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion usdt-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down
Loading