about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-16 10:55:24 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-16 14:59:03 -0800
commit38cb91e66ca7fc7374909b31598dab09db37edaa (patch)
tree80aef838e11452ec1a81b7ef8a3ca0858261587a /src/doc
parentee2bfae011e368e224d6d4f4c9fad13606ee99da (diff)
downloadrust-38cb91e66ca7fc7374909b31598dab09db37edaa.tar.gz
rust-38cb91e66ca7fc7374909b31598dab09db37edaa.zip
syntax: Feature gate #[start] and #[main]
These two attributes are used to change the entry point into a Rust program, but
for now they're being put behind feature gates until we have a chance to think
about them a little more. The #[start] attribute specifically may have its
signature changed.

This is a breaking change to due the usage of these attributes generating errors
by default now. If your crate is using these attributes, add this to your crate
root:

    #![feature(start)] // if you're using the #[start] attribute
    #![feature(main)]  // if you're using the #[main] attribute

cc #20064
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/trpl/unsafe.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/doc/trpl/unsafe.md b/src/doc/trpl/unsafe.md
index 075340660df..aac0e29170d 100644
--- a/src/doc/trpl/unsafe.md
+++ b/src/doc/trpl/unsafe.md
@@ -447,7 +447,7 @@ in the same format as C:
 
 ```
 #![no_std]
-#![feature(lang_items)]
+#![feature(lang_items, start)]
 
 // Pull in the system libc library for what crt0.o likely requires
 extern crate libc;
@@ -475,7 +475,7 @@ compiler's name mangling too:
 ```ignore
 #![no_std]
 #![no_main]
-#![feature(lang_items)]
+#![feature(lang_items, start)]
 
 extern crate libc;
 
@@ -529,7 +529,7 @@ vectors provided from C, using idiomatic Rust practices.
 
 ```
 #![no_std]
-#![feature(lang_items)]
+#![feature(lang_items, start)]
 
 # extern crate libc;
 extern crate core;
@@ -653,7 +653,7 @@ sugar for dynamic allocations via `malloc` and `free`:
 
 ```
 #![no_std]
-#![feature(lang_items, box_syntax)]
+#![feature(lang_items, box_syntax, start)]
 
 extern crate libc;