]> git.lizzy.rs Git - rust.git/commitdiff
manual: update style
authorCorey Richardson <corey@octayn.net>
Fri, 4 Apr 2014 05:04:37 +0000 (01:04 -0400)
committerCorey Richardson <corey@octayn.net>
Fri, 4 Apr 2014 06:08:50 +0000 (02:08 -0400)
src/doc/rust.md

index f8ce61d28ad9b1a5c23c811507a3a70fc343e377..1ec5057e3907536a13e4cc836d82041f7c22f914 100644 (file)
@@ -612,18 +612,18 @@ the behavior of the compiler.
 
 ~~~~
 // Crate ID
-#[ crate_id = "projx#2.5" ];
+#![crate_id = "projx#2.5"]
 
 // Additional metadata attributes
-#[ desc = "Project X" ];
-#[ license = "BSD" ];
-#[ comment = "This is a comment on Project X." ];
+#![desc = "Project X"]
+#![license = "BSD"]
+#![comment = "This is a comment on Project X."]
 
 // Specify the output type
-#[ crate_type = "lib" ];
+#![crate_type = "lib"]
 
 // Turn on a warning
-#[ warn(non_camel_case_types) ];
+#![warn(non_camel_case_types)]
 ~~~~
 
 A crate that contains a `main` function can be compiled to an executable.