From 864c5016ae5492da8130bf3c1c2d5ef04b66efa7 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Thu, 22 May 2014 22:29:13 -0700 Subject: Get "make check" to work with unused-attribute There's a fair number of attributes that have to be whitelisted since they're either looked for by rustdoc, in trans, or as needed. These can be cleaned up in the future. --- src/doc/tutorial.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/doc/tutorial.md') diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index da78869d9fa..d85734508bc 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -3166,6 +3166,7 @@ without conflict. Therefore, if you plan to compile your crate as a library, you should annotate it with that information: ~~~~ +# #![allow(unused_attribute)] // `lib.rs` # #![crate_type = "lib"] @@ -3189,6 +3190,7 @@ Other crate settings and metadata include things like enabling/disabling certain or setting the crate type (library or executable) explicitly: ~~~~ +# #![allow(unused_attribute)] // `lib.rs` // ... @@ -3208,6 +3210,7 @@ Now for something that you can actually compile yourself. We define two crates, and use one of them as a library in the other. ~~~~ +# #![allow(unused_attribute)] // `world.rs` #![crate_id = "world#0.42"] @@ -3282,11 +3285,13 @@ fn main() { Both auto-insertions can be disabled with an attribute if necessary: ~~~ +# #![allow(unused_attribute)] // In the crate root: #![no_std] ~~~ ~~~ +# #![allow(unused_attribute)] // In any module: #![no_implicit_prelude] ~~~ -- cgit 1.4.1-3-g733a5