@@ -424,14 +424,14 @@ Current valid options are:
424424# Avoiding the standard library
425425
426426By 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] `
428428attribute attached to the crate.
429429
430430``` ignore
431431# // FIXME #12903: linking failures due to no_std
432432// the minimal library
433- #[crate_type="lib"];
434- #[no_std];
433+ #! [crate_type="lib"]
434+ #! [no_std]
435435
436436# // fn main() {} tricked you, rustdoc!
437437```
@@ -446,7 +446,7 @@ in the same format as a C:
446446
447447``` ignore
448448# // FIXME #12903: linking failures due to no_std
449- #[no_std];
449+ #! [no_std]
450450
451451extern "rust-intrinsic" { fn abort() -> !; }
452452#[no_mangle] pub extern fn rust_stack_exhausted() {
@@ -462,14 +462,14 @@ fn start(_argc: int, _argv: **u8) -> int {
462462```
463463
464464To 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
466466correct ABI and the correct name, which requires overriding the
467467compiler's name mangling too:
468468
469469``` ignore
470470# // FIXME #12903: linking failures due to no_std
471- #[no_std];
472- #[no_main];
471+ #! [no_std]
472+ #! [no_main]
473473
474474extern "rust-intrinsic" { fn abort() -> !; }
475475#[no_mangle] pub extern fn rust_stack_exhausted() {
@@ -543,7 +543,7 @@ sugar for dynamic allocations via `malloc` and `free`:
543543
544544``` ignore
545545# // FIXME #12903: linking failures due to no_std
546- #[no_std];
546+ #! [no_std]
547547
548548#[allow(ctypes)] // `uint` == `size_t` on Rust's platforms
549549extern {
0 commit comments