File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -875,7 +875,7 @@ and `extern crate` declarations.
875
875
An example of what will and will not work for ` use ` items:
876
876
877
877
~~~~
878
- # #[allow(unused_imports)];
878
+ # #! [allow(unused_imports)]
879
879
use foo::native::start; // good: foo is at the root of the crate
880
880
use foo::baz::foobaz; // good: foo is at the root of the crate
881
881
@@ -1701,7 +1701,7 @@ hash apply to the item that follows the attribute.
1701
1701
1702
1702
An example of attributes:
1703
1703
1704
- ~~~~
1704
+ ~~~~ {.rust}
1705
1705
// General metadata applied to the enclosing module or crate.
1706
1706
#![license = "BSD"]
1707
1707
@@ -1719,7 +1719,7 @@ mod bar {
1719
1719
1720
1720
// A lint attribute used to suppress a warning/error
1721
1721
#[allow(non_camel_case_types)]
1722
- pub type int8_t = i8;
1722
+ type int8_t = i8;
1723
1723
~~~~
1724
1724
1725
1725
> ** Note:** At some point in the future, the compiler will distinguish between
@@ -2160,7 +2160,7 @@ be unstable for the purposes of the lint. One can give an optional
2160
2160
string that will be displayed when the lint flags the use of an item.
2161
2161
2162
2162
~~~~ {.ignore}
2163
- #[warn(unstable)];
2163
+ #! [warn(unstable)]
2164
2164
2165
2165
#[deprecated="replaced by `best`"]
2166
2166
fn bad() {
@@ -3978,7 +3978,7 @@ Rust provides several macros to log information. Here's a simple Rust program
3978
3978
that demonstrates all four of them:
3979
3979
3980
3980
~~~~
3981
- #[feature(phase)];
3981
+ #! [feature(phase)]
3982
3982
#[phase(syntax, link)] extern crate log;
3983
3983
3984
3984
fn main() {
You can’t perform that action at this time.
0 commit comments