Skip to content

Commit 93068d3

Browse files
committed
Move no_mangle example into block
1 parent 6914872 commit 93068d3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/abi.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ r[abi.no_mangle]
6767
r[abi.no_mangle.intro]
6868
The *`no_mangle` attribute* may be used on functions and statics to disable standard symbol name mangling. The symbol for the item will be the identifier of the item's name.
6969

70-
```rust
71-
#[unsafe(no_mangle)]
72-
extern "C" fn foo() {}
73-
```
70+
> [!EXAMPLE]
71+
> ```rust
72+
> #[unsafe(no_mangle)]
73+
> extern "C" fn foo() {}
74+
> ```
7475
7576
r[abi.no_mangle.syntax]
7677
The `no_mangle` attribute uses the [MetaWord] syntax and thus does not take any inputs.

0 commit comments

Comments
 (0)