@@ -433,6 +433,7 @@ attribute attached to the crate.
433433``` ignore
434434// a minimal library
435435#![crate_type="lib"]
436+ #![feature(no_std)]
436437#![no_std]
437438# // fn main() {} tricked you, rustdoc!
438439```
@@ -446,8 +447,8 @@ The function marked `#[start]` is passed the command line parameters
446447in the same format as C:
447448
448449```
450+ #![feature(lang_items, start, no_std)]
449451#![no_std]
450- #![feature(lang_items, start)]
451452
452453// Pull in the system libc library for what crt0.o likely requires
453454extern crate libc;
@@ -473,6 +474,7 @@ correct ABI and the correct name, which requires overriding the
473474compiler's name mangling too:
474475
475476``` ignore
477+ #![feature(no_std)]
476478#![no_std]
477479#![no_main]
478480#![feature(lang_items, start)]
@@ -528,8 +530,8 @@ As an example, here is a program that will calculate the dot product of two
528530vectors provided from C, using idiomatic Rust practices.
529531
530532```
533+ #![feature(lang_items, start, no_std)]
531534#![no_std]
532- #![feature(lang_items, start)]
533535
534536# extern crate libc;
535537extern crate core;
@@ -652,8 +654,8 @@ and one for deallocation. A freestanding program that uses the `Box`
652654sugar for dynamic allocations via ` malloc ` and ` free ` :
653655
654656```
657+ #![feature(lang_items, box_syntax, start, no_std)]
655658#![no_std]
656- #![feature(lang_items, box_syntax, start)]
657659
658660extern crate libc;
659661
0 commit comments