Skip to content

Commit 73b0186

Browse files
travieralexcrichton
authored andcommitted
Fix inner attribute syntax from #[foo]; to #![foo]
From the 0.10 changelog: * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.
1 parent ba9c51d commit 73b0186

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+81
-81
lines changed

src/doc/guide-unsafe.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ asm!(assembly template
294294
);
295295
```
296296

297-
Any use of `asm` is feature gated (requires `#[feature(asm)];` on the
297+
Any use of `asm` is feature gated (requires `#![feature(asm)]` on the
298298
crate to allow) and of course requires an `unsafe` block.
299299

300300
> **Note**: the examples here are given in x86/x86-64 assembly, but all
@@ -306,7 +306,7 @@ The `assembly template` is the only required parameter and must be a
306306
literal string (i.e `""`)
307307

308308
```
309-
#[feature(asm)];
309+
#![feature(asm)]
310310
311311
#[cfg(target_arch = "x86")]
312312
#[cfg(target_arch = "x86_64")]
@@ -334,7 +334,7 @@ Output operands, input operands, clobbers and options are all optional
334334
but you must add the right number of `:` if you skip them:
335335

336336
```
337-
# #[feature(asm)];
337+
# #![feature(asm)]
338338
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
339339
# fn main() { unsafe {
340340
asm!("xor %eax, %eax"
@@ -348,7 +348,7 @@ asm!("xor %eax, %eax"
348348
Whitespace also doesn't matter:
349349

350350
```
351-
# #[feature(asm)];
351+
# #![feature(asm)]
352352
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
353353
# fn main() { unsafe {
354354
asm!("xor %eax, %eax" ::: "eax");
@@ -362,7 +362,7 @@ Input and output operands follow the same format: `:
362362
expressions must be mutable lvalues:
363363

364364
```
365-
# #[feature(asm)];
365+
# #![feature(asm)]
366366
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
367367
fn add(a: int, b: int) -> int {
368368
let mut c = 0;
@@ -390,7 +390,7 @@ compiler not to assume any values loaded into those registers will
390390
stay valid.
391391

392392
```
393-
# #[feature(asm)];
393+
# #![feature(asm)]
394394
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
395395
# fn main() { unsafe {
396396
// Put the value 0x200 in eax

src/doc/po/ja/rust.md.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Japanese translations for Rust package
2-
# Copyright (C) 2013 The Rust Project Developers
2+
# Copyright (C) 2013-2014 The Rust Project Developers
33
# This file is distributed under the same license as the Rust package.
44
# Automatically generated, 2013.
55
#
@@ -886,7 +886,7 @@ msgstr ""
886886
#: src/doc/rust.md:2008
887887
#, fuzzy
888888
#| msgid "~~~~ use std::task::spawn;"
889-
msgid "~~~~ {.ignore} #[warn(unstable)];"
889+
msgid "~~~~ {.ignore} #![warn(unstable)]"
890890
msgstr ""
891891
"~~~~\n"
892892
"use std::task::spawn;"

src/etc/combine-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def scrub(b):
5454
#[crate_id=\"run_pass_stage2#0.1\"];
5555
#[crate_id=\"run_pass_stage2#0.1\"];
5656
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
57-
#[allow(warnings)];
57+
#![allow(warnings)]
5858
extern crate collections;
5959
"""
6060
)

src/liblog/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -15,7 +15,7 @@ Utilities for program-wide and customizable logging
1515
## Example
1616
1717
```
18-
#[feature(phase)];
18+
#![feature(phase)]
1919
#[phase(syntax, link)] extern crate log;
2020
2121
fn main() {

src/liblog/macros.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/// # Example
2222
///
2323
/// ```
24-
/// #[feature(phase)];
24+
/// #![feature(phase)]
2525
/// #[phase(syntax, link)] extern crate log;
2626
///
2727
/// # fn main() {
@@ -45,7 +45,7 @@ macro_rules! log(
4545
/// # Example
4646
///
4747
/// ```
48-
/// #[feature(phase)];
48+
/// #![feature(phase)]
4949
/// #[phase(syntax, link)] extern crate log;
5050
///
5151
/// # fn main() {
@@ -63,7 +63,7 @@ macro_rules! error(
6363
/// # Example
6464
///
6565
/// ```
66-
/// #[feature(phase)];
66+
/// #![feature(phase)]
6767
/// #[phase(syntax, link)] extern crate log;
6868
///
6969
/// # fn main() {
@@ -81,7 +81,7 @@ macro_rules! warn(
8181
/// # Example
8282
///
8383
/// ```
84-
/// #[feature(phase)];
84+
/// #![feature(phase)]
8585
/// #[phase(syntax, link)] extern crate log;
8686
///
8787
/// # fn main() {
@@ -101,7 +101,7 @@ macro_rules! info(
101101
/// # Example
102102
///
103103
/// ```
104-
/// #[feature(phase)];
104+
/// #![feature(phase)]
105105
/// #[phase(syntax, link)] extern crate log;
106106
///
107107
/// # fn main() {
@@ -118,7 +118,7 @@ macro_rules! debug(
118118
/// # Example
119119
///
120120
/// ```
121-
/// #[feature(phase)];
121+
/// #![feature(phase)]
122122
/// #[phase(syntax, link)] extern crate log;
123123
///
124124
/// # fn main() {

src/test/auxiliary/issue_2316_b.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
#[allow(unused_imports)];
12-
#[feature(globs)];
12+
#![feature(globs)]
1313

1414
extern crate issue_2316_a;
1515

src/test/auxiliary/logging_right_crate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[feature(phase)];
11+
#![feature(phase)]
1212
#[phase(syntax, link)] extern crate log;
1313

1414
pub fn foo<T>() {

src/test/compile-fail/import-glob-0.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,7 +10,7 @@
1010

1111
// error-pattern: unresolved name
1212

13-
#[feature(globs)];
13+
#![feature(globs)]
1414

1515
use module_of_many_things::*;
1616

src/test/compile-fail/import-glob-circular.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,7 +10,7 @@
1010

1111
// error-pattern: unresolved
1212

13-
#[feature(globs)];
13+
#![feature(globs)]
1414

1515
mod circ1 {
1616
pub use circ2::f2;

src/test/compile-fail/name-clash-nullary.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[feature(globs)];
11+
#![feature(globs)]
1212

1313
// error-pattern:declaration of `None` shadows
1414
use std::option::*;

src/test/compile-fail/qquote-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-test Can't use syntax crate here
1212

13-
#[feature(quote)];
13+
#![feature(quote)]
1414

1515
extern crate syntax;
1616

src/test/compile-fail/qquote-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-test Can't use syntax crate here
1212

13-
#[feature(quote)];
13+
#![feature(quote)]
1414

1515
extern crate syntax;
1616

src/test/debug-info/simd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
// debugger:continue
4242

43-
#[allow(experimental)];
43+
#![allow(experimental)]
4444
#[allow(unused_variable)];
4545

4646
use std::unstable::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2};

src/test/pretty/raw-str-nonexpr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// ignore-fast #[feature] doesn't work with check-fast
1212
// pp-exact
1313

14-
#[feature(asm)];
14+
#![feature(asm)]
1515

1616
#[cfg = r#"just parse this"#]
1717
extern crate blah = r##"blah"##;

src/test/run-fail/glob-use-std.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -11,7 +11,7 @@
1111
// Issue #7580
1212

1313
// error-pattern:fail works
14-
#[feature(globs)];
14+
#![feature(globs)]
1515

1616
use std::*;
1717

src/test/run-fail/rt-set-exit-status-fail.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,7 +10,7 @@
1010

1111
// error-pattern:whatever
1212

13-
#[feature(phase)];
13+
#![feature(phase)]
1414
#[phase(syntax, link)] extern crate log;
1515
use std::os;
1616

src/test/run-fail/rt-set-exit-status-fail2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,7 +10,7 @@
1010

1111
// error-pattern:whatever
1212

13-
#[feature(phase)];
13+
#![feature(phase)]
1414
#[phase(syntax, link)] extern crate log;
1515
use std::os;
1616
use std::task;

src/test/run-fail/rt-set-exit-status.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,7 +10,7 @@
1010

1111
// error-pattern:whatever
1212

13-
#[feature(phase)];
13+
#![feature(phase)]
1414
#[phase(syntax, link)] extern crate log;
1515
use std::os;
1616

src/test/run-pass-fulldeps/macro-crate-outlive-expansion-phase.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// ignore-android
1515
// ignore-cross-compile #12102
1616

17-
#[feature(phase)];
17+
#![feature(phase)]
1818

1919
#[phase(syntax)]
2020
extern crate macro_crate_outlive_expansion_phase;

src/test/run-pass-fulldeps/macro-crate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// ignore-android
1515
// ignore-cross-compile #12102
1616

17-
#[feature(phase)];
17+
#![feature(phase)]
1818

1919
#[phase(syntax)]
2020
extern crate macro_crate_test;

src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// can't run host binaries, and force-host to make this test build as the host
2525
// arch.
2626

27-
#[feature(phase)];
27+
#![feature(phase)]
2828

2929
#[phase(syntax, link)]
3030
extern crate macro_crate_test;

src/test/run-pass-fulldeps/qquote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// ignore-pretty
1212
// ignore-test
1313

14-
#[feature(quote)];
14+
#![feature(quote)]
1515

1616
extern crate syntax;
1717

src/test/run-pass-fulldeps/quote-tokens.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-test
1212

13-
#[feature(quote)];
13+
#![feature(quote)]
1414
#[feature(managed_boxes)];
1515

1616
extern crate syntax;

src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-fast
1212
// ignore-android
13-
#[feature(quote)];
13+
#![feature(quote)]
1414
#[deny(unused_variable)];
1515

1616
extern crate syntax;

src/test/run-pass-fulldeps/syntax-extension-fourcc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// ignore-pretty
1414
// ignore-cross-compile
1515

16-
#[feature(phase)];
16+
#![feature(phase)]
1717

1818
#[phase(syntax)]
1919
extern crate fourcc;

src/test/run-pass-fulldeps/syntax-extension-hexfloat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// ignore-cross-compile #12102
1414
// ignore-fast
1515

16-
#[feature(phase)];
16+
#![feature(phase)]
1717
#[phase(syntax)]
1818
extern crate hexfloat;
1919

src/test/run-pass/asm-concat-src.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// ignore-fast #[feature] doesn't work with check-fast
12-
#[feature(asm)];
12+
#![feature(asm)]
1313

1414
pub fn main() {
1515
unsafe { asm!(concat!("", "")) };

0 commit comments

Comments
 (0)