Skip to content

Commit cb59922

Browse files
Merge pull request #1659 from ehuss/fix-stdcall
Fix stdcall example broken by recent rustc change
2 parents 40280c6 + 506c4a3 commit cb59922

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/items/external-blocks.md

Lines changed: 3 additions & 2 deletions
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)