Skip to content

Commit 0b5c62e

Browse files
committed
Migrate windows-targets to Rust 2024
1 parent b09af59 commit 0b5c62e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library/windows_targets/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "windows-targets"
33
description = "A drop-in replacement for the real windows-targets crate for use in std only."
44
version = "0.0.0"
5-
edition = "2021"
5+
edition = "2024"
66

77
[features]
88
# Enable using raw-dylib for Windows imports.

library/windows_targets/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub macro link {
1212
($library:literal $abi:literal $($link_name:literal)? $(#[$doc:meta])? fn $($function:tt)*) => (
1313
#[cfg_attr(not(target_arch = "x86"), link(name = $library, kind = "raw-dylib", modifiers = "+verbatim"))]
1414
#[cfg_attr(target_arch = "x86", link(name = $library, kind = "raw-dylib", modifiers = "+verbatim", import_name_type = "undecorated"))]
15-
extern $abi {
15+
unsafe extern $abi {
1616
$(#[link_name=$link_name])?
1717
pub fn $($function)*;
1818
}
@@ -26,7 +26,7 @@ pub macro link {
2626
// libraries below by using an empty extern block. This works because extern blocks are not
2727
// connected to the library given in the #[link] attribute.
2828
#[link(name = "kernel32")]
29-
extern $abi {
29+
unsafe extern $abi {
3030
$(#[link_name=$link_name])?
3131
pub fn $($function)*;
3232
}

0 commit comments

Comments
 (0)