Migrate windows-targets to Rust 2024

This commit is contained in:
Eric Huss 2025-02-12 14:59:57 -08:00
parent ba06ce6114
commit b130747e92
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
name = "windows-targets"
description = "A drop-in replacement for the real windows-targets crate for use in std only."
version = "0.0.0"
edition = "2021"
edition = "2024"
[features]
# Enable using raw-dylib for Windows imports.

View File

@ -12,7 +12,7 @@ pub macro link {
($library:literal $abi:literal $($link_name:literal)? $(#[$doc:meta])? fn $($function:tt)*) => (
#[cfg_attr(not(target_arch = "x86"), link(name = $library, kind = "raw-dylib", modifiers = "+verbatim"))]
#[cfg_attr(target_arch = "x86", link(name = $library, kind = "raw-dylib", modifiers = "+verbatim", import_name_type = "undecorated"))]
extern $abi {
unsafe extern $abi {
$(#[link_name=$link_name])?
pub fn $($function)*;
}
@ -26,7 +26,7 @@ pub macro link {
// libraries below by using an empty extern block. This works because extern blocks are not
// connected to the library given in the #[link] attribute.
#[link(name = "kernel32")]
extern $abi {
unsafe extern $abi {
$(#[link_name=$link_name])?
pub fn $($function)*;
}