mirror of
https://github.com/rust-osdev/uefi-rs
synced 2026-08-26 18:26:05 -04:00
Merge pull request #2020 from rust-osdev/push-mwyrzoxoqvqk
uefi-macros: Update to syn-3
This commit is contained in:
commit
e48aecc464
3 changed files with 5 additions and 5 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -1048,7 +1048,7 @@ version = "0.19.0"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
"syn 3.0.3",
|
||||
"trybuild",
|
||||
"uefi",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ proc-macro = true
|
|||
[dependencies]
|
||||
proc-macro2 = "1.0.28"
|
||||
quote = "1.0.9"
|
||||
syn = { version = "2.0.4", features = ["full"] }
|
||||
syn = { version = "3.0.0", features = ["full"] }
|
||||
|
||||
[dev-dependencies]
|
||||
trybuild = "1.0.61"
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
|
|||
// Strip any visibility modifiers.
|
||||
f.vis = Visibility::Inherited;
|
||||
|
||||
let unsafety = &f.sig.unsafety;
|
||||
let safety = &f.sig.safety;
|
||||
let fn_ident = &f.sig.ident;
|
||||
let fn_output = &f.sig.output;
|
||||
|
||||
|
|
@ -204,9 +204,9 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
|
|||
// specifically in the function signature is incorrect.
|
||||
const _:
|
||||
// The expected fn pointer type.
|
||||
#unsafety extern "efiapi" fn(#expected_args) -> ::uefi::Status =
|
||||
#safety extern "efiapi" fn(#expected_args) -> ::uefi::Status =
|
||||
// Cast from a fn item to a function pointer.
|
||||
#fn_ident as #unsafety extern "efiapi" fn(#expected_args) #fn_output;
|
||||
#fn_ident as #safety extern "efiapi" fn(#expected_args) #fn_output;
|
||||
};
|
||||
|
||||
let result = quote! {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue