mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 04:26:48 +00:00
Migrate windows-targets to Rust 2024
This commit is contained in:
parent
ba06ce6114
commit
b130747e92
@ -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.
|
||||
|
@ -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)*;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user