@@ -424,14 +424,14 @@ Current valid options are:
424
424
# Avoiding the standard library
425
425
426
426
By default, ` std ` is linked to every Rust crate. In some contexts,
427
- this is undesirable, and can be avoided with the ` #[no_std]; `
427
+ this is undesirable, and can be avoided with the ` #! [no_std] `
428
428
attribute attached to the crate.
429
429
430
430
``` ignore
431
431
# // FIXME #12903: linking failures due to no_std
432
432
// the minimal library
433
- #[crate_type="lib"];
434
- #[no_std];
433
+ #! [crate_type="lib"]
434
+ #! [no_std]
435
435
436
436
# // fn main() {} tricked you, rustdoc!
437
437
```
@@ -446,7 +446,7 @@ in the same format as a C:
446
446
447
447
``` ignore
448
448
# // FIXME #12903: linking failures due to no_std
449
- #[no_std];
449
+ #! [no_std]
450
450
451
451
extern "rust-intrinsic" { fn abort() -> !; }
452
452
#[no_mangle] pub extern fn rust_stack_exhausted() {
@@ -462,14 +462,14 @@ fn start(_argc: int, _argv: **u8) -> int {
462
462
```
463
463
464
464
To override the compiler-inserted ` main ` shim, one has to disable it
465
- with ` #[no_main]; ` and then create the appropriate symbol with the
465
+ with ` #! [no_main] ` and then create the appropriate symbol with the
466
466
correct ABI and the correct name, which requires overriding the
467
467
compiler's name mangling too:
468
468
469
469
``` ignore
470
470
# // FIXME #12903: linking failures due to no_std
471
- #[no_std];
472
- #[no_main];
471
+ #! [no_std]
472
+ #! [no_main]
473
473
474
474
extern "rust-intrinsic" { fn abort() -> !; }
475
475
#[no_mangle] pub extern fn rust_stack_exhausted() {
@@ -543,7 +543,7 @@ sugar for dynamic allocations via `malloc` and `free`:
543
543
544
544
``` ignore
545
545
# // FIXME #12903: linking failures due to no_std
546
- #[no_std];
546
+ #! [no_std]
547
547
548
548
#[allow(ctypes)] // `uint` == `size_t` on Rust's platforms
549
549
extern {
0 commit comments