Skip to content

Commit 451e8c1

Browse files
brsonalexcrichton
authored andcommitted
Convert most code to new inner attribute syntax.
Closes #2569
1 parent c6bbb95 commit 451e8c1

File tree

327 files changed

+646
-643
lines changed

Some content is hidden

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

327 files changed

+646
-643
lines changed

src/compiletest/compiletest.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[crate_type = "bin"];
12-
#[feature(phase)];
11+
#![crate_type = "bin"]
12+
#![feature(phase)]
1313

14-
#[allow(non_camel_case_types)];
15-
#[deny(warnings)];
14+
#![allow(non_camel_case_types)]
15+
#![deny(warnings)]
1616

1717
extern crate test;
1818
extern crate getopts;

src/libarena/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
//! of individual objects while the arena itself is still alive. The benefit
1616
//! of an arena is very fast allocation; just a pointer bump.
1717
18-
#[crate_id = "arena#0.10-pre"];
19-
#[crate_type = "rlib"];
20-
#[crate_type = "dylib"];
21-
#[license = "MIT/ASL2"];
22-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
23-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
24-
html_root_url = "http://static.rust-lang.org/doc/master")];
25-
#[allow(missing_doc)];
26-
#[feature(managed_boxes)];
18+
#![crate_id = "arena#0.10-pre"]
19+
#![crate_type = "rlib"]
20+
#![crate_type = "dylib"]
21+
#![license = "MIT/ASL2"]
22+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
23+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
24+
html_root_url = "http://static.rust-lang.org/doc/master")]
25+
#![allow(missing_doc)]
26+
#![feature(managed_boxes)]
2727

2828
extern crate collections;
2929

src/libcollections/bitv.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[allow(missing_doc)];
11+
#![allow(missing_doc)]
1212

1313

1414
use std::cmp;

src/libcollections/lib.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
* Collection types.
1313
*/
1414

15-
#[crate_id = "collections#0.10-pre"];
16-
#[crate_type = "rlib"];
17-
#[crate_type = "dylib"];
18-
#[license = "MIT/ASL2"];
19-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
20-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
21-
html_root_url = "http://static.rust-lang.org/doc/master")];
15+
#![crate_id = "collections#0.10-pre"]
16+
#![crate_type = "rlib"]
17+
#![crate_type = "dylib"]
18+
#![license = "MIT/ASL2"]
19+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
20+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
21+
html_root_url = "http://static.rust-lang.org/doc/master")]
2222

23-
#[feature(macro_rules, managed_boxes, default_type_params, phase)];
23+
#![feature(macro_rules, managed_boxes, default_type_params, phase)]
2424

2525
extern crate rand;
2626

src/libcollections/priority_queue.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! A priority queue implemented with a binary heap
1212
13-
#[allow(missing_doc)];
13+
#![allow(missing_doc)]
1414

1515
use std::clone::Clone;
1616
use std::mem::{move_val_init, init, replace, swap};

src/libcollections/smallintmap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* are O(highest integer key).
1414
*/
1515

16-
#[allow(missing_doc)];
16+
#![allow(missing_doc)]
1717

1818
use std::iter::{Enumerate, FilterMap, Rev};
1919
use std::mem::replace;

src/libflate/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Simple compression
1414
1515
*/
1616

17-
#[crate_id = "flate#0.10-pre"];
18-
#[crate_type = "rlib"];
19-
#[crate_type = "dylib"];
20-
#[license = "MIT/ASL2"];
21-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
22-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
23-
html_root_url = "http://static.rust-lang.org/doc/master")];
24-
#[feature(phase)];
25-
#[deny(deprecated_owned_vector)];
17+
#![crate_id = "flate#0.10-pre"]
18+
#![crate_type = "rlib"]
19+
#![crate_type = "dylib"]
20+
#![license = "MIT/ASL2"]
21+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
22+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
23+
html_root_url = "http://static.rust-lang.org/doc/master")]
24+
#![feature(phase)]
25+
#![deny(deprecated_owned_vector)]
2626

2727
#[cfg(test)] #[phase(syntax, link)] extern crate log;
2828

src/libfourcc/lib.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ fn main() {
3939
4040
*/
4141

42-
#[crate_id = "fourcc#0.10-pre"];
43-
#[crate_type = "rlib"];
44-
#[crate_type = "dylib"];
45-
#[license = "MIT/ASL2"];
46-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
47-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
48-
html_root_url = "http://static.rust-lang.org/doc/master")];
49-
50-
#[deny(deprecated_owned_vector)];
51-
#[feature(macro_registrar, managed_boxes)];
42+
#![crate_id = "fourcc#0.10-pre"]
43+
#![crate_type = "rlib"]
44+
#![crate_type = "dylib"]
45+
#![license = "MIT/ASL2"]
46+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
47+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
48+
html_root_url = "http://static.rust-lang.org/doc/master")]
49+
50+
#![deny(deprecated_owned_vector)]
51+
#![feature(macro_registrar, managed_boxes)]
5252

5353
extern crate syntax;
5454

src/libgetopts/lib.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@
7676
//! }
7777
//! ~~~
7878
79-
#[crate_id = "getopts#0.10-pre"];
80-
#[crate_type = "rlib"];
81-
#[crate_type = "dylib"];
82-
#[license = "MIT/ASL2"];
83-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
84-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
85-
html_root_url = "http://static.rust-lang.org/doc/master")];
86-
#[feature(globs, phase)];
87-
#[deny(missing_doc)];
88-
#[deny(deprecated_owned_vector)];
79+
#![crate_id = "getopts#0.10-pre"]
80+
#![crate_type = "rlib"]
81+
#![crate_type = "dylib"]
82+
#![license = "MIT/ASL2"]
83+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
84+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
85+
html_root_url = "http://static.rust-lang.org/doc/master")]
86+
#![feature(globs, phase)]
87+
#![deny(missing_doc)]
88+
#![deny(deprecated_owned_vector)]
8989

9090
#[cfg(test)] #[phase(syntax, link)] extern crate log;
9191

src/libglob/lib.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
* `glob`/`fnmatch` functions.
2424
*/
2525

26-
#[crate_id = "glob#0.10-pre"];
27-
#[crate_type = "rlib"];
28-
#[crate_type = "dylib"];
29-
#[license = "MIT/ASL2"];
30-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
31-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
32-
html_root_url = "http://static.rust-lang.org/doc/master")];
26+
#![crate_id = "glob#0.10-pre"]
27+
#![crate_type = "rlib"]
28+
#![crate_type = "dylib"]
29+
#![license = "MIT/ASL2"]
30+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
31+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
32+
html_root_url = "http://static.rust-lang.org/doc/master")]
3333

3434
use std::cell::Cell;
3535
use std::{cmp, os, path};

src/libgreen/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,17 @@
184184
//! pool.shutdown();
185185
//! ```
186186
187-
#[crate_id = "green#0.10-pre"];
188-
#[license = "MIT/ASL2"];
189-
#[crate_type = "rlib"];
190-
#[crate_type = "dylib"];
191-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
192-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
193-
html_root_url = "http://static.rust-lang.org/doc/master")];
187+
#![crate_id = "green#0.10-pre"]
188+
#![license = "MIT/ASL2"]
189+
#![crate_type = "rlib"]
190+
#![crate_type = "dylib"]
191+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
192+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
193+
html_root_url = "http://static.rust-lang.org/doc/master")]
194194

195195
// NB this does *not* include globs, please keep it that way.
196-
#[feature(macro_rules, phase)];
197-
#[allow(visible_private_types)];
196+
#![feature(macro_rules, phase)]
197+
#![allow(visible_private_types)]
198198

199199
#[cfg(test)] #[phase(syntax, link)] extern crate log;
200200
#[cfg(test)] extern crate rustuv;

src/libgreen/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// FIXME: this file probably shouldn't exist
1212

13-
#[macro_escape];
13+
#![macro_escape]
1414

1515
use std::fmt;
1616

src/libhexfloat/lib.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ fn main() {
3636
3737
*/
3838

39-
#[crate_id = "hexfloat#0.10-pre"];
40-
#[crate_type = "rlib"];
41-
#[crate_type = "dylib"];
42-
#[license = "MIT/ASL2"];
43-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
44-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
45-
html_root_url = "http://static.rust-lang.org/doc/master")];
46-
47-
#[deny(deprecated_owned_vector)];
48-
#[feature(macro_registrar, managed_boxes)];
39+
#![crate_id = "hexfloat#0.10-pre"]
40+
#![crate_type = "rlib"]
41+
#![crate_type = "dylib"]
42+
#![license = "MIT/ASL2"]
43+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
44+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
45+
html_root_url = "http://static.rust-lang.org/doc/master")]
46+
47+
#![deny(deprecated_owned_vector)]
48+
#![feature(macro_registrar, managed_boxes)]
4949

5050
extern crate syntax;
5151

src/liblog/lib.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,16 @@ if logging is disabled, none of the components of the log will be executed.
105105
106106
*/
107107

108-
#[crate_id = "log#0.10-pre"];
109-
#[license = "MIT/ASL2"];
110-
#[crate_type = "rlib"];
111-
#[crate_type = "dylib"];
112-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
113-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
114-
html_root_url = "http://static.rust-lang.org/doc/master")];
115-
116-
#[feature(macro_rules)];
117-
#[deny(missing_doc, deprecated_owned_vector)];
108+
#![crate_id = "log#0.10-pre"]
109+
#![license = "MIT/ASL2"]
110+
#![crate_type = "rlib"]
111+
#![crate_type = "dylib"]
112+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
113+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
114+
html_root_url = "http://static.rust-lang.org/doc/master")]
115+
116+
#![feature(macro_rules)]
117+
#![deny(missing_doc, deprecated_owned_vector)]
118118

119119
extern crate sync;
120120

src/liblog/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Logging macros
1212
13-
#[macro_escape];
13+
#![macro_escape]
1414

1515
/// The standard logging macro
1616
///

src/libnative/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@
4141
//! }
4242
//! ```
4343
44-
#[crate_id = "native#0.10-pre"];
45-
#[license = "MIT/ASL2"];
46-
#[crate_type = "rlib"];
47-
#[crate_type = "dylib"];
48-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
49-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
50-
html_root_url = "http://static.rust-lang.org/doc/master")];
51-
#[deny(unused_result, unused_must_use)];
52-
#[allow(non_camel_case_types)];
44+
#![crate_id = "native#0.10-pre"]
45+
#![license = "MIT/ASL2"]
46+
#![crate_type = "rlib"]
47+
#![crate_type = "dylib"]
48+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
49+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
50+
html_root_url = "http://static.rust-lang.org/doc/master")]
51+
#![deny(unused_result, unused_must_use)]
52+
#![allow(non_camel_case_types)]
5353

5454
// NB this crate explicitly does *not* allow glob imports, please seriously
5555
// consider whether they're needed before adding that feature here (the

src/libnum/complex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ impl<T: ToStrRadix + Num + Ord> ToStrRadix for Cmplx<T> {
190190

191191
#[cfg(test)]
192192
mod test {
193-
#[allow(non_uppercase_statics)];
193+
#![allow(non_uppercase_statics)]
194194

195195
use super::{Complex64, Cmplx};
196196
use std::num::{Zero,One,Float};

src/libnum/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

13-
#[crate_id = "num#0.10-pre"];
14-
#[crate_type = "rlib"];
15-
#[crate_type = "dylib"];
16-
#[license = "MIT/ASL2"];
17-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
18-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
19-
html_root_url = "http://static.rust-lang.org/doc/master")];
13+
#![crate_id = "num#0.10-pre"]
14+
#![crate_type = "rlib"]
15+
#![crate_type = "dylib"]
16+
#![license = "MIT/ASL2"]
17+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
18+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
19+
html_root_url = "http://static.rust-lang.org/doc/master")]
2020

21-
#[deny(deprecated_owned_vector)];
21+
#![deny(deprecated_owned_vector)]
2222

2323
extern crate rand;
2424

src/librand/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ println!("{:?}", tuple_ptr)
6262
```
6363
*/
6464

65-
#[crate_id = "rand#0.10-pre"];
66-
#[license = "MIT/ASL2"];
67-
#[crate_type = "dylib"];
68-
#[crate_type = "rlib"];
69-
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
70-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
71-
html_root_url = "http://static.rust-lang.org/doc/master")];
72-
73-
#[feature(macro_rules, managed_boxes, phase)];
65+
#![crate_id = "rand#0.10-pre"]
66+
#![license = "MIT/ASL2"]
67+
#![crate_type = "dylib"]
68+
#![crate_type = "rlib"]
69+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
70+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
71+
html_root_url = "http://static.rust-lang.org/doc/master")]
72+
73+
#![feature(macro_rules, managed_boxes, phase)]
7474

7575
#[cfg(test)]
7676
#[phase(syntax, link)] extern crate log;

src/librustc/back/target_strs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[allow(non_camel_case_types)];
11+
#![allow(non_camel_case_types)]
1212

1313
pub struct t {
1414
module_asm: ~str,

src/librustc/front/test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
// Code that generates a test runner to run all the tests in a crate
1212

13-
#[allow(dead_code)];
14-
#[allow(unused_imports)];
13+
#![allow(dead_code)]
14+
#![allow(unused_imports)]
1515

1616
use driver::session::Session;
1717
use front::config;

0 commit comments

Comments
 (0)