Skip to content

Commit 8676ab7

Browse files
authored
Merge pull request #1659 from ehuss/fix-stdcall
Fix stdcall example broken by recent rustc change
2 parents b2fd0f2 + 30a9afe commit 8676ab7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/items/external-blocks.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ standard C ABI on the specific platform. Other ABIs may be specified using an
6666
`abi` string, as shown here:
6767

6868
```rust
69+
# #[cfg(any(windows, target_arch = "x86"))]
6970
// Interface to the Windows API
7071
unsafe extern "stdcall" { }
7172
```
@@ -295,8 +296,8 @@ that symbol rather than having to look it up by name.
295296
> [!WARNING]
296297
> `link_ordinal` should only be used in cases where the ordinal of the symbol is known to be stable: if the ordinal of a symbol is not explicitly set when its containing binary is built then one will be automatically assigned to it, and that assigned ordinal may change between builds of the binary.
297298
298-
<!-- ignore: Only works on x86 Windows -->
299-
```rust,ignore
299+
```rust
300+
# #[cfg(all(windows, target_arch = "x86"))]
300301
#[link(name = "exporter", kind = "raw-dylib")]
301302
unsafe extern "stdcall" {
302303
#[link_ordinal(15)]

0 commit comments

Comments
 (0)