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