From 451e8c1c6178750a4c1789f40749562164a980b7 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 21 Mar 2014 18:05:05 -0700 Subject: [PATCH] Convert most code to new inner attribute syntax. Closes #2569 --- src/compiletest/compiletest.rs | 8 +++---- src/libarena/lib.rs | 18 +++++++------- src/libcollections/bitv.rs | 2 +- src/libcollections/lib.rs | 16 ++++++------- src/libcollections/priority_queue.rs | 2 +- src/libcollections/smallintmap.rs | 2 +- src/libflate/lib.rs | 18 +++++++------- src/libfourcc/lib.rs | 20 ++++++++-------- src/libgetopts/lib.rs | 20 ++++++++-------- src/libglob/lib.rs | 14 +++++------ src/libgreen/lib.rs | 18 +++++++------- src/libgreen/macros.rs | 2 +- src/libhexfloat/lib.rs | 20 ++++++++-------- src/liblog/lib.rs | 20 ++++++++-------- src/liblog/macros.rs | 2 +- src/libnative/lib.rs | 18 +++++++------- src/libnum/complex.rs | 2 +- src/libnum/lib.rs | 18 +++++++------- src/librand/lib.rs | 18 +++++++------- src/librustc/back/target_strs.rs | 2 +- src/librustc/front/test.rs | 4 ++-- src/librustc/lib.rs | 20 ++++++++-------- src/librustc/lib/llvm.rs | 4 ++-- src/librustc/metadata/common.rs | 2 +- src/librustc/metadata/creader.rs | 2 +- src/librustc/metadata/csearch.rs | 2 +- src/librustc/metadata/cstore.rs | 2 +- src/librustc/metadata/decoder.rs | 2 +- src/librustc/metadata/encoder.rs | 4 ++-- src/librustc/metadata/filesearch.rs | 2 +- src/librustc/metadata/tydecode.rs | 2 +- src/librustc/metadata/tyencode.rs | 4 ++-- src/librustc/middle/astencode.rs | 4 ++-- src/librustc/middle/borrowck/mod.rs | 2 +- src/librustc/middle/check_match.rs | 2 +- src/librustc/middle/const_eval.rs | 2 +- src/librustc/middle/freevars.rs | 2 +- src/librustc/middle/lint.rs | 2 +- src/librustc/middle/mem_categorization.rs | 2 +- src/librustc/middle/resolve.rs | 2 +- src/librustc/middle/trans/_match.rs | 2 +- src/librustc/middle/trans/base.rs | 2 +- src/librustc/middle/trans/cabi_arm.rs | 2 +- src/librustc/middle/trans/cabi_mips.rs | 2 +- src/librustc/middle/trans/cabi_x86_64.rs | 2 +- src/librustc/middle/trans/common.rs | 2 +- src/librustc/middle/trans/expr.rs | 2 +- src/librustc/middle/trans/intrinsic.rs | 2 +- src/librustc/middle/trans/macros.rs | 2 +- src/librustc/middle/trans/tvec.rs | 2 +- src/librustc/middle/trans/type_.rs | 2 +- src/librustc/middle/trans/type_of.rs | 2 +- src/librustc/middle/ty.rs | 2 +- src/librustc/middle/typeck/check/_match.rs | 2 +- src/librustc/middle/typeck/infer/macros.rs | 2 +- src/librustc/middle/typeck/infer/mod.rs | 2 +- src/librustc/middle/typeck/mod.rs | 2 +- src/librustc/util/common.rs | 2 +- src/librustdoc/flock.rs | 2 +- src/librustdoc/html/markdown.rs | 2 +- src/librustdoc/lib.rs | 12 +++++----- src/librustuv/homing.rs | 2 +- src/librustuv/lib.rs | 16 ++++++------- src/librustuv/macros.rs | 2 +- src/librustuv/queue.rs | 2 +- src/librustuv/uvll.rs | 2 +- src/libsemver/lib.rs | 16 ++++++------- src/libserialize/ebml.rs | 2 +- src/libserialize/json.rs | 4 ++-- src/libserialize/lib.rs | 16 ++++++------- src/libstd/cleanup.rs | 2 +- src/libstd/cmp.rs | 2 +- src/libstd/comm/select.rs | 2 +- src/libstd/fmt/rt.rs | 4 ++-- src/libstd/gc.rs | 2 +- src/libstd/hash/mod.rs | 2 +- src/libstd/intrinsics.rs | 2 +- src/libstd/io/extensions.rs | 2 +- src/libstd/io/mod.rs | 2 +- src/libstd/io/net/addrinfo.rs | 2 +- src/libstd/io/net/ip.rs | 2 +- src/libstd/io/net/tcp.rs | 2 +- src/libstd/io/net/unix.rs | 2 +- src/libstd/io/pipe.rs | 2 +- src/libstd/io/process.rs | 2 +- src/libstd/io/test.rs | 2 +- src/libstd/lib.rs | 24 +++++++++---------- src/libstd/libc.rs | 8 +++---- src/libstd/macros.rs | 2 +- src/libstd/mem.rs | 2 +- src/libstd/num/cmath.rs | 4 ++-- src/libstd/num/f32.rs | 2 +- src/libstd/num/f64.rs | 2 +- src/libstd/num/float_macros.rs | 4 ++-- src/libstd/num/i16.rs | 2 +- src/libstd/num/i32.rs | 2 +- src/libstd/num/i64.rs | 2 +- src/libstd/num/i8.rs | 2 +- src/libstd/num/int.rs | 2 +- src/libstd/num/int_macros.rs | 4 ++-- src/libstd/num/mod.rs | 2 +- src/libstd/num/strconv.rs | 2 +- src/libstd/num/u16.rs | 2 +- src/libstd/num/u32.rs | 2 +- src/libstd/num/u64.rs | 2 +- src/libstd/num/u8.rs | 2 +- src/libstd/num/uint.rs | 2 +- src/libstd/num/uint_macros.rs | 4 ++-- src/libstd/os.rs | 2 +- src/libstd/path/windows.rs | 4 ++-- src/libstd/raw.rs | 2 +- src/libstd/reflect.rs | 2 +- src/libstd/repr.rs | 2 +- src/libstd/rt/backtrace.rs | 2 +- src/libstd/rt/bookkeeping.rs | 4 ++-- src/libstd/rt/libunwind.rs | 4 ++-- src/libstd/rt/local_ptr.rs | 2 +- src/libstd/rt/macros.rs | 2 +- src/libstd/rt/mod.rs | 2 +- src/libstd/rt/thread.rs | 2 +- src/libstd/rt/thread_local_storage.rs | 2 +- src/libstd/slice.rs | 2 +- src/libstd/str.rs | 2 +- src/libstd/sync/atomics.rs | 2 +- src/libstd/sync/mpmc_bounded_queue.rs | 2 +- src/libstd/tuple.rs | 2 +- src/libstd/unicode.rs | 4 ++-- src/libstd/unstable/mod.rs | 2 +- src/libstd/unstable/mutex.rs | 2 +- src/libstd/unstable/simd.rs | 2 +- src/libsync/comm.rs | 2 +- src/libsync/future.rs | 2 +- src/libsync/lib.rs | 18 +++++++------- src/libsync/task_pool.rs | 2 +- src/libsyntax/lib.rs | 22 ++++++++--------- src/libsyntax/parse/attr.rs | 5 ++-- src/libsyntax/parse/parser.rs | 5 +++- src/libterm/lib.rs | 20 ++++++++-------- src/libterm/terminfo/parser/compiled.rs | 2 +- src/libtest/lib.rs | 22 ++++++++--------- src/libtest/stats.rs | 2 +- src/libtime/lib.rs | 18 +++++++------- src/liburl/lib.rs | 16 ++++++------- src/libuuid/lib.rs | 18 +++++++------- src/libworkcache/lib.rs | 18 +++++++------- src/test/auxiliary/struct_variant_xc_aux.rs | 6 ++--- src/test/compile-fail/asm-in-bad-modifier.rs | 2 +- src/test/compile-fail/asm-misplaced-option.rs | 4 ++-- src/test/compile-fail/asm-out-assign-imm.rs | 2 +- src/test/compile-fail/asm-out-no-modifier.rs | 2 +- src/test/compile-fail/asm-out-read-uninit.rs | 2 +- src/test/compile-fail/attr-bad-crate-attr.rc | 2 +- .../compile-fail/auto-ref-slice-plus-ref.rs | 2 +- src/test/compile-fail/autoderef-full-lval.rs | 2 +- .../compile-fail/bad-mid-path-type-params.rs | 2 +- .../compile-fail/borrowck-lend-flow-match.rs | 4 ++-- .../borrowck-loan-rcvr-overloaded-op.rs | 2 +- src/test/compile-fail/borrowck-loan-rcvr.rs | 2 +- .../borrowck-move-subcomponent.rs | 2 +- .../borrowck-report-with-custom-diagnostic.rs | 2 +- src/test/compile-fail/box-static-bound.rs | 2 +- .../check-static-values-constraints.rs | 2 +- .../compile-fail/cleanup-rvalue-scopes-cf.rs | 2 +- src/test/compile-fail/deriving-primitive.rs | 2 +- ...deriving-span-Clone-enum-struct-variant.rs | 2 +- .../compile-fail/deriving-span-Clone-enum.rs | 2 +- .../deriving-span-Clone-struct.rs | 2 +- .../deriving-span-Clone-tuple-struct.rs | 2 +- .../deriving-span-Default-struct.rs | 2 +- .../deriving-span-Default-tuple-struct.rs | 2 +- .../deriving-span-Eq-enum-struct-variant.rs | 2 +- .../compile-fail/deriving-span-Eq-enum.rs | 2 +- .../compile-fail/deriving-span-Eq-struct.rs | 2 +- .../deriving-span-Eq-tuple-struct.rs | 2 +- .../deriving-span-Hash-enum-struct-variant.rs | 2 +- .../compile-fail/deriving-span-Hash-enum.rs | 2 +- .../compile-fail/deriving-span-Hash-struct.rs | 2 +- .../deriving-span-Hash-tuple-struct.rs | 2 +- .../deriving-span-Ord-enum-struct-variant.rs | 2 +- .../compile-fail/deriving-span-Ord-enum.rs | 2 +- .../compile-fail/deriving-span-Ord-struct.rs | 2 +- .../deriving-span-Ord-tuple-struct.rs | 2 +- .../deriving-span-Rand-enum-struct-variant.rs | 2 +- .../compile-fail/deriving-span-Rand-enum.rs | 2 +- .../compile-fail/deriving-span-Rand-struct.rs | 2 +- .../deriving-span-Rand-tuple-struct.rs | 2 +- .../deriving-span-Show-enum-struct-variant.rs | 2 +- .../compile-fail/deriving-span-Show-enum.rs | 2 +- .../compile-fail/deriving-span-Show-struct.rs | 2 +- .../deriving-span-Show-tuple-struct.rs | 2 +- ...riving-span-TotalEq-enum-struct-variant.rs | 2 +- .../deriving-span-TotalEq-enum.rs | 2 +- .../deriving-span-TotalEq-struct.rs | 2 +- .../deriving-span-TotalEq-tuple-struct.rs | 2 +- ...iving-span-TotalOrd-enum-struct-variant.rs | 2 +- .../deriving-span-TotalOrd-enum.rs | 2 +- .../deriving-span-TotalOrd-struct.rs | 2 +- .../deriving-span-TotalOrd-tuple-struct.rs | 2 +- .../compile-fail/deriving-span-Zero-struct.rs | 2 +- .../deriving-span-Zero-tuple-struct.rs | 2 +- src/test/compile-fail/drop-on-non-struct.rs | 2 +- .../dup-struct-enum-struct-variant.rs | 2 +- src/test/compile-fail/gated-bad-feature.rs | 12 +++++----- .../gated-default-type-param-usage.rs | 2 +- .../compile-fail/gated-non-ascii-idents.rs | 2 +- .../generic-impl-less-params-with-defaults.rs | 2 +- .../generic-impl-more-params-with-defaults.rs | 2 +- .../generic-non-trailing-defaults.rs | 2 +- .../generic-type-less-params-with-defaults.rs | 2 +- .../generic-type-more-params-with-defaults.rs | 2 +- .../generic-type-params-forward-mention.rs | 2 +- .../generic-type-params-name-repr.rs | 2 +- src/test/compile-fail/glob-resolve1.rs | 2 +- src/test/compile-fail/hygienic-label-1.rs | 2 +- src/test/compile-fail/hygienic-label-2.rs | 2 +- src/test/compile-fail/hygienic-label-3.rs | 2 +- src/test/compile-fail/hygienic-label-4.rs | 2 +- src/test/compile-fail/invalid-crate-type.rs | 2 +- src/test/compile-fail/issue-1697.rs | 2 +- src/test/compile-fail/issue-2063-resource.rs | 2 +- src/test/compile-fail/issue-2150.rs | 8 +++---- src/test/compile-fail/issue-3668.rs | 2 +- src/test/compile-fail/issue-3763.rs | 2 +- src/test/compile-fail/issue-4366-2.rs | 2 +- src/test/compile-fail/issue-4366.rs | 2 +- src/test/compile-fail/issue-5060-fail.rs | 2 +- src/test/compile-fail/issue-6804.rs | 2 +- src/test/compile-fail/issue-7061.rs | 2 +- src/test/compile-fail/issue-7246.rs | 4 ++-- src/test/compile-fail/issue-7364.rs | 2 +- src/test/compile-fail/issue-897-2.rs | 2 +- src/test/compile-fail/kindck-copy.rs | 2 +- .../compile-fail/kindck-destructor-owned.rs | 2 +- src/test/compile-fail/kindck-nonsendable-1.rs | 2 +- src/test/compile-fail/linkage2.rs | 2 +- src/test/compile-fail/linkage3.rs | 2 +- src/test/compile-fail/lint-allocation.rs | 2 +- src/test/compile-fail/lint-change-warnings.rs | 4 ++-- src/test/compile-fail/lint-ctypes-enum.rs | 4 ++-- src/test/compile-fail/lint-ctypes.rs | 2 +- src/test/compile-fail/lint-dead-code-1.rs | 12 +++++----- src/test/compile-fail/lint-dead-code-2.rs | 4 ++-- src/test/compile-fail/lint-dead-code-3.rs | 8 +++---- .../lint-deprecated-owned-vector.rs | 2 +- src/test/compile-fail/lint-heap-memory.rs | 8 +++---- src/test/compile-fail/lint-impl-fn.rs | 4 ++-- .../compile-fail/lint-managed-heap-memory.rs | 4 ++-- src/test/compile-fail/lint-misplaced-attr.rs | 4 ++-- src/test/compile-fail/lint-missing-doc.rs | 10 ++++---- .../compile-fail/lint-non-camel-case-types.rs | 4 ++-- .../lint-non-uppercase-statics.rs | 4 ++-- src/test/compile-fail/lint-obsolete-attr.rs | 4 ++-- .../compile-fail/lint-owned-heap-memory.rs | 2 +- src/test/compile-fail/lint-qualification.rs | 2 +- .../compile-fail/lint-raw-ptr-deriving.rs | 6 ++--- src/test/compile-fail/lint-stability.rs | 10 ++++---- src/test/compile-fail/lint-type-limits.rs | 2 +- src/test/compile-fail/lint-type-overflow.rs | 2 +- src/test/compile-fail/lint-unknown-attr.rs | 4 ++-- src/test/compile-fail/lint-unknown-feature.rs | 4 ++-- .../compile-fail/lint-unnecessary-casts.rs | 2 +- .../compile-fail/lint-unnecessary-parens.rs | 2 +- src/test/compile-fail/lint-unsafe-block.rs | 8 +++---- .../lint-unused-import-tricky-globs.rs | 6 ++--- .../lint-unused-import-tricky-names.rs | 6 ++--- src/test/compile-fail/lint-unused-imports.rs | 8 +++---- src/test/compile-fail/lint-unused-mut-self.rs | 8 +++---- .../compile-fail/lint-unused-mut-variables.rs | 10 ++++---- src/test/compile-fail/lint-unused-unsafe.rs | 6 ++--- .../compile-fail/lint-uppercase-variables.rs | 2 +- .../lint-visible-private-types.rs | 8 +++---- src/test/compile-fail/liveness-dead.rs | 4 ++-- .../liveness-return-last-stmt-semi.rs | 2 +- src/test/compile-fail/liveness-unused.rs | 6 ++--- .../macro-crate-unexported-macro.rs | 2 +- .../compile-fail/macro-crate-unknown-crate.rs | 2 +- .../compile-fail/macro-incomplete-parse.rs | 2 +- .../compile-fail/macro-inner-attributes.rs | 2 +- .../compile-fail/macro-outer-attributes.rs | 2 +- .../compile-fail/macros-nonfatal-errors.rs | 4 ++-- .../compile-fail/match-static-const-lc.rs | 4 ++-- .../compile-fail/moves-based-on-type-exprs.rs | 2 +- src/test/compile-fail/no-implicit-prelude.rs | 2 +- src/test/compile-fail/no-send-res-ports.rs | 2 +- src/test/compile-fail/no_crate_type.rs | 2 +- src/test/compile-fail/occurs-check.rs | 2 +- .../once-cant-call-twice-on-heap.rs | 2 +- .../once-cant-call-twice-on-stack.rs | 2 +- src/test/compile-fail/once-fn-subtyping.rs | 2 +- .../phase-syntax-doesnt-resolve.rs | 2 +- src/test/compile-fail/pinned-deep-copy.rs | 2 +- src/test/compile-fail/privacy-ns1.rs | 6 ++--- src/test/compile-fail/privacy-ns2.rs | 6 ++--- src/test/compile-fail/privacy1.rs | 4 ++-- src/test/compile-fail/privacy2.rs | 4 ++-- src/test/compile-fail/privacy3.rs | 4 ++-- src/test/compile-fail/privacy4.rs | 4 ++-- .../regions-infer-borrow-scope-too-big.rs | 2 +- .../regions-infer-borrow-scope-within-loop.rs | 2 +- ...ns-infer-invariance-due-to-mutability-3.rs | 2 +- ...ns-infer-invariance-due-to-mutability-4.rs | 2 +- .../regions-infer-paramd-indirect.rs | 2 +- src/test/compile-fail/simd-experimental.rs | 2 +- src/test/compile-fail/simd-type.rs | 2 +- src/test/compile-fail/static-assert.rs | 2 +- src/test/compile-fail/static-assert2.rs | 2 +- src/test/compile-fail/static-region-bound.rs | 2 +- .../compile-fail/std-uncopyable-atomics.rs | 2 +- .../struct-like-enum-nonexhaustive.rs | 2 +- .../syntax-extension-fourcc-bad-len.rs | 2 +- .../syntax-extension-fourcc-invalid-endian.rs | 2 +- .../syntax-extension-fourcc-non-ascii-str.rs | 2 +- .../syntax-extension-fourcc-non-literal.rs | 2 +- ...ax-extension-fourcc-unsupported-literal.rs | 2 +- .../syntax-extension-hexfloat-bad-lits.rs | 2 +- .../syntax-extension-hexfloat-bad-types.rs | 2 +- src/test/compile-fail/terr-sorts.rs | 2 +- src/test/compile-fail/trace_macros-format.rs | 2 +- .../trait-impl-method-mismatch.rs | 2 +- src/test/compile-fail/unique-unique-kind.rs | 2 +- src/test/compile-fail/unique-vec-res.rs | 2 +- src/test/compile-fail/unreachable-code.rs | 4 ++-- ...unsafe-around-compiler-generated-unsafe.rs | 2 +- src/test/compile-fail/unsendable-class.rs | 2 +- src/test/compile-fail/unused-result.rs | 4 ++-- .../compile-fail/warn-foreign-int-types.rs | 4 ++-- src/test/run-pass/macro-meta-items.rs | 1 + 327 files changed, 646 insertions(+), 643 deletions(-) diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 6c70362dbb336..1491555fea08c 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[crate_type = "bin"]; -#[feature(phase)]; +#![crate_type = "bin"] +#![feature(phase)] -#[allow(non_camel_case_types)]; -#[deny(warnings)]; +#![allow(non_camel_case_types)] +#![deny(warnings)] extern crate test; extern crate getopts; diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs index 49340008ce88d..cd857afb5c40f 100644 --- a/src/libarena/lib.rs +++ b/src/libarena/lib.rs @@ -15,15 +15,15 @@ //! of individual objects while the arena itself is still alive. The benefit //! of an arena is very fast allocation; just a pointer bump. -#[crate_id = "arena#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[allow(missing_doc)]; -#[feature(managed_boxes)]; +#![crate_id = "arena#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![allow(missing_doc)] +#![feature(managed_boxes)] extern crate collections; diff --git a/src/libcollections/bitv.rs b/src/libcollections/bitv.rs index 7075e47bddf7b..8a78e4fde75bd 100644 --- a/src/libcollections/bitv.rs +++ b/src/libcollections/bitv.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(missing_doc)]; +#![allow(missing_doc)] use std::cmp; diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index fba85b0523127..a83804828e8b5 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -12,15 +12,15 @@ * Collection types. */ -#[crate_id = "collections#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; +#![crate_id = "collections#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] -#[feature(macro_rules, managed_boxes, default_type_params, phase)]; +#![feature(macro_rules, managed_boxes, default_type_params, phase)] extern crate rand; diff --git a/src/libcollections/priority_queue.rs b/src/libcollections/priority_queue.rs index 65ccfe3ff7080..3d2f260d3809c 100644 --- a/src/libcollections/priority_queue.rs +++ b/src/libcollections/priority_queue.rs @@ -10,7 +10,7 @@ //! A priority queue implemented with a binary heap -#[allow(missing_doc)]; +#![allow(missing_doc)] use std::clone::Clone; use std::mem::{move_val_init, init, replace, swap}; diff --git a/src/libcollections/smallintmap.rs b/src/libcollections/smallintmap.rs index 64be1b92e262f..fb7921b315ff5 100644 --- a/src/libcollections/smallintmap.rs +++ b/src/libcollections/smallintmap.rs @@ -13,7 +13,7 @@ * are O(highest integer key). */ -#[allow(missing_doc)]; +#![allow(missing_doc)] use std::iter::{Enumerate, FilterMap, Rev}; use std::mem::replace; diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs index ca9475a0b233b..2e2224bde842c 100644 --- a/src/libflate/lib.rs +++ b/src/libflate/lib.rs @@ -14,15 +14,15 @@ Simple compression */ -#[crate_id = "flate#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[feature(phase)]; -#[deny(deprecated_owned_vector)]; +#![crate_id = "flate#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![feature(phase)] +#![deny(deprecated_owned_vector)] #[cfg(test)] #[phase(syntax, link)] extern crate log; diff --git a/src/libfourcc/lib.rs b/src/libfourcc/lib.rs index 98ac0d834335d..bf327c1bc2753 100644 --- a/src/libfourcc/lib.rs +++ b/src/libfourcc/lib.rs @@ -39,16 +39,16 @@ fn main() { */ -#[crate_id = "fourcc#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; - -#[deny(deprecated_owned_vector)]; -#[feature(macro_registrar, managed_boxes)]; +#![crate_id = "fourcc#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] + +#![deny(deprecated_owned_vector)] +#![feature(macro_registrar, managed_boxes)] extern crate syntax; diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs index 4c6584a7d43d5..e47e7ddec2038 100644 --- a/src/libgetopts/lib.rs +++ b/src/libgetopts/lib.rs @@ -76,16 +76,16 @@ //! } //! ~~~ -#[crate_id = "getopts#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[feature(globs, phase)]; -#[deny(missing_doc)]; -#[deny(deprecated_owned_vector)]; +#![crate_id = "getopts#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![feature(globs, phase)] +#![deny(missing_doc)] +#![deny(deprecated_owned_vector)] #[cfg(test)] #[phase(syntax, link)] extern crate log; diff --git a/src/libglob/lib.rs b/src/libglob/lib.rs index 9c017a27faa1f..ec7b5b262f5ec 100644 --- a/src/libglob/lib.rs +++ b/src/libglob/lib.rs @@ -23,13 +23,13 @@ * `glob`/`fnmatch` functions. */ -#[crate_id = "glob#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; +#![crate_id = "glob#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] use std::cell::Cell; use std::{cmp, os, path}; diff --git a/src/libgreen/lib.rs b/src/libgreen/lib.rs index 12f2839f32121..f0e7e7fbf6df2 100644 --- a/src/libgreen/lib.rs +++ b/src/libgreen/lib.rs @@ -184,17 +184,17 @@ //! pool.shutdown(); //! ``` -#[crate_id = "green#0.10-pre"]; -#[license = "MIT/ASL2"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; +#![crate_id = "green#0.10-pre"] +#![license = "MIT/ASL2"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] // NB this does *not* include globs, please keep it that way. -#[feature(macro_rules, phase)]; -#[allow(visible_private_types)]; +#![feature(macro_rules, phase)] +#![allow(visible_private_types)] #[cfg(test)] #[phase(syntax, link)] extern crate log; #[cfg(test)] extern crate rustuv; diff --git a/src/libgreen/macros.rs b/src/libgreen/macros.rs index ab106138ae108..599ef8d407711 100644 --- a/src/libgreen/macros.rs +++ b/src/libgreen/macros.rs @@ -10,7 +10,7 @@ // FIXME: this file probably shouldn't exist -#[macro_escape]; +#![macro_escape] use std::fmt; diff --git a/src/libhexfloat/lib.rs b/src/libhexfloat/lib.rs index 1be7239337257..3ed0d598dd8e0 100644 --- a/src/libhexfloat/lib.rs +++ b/src/libhexfloat/lib.rs @@ -36,16 +36,16 @@ fn main() { */ -#[crate_id = "hexfloat#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; - -#[deny(deprecated_owned_vector)]; -#[feature(macro_registrar, managed_boxes)]; +#![crate_id = "hexfloat#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] + +#![deny(deprecated_owned_vector)] +#![feature(macro_registrar, managed_boxes)] extern crate syntax; diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index 765b3dabd7b87..8013ebe651107 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -105,16 +105,16 @@ if logging is disabled, none of the components of the log will be executed. */ -#[crate_id = "log#0.10-pre"]; -#[license = "MIT/ASL2"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; - -#[feature(macro_rules)]; -#[deny(missing_doc, deprecated_owned_vector)]; +#![crate_id = "log#0.10-pre"] +#![license = "MIT/ASL2"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] + +#![feature(macro_rules)] +#![deny(missing_doc, deprecated_owned_vector)] extern crate sync; diff --git a/src/liblog/macros.rs b/src/liblog/macros.rs index 1560eeebfcab2..e57deb77a89ee 100644 --- a/src/liblog/macros.rs +++ b/src/liblog/macros.rs @@ -10,7 +10,7 @@ //! Logging macros -#[macro_escape]; +#![macro_escape] /// The standard logging macro /// diff --git a/src/libnative/lib.rs b/src/libnative/lib.rs index 59b3437ad9a33..d06ca15f30c3b 100644 --- a/src/libnative/lib.rs +++ b/src/libnative/lib.rs @@ -41,15 +41,15 @@ //! } //! ``` -#[crate_id = "native#0.10-pre"]; -#[license = "MIT/ASL2"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[deny(unused_result, unused_must_use)]; -#[allow(non_camel_case_types)]; +#![crate_id = "native#0.10-pre"] +#![license = "MIT/ASL2"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![deny(unused_result, unused_must_use)] +#![allow(non_camel_case_types)] // NB this crate explicitly does *not* allow glob imports, please seriously // consider whether they're needed before adding that feature here (the diff --git a/src/libnum/complex.rs b/src/libnum/complex.rs index b226e773dbb88..3dcd73568c6f3 100644 --- a/src/libnum/complex.rs +++ b/src/libnum/complex.rs @@ -190,7 +190,7 @@ impl ToStrRadix for Cmplx { #[cfg(test)] mod test { - #[allow(non_uppercase_statics)]; + #![allow(non_uppercase_statics)] use super::{Complex64, Cmplx}; use std::num::{Zero,One,Float}; diff --git a/src/libnum/lib.rs b/src/libnum/lib.rs index 501ae23e27d1e..453dd3c0834c2 100644 --- a/src/libnum/lib.rs +++ b/src/libnum/lib.rs @@ -8,17 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(macro_rules)]; +#![feature(macro_rules)] -#[crate_id = "num#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; +#![crate_id = "num#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] -#[deny(deprecated_owned_vector)]; +#![deny(deprecated_owned_vector)] extern crate rand; diff --git a/src/librand/lib.rs b/src/librand/lib.rs index e405ace38670b..f8183b08ce9dc 100644 --- a/src/librand/lib.rs +++ b/src/librand/lib.rs @@ -62,15 +62,15 @@ println!("{:?}", tuple_ptr) ``` */ -#[crate_id = "rand#0.10-pre"]; -#[license = "MIT/ASL2"]; -#[crate_type = "dylib"]; -#[crate_type = "rlib"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; - -#[feature(macro_rules, managed_boxes, phase)]; +#![crate_id = "rand#0.10-pre"] +#![license = "MIT/ASL2"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] + +#![feature(macro_rules, managed_boxes, phase)] #[cfg(test)] #[phase(syntax, link)] extern crate log; diff --git a/src/librustc/back/target_strs.rs b/src/librustc/back/target_strs.rs index 1528fff511310..f046069bc0b5a 100644 --- a/src/librustc/back/target_strs.rs +++ b/src/librustc/back/target_strs.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] pub struct t { module_asm: ~str, diff --git a/src/librustc/front/test.rs b/src/librustc/front/test.rs index cb6b5eefadeb5..14ac2143e5514 100644 --- a/src/librustc/front/test.rs +++ b/src/librustc/front/test.rs @@ -10,8 +10,8 @@ // Code that generates a test runner to run all the tests in a crate -#[allow(dead_code)]; -#[allow(unused_imports)]; +#![allow(dead_code)] +#![allow(unused_imports)] use driver::session::Session; use front::config; diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index ea7db3db67f47..f187ff641c23a 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -18,18 +18,18 @@ This API is completely unstable and subject to change. */ -#[crate_id = "rustc#0.10-pre"]; -#[comment = "The Rust compiler"]; -#[license = "MIT/ASL2"]; -#[crate_type = "dylib"]; -#[crate_type = "rlib"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", +#![crate_id = "rustc#0.10-pre"] +#![comment = "The Rust compiler"] +#![license = "MIT/ASL2"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; + html_root_url = "http://static.rust-lang.org/doc/master")] -#[allow(deprecated)]; -#[feature(macro_rules, globs, struct_variant, managed_boxes, quote, - default_type_params, phase)]; +#![allow(deprecated)] +#![feature(macro_rules, globs, struct_variant, managed_boxes, quote, + default_type_params, phase)] extern crate flate; extern crate arena; diff --git a/src/librustc/lib/llvm.rs b/src/librustc/lib/llvm.rs index 36ebb3d513944..cfd605d33b597 100644 --- a/src/librustc/lib/llvm.rs +++ b/src/librustc/lib/llvm.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_uppercase_pattern_statics)]; -#[allow(non_camel_case_types)]; +#![allow(non_uppercase_pattern_statics)] +#![allow(non_camel_case_types)] use std::c_str::ToCStr; use std::cell::RefCell; diff --git a/src/librustc/metadata/common.rs b/src/librustc/metadata/common.rs index 7b7d526411c93..5a36a610e27eb 100644 --- a/src/librustc/metadata/common.rs +++ b/src/librustc/metadata/common.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use std::cast; use syntax::crateid::CrateId; diff --git a/src/librustc/metadata/creader.rs b/src/librustc/metadata/creader.rs index 958c6373a8c9a..5575bb5182630 100644 --- a/src/librustc/metadata/creader.rs +++ b/src/librustc/metadata/creader.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] //! Validates all used crates and extern libraries and loads their metadata diff --git a/src/librustc/metadata/csearch.rs b/src/librustc/metadata/csearch.rs index 47202feef9a16..81ebb97760147 100644 --- a/src/librustc/metadata/csearch.rs +++ b/src/librustc/metadata/csearch.rs @@ -10,7 +10,7 @@ // Searching for information from the cstore -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use metadata::common::*; use metadata::cstore; diff --git a/src/librustc/metadata/cstore.rs b/src/librustc/metadata/cstore.rs index 02c092ca50832..63a385631830d 100644 --- a/src/librustc/metadata/cstore.rs +++ b/src/librustc/metadata/cstore.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] // The crate store - a central repo for information collected about external // crates and libraries diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs index f61e85f3f3f9d..5e058291b4437 100644 --- a/src/librustc/metadata/decoder.rs +++ b/src/librustc/metadata/decoder.rs @@ -10,7 +10,7 @@ // Decoding metadata from a single crate's metadata -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use back::svh::Svh; use metadata::cstore::crate_metadata; diff --git a/src/librustc/metadata/encoder.rs b/src/librustc/metadata/encoder.rs index 5b47f1f56216b..abadd4aedb11d 100644 --- a/src/librustc/metadata/encoder.rs +++ b/src/librustc/metadata/encoder.rs @@ -10,8 +10,8 @@ // Metadata encoding -#[allow(unused_must_use)]; // everything is just a MemWriter, can't fail -#[allow(non_camel_case_types)]; +#![allow(unused_must_use)] // everything is just a MemWriter, can't fail +#![allow(non_camel_case_types)] use back::svh::Svh; use metadata::common::*; diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs index 7aed0e5b7f409..8bb4942e06fd5 100644 --- a/src/librustc/metadata/filesearch.rs +++ b/src/librustc/metadata/filesearch.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use std::cell::RefCell; use std::os; diff --git a/src/librustc/metadata/tydecode.rs b/src/librustc/metadata/tydecode.rs index d0d79093cabce..7ff36f13b75b9 100644 --- a/src/librustc/metadata/tydecode.rs +++ b/src/librustc/metadata/tydecode.rs @@ -14,7 +14,7 @@ // tjc note: Would be great to have a `match check` macro equivalent // for some of these -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use middle::ty; diff --git a/src/librustc/metadata/tyencode.rs b/src/librustc/metadata/tyencode.rs index e2c25a2536608..446e42224ddd3 100644 --- a/src/librustc/metadata/tyencode.rs +++ b/src/librustc/metadata/tyencode.rs @@ -10,8 +10,8 @@ // Type encoding -#[allow(unused_must_use)]; // as with encoding, everything is a no-fail MemWriter -#[allow(non_camel_case_types)]; +#![allow(unused_must_use)] // as with encoding, everything is a no-fail MemWriter +#![allow(non_camel_case_types)] use std::cell::RefCell; use collections::HashMap; diff --git a/src/librustc/middle/astencode.rs b/src/librustc/middle/astencode.rs index fd72a5f838a6e..8873f1cfd3346 100644 --- a/src/librustc/middle/astencode.rs +++ b/src/librustc/middle/astencode.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] // FIXME: remove this after snapshot, and Results are handled -#[allow(unused_must_use)]; +#![allow(unused_must_use)] use c = metadata::common; use cstore = metadata::cstore; diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs index d7d936a704893..30b965082ca0f 100644 --- a/src/librustc/middle/borrowck/mod.rs +++ b/src/librustc/middle/borrowck/mod.rs @@ -10,7 +10,7 @@ /*! See doc.rs for a thorough explanation of the borrow checker */ -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use mc = middle::mem_categorization; use middle::ty; diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs index 12c22edcd2ec9..2c2fe87c9bed1 100644 --- a/src/librustc/middle/check_match.rs +++ b/src/librustc/middle/check_match.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use middle::const_eval::{compare_const_vals, lookup_const_by_id}; use middle::const_eval::{eval_const_expr, const_val, const_bool, const_float}; diff --git a/src/librustc/middle/const_eval.rs b/src/librustc/middle/const_eval.rs index 8d7cff98f42be..7fadfff21d119 100644 --- a/src/librustc/middle/const_eval.rs +++ b/src/librustc/middle/const_eval.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use metadata::csearch; use middle::astencode; diff --git a/src/librustc/middle/freevars.rs b/src/librustc/middle/freevars.rs index 84a3bb525af95..c2ea2f4596442 100644 --- a/src/librustc/middle/freevars.rs +++ b/src/librustc/middle/freevars.rs @@ -11,7 +11,7 @@ // A pass that annotates for each loops and functions with the free // variables that they contain. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use middle::resolve; use middle::ty; diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs index a0f52021b6e4a..4a9b990feb39f 100644 --- a/src/librustc/middle/lint.rs +++ b/src/librustc/middle/lint.rs @@ -33,7 +33,7 @@ //! modify the Context visitor appropriately. If you're adding lints from the //! Context itself, span_lint should be used instead of add_lint. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use driver::session; use metadata::csearch; diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs index 1eb6ab4a8b889..acccbe164c35e 100644 --- a/src/librustc/middle/mem_categorization.rs +++ b/src/librustc/middle/mem_categorization.rs @@ -60,7 +60,7 @@ * tied to `x`. The type of `x'` will be a borrowed pointer. */ -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use middle::ty; use middle::typeck; diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs index d86e05395b4c8..0f283ca2f897e 100644 --- a/src/librustc/middle/resolve.rs +++ b/src/librustc/middle/resolve.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use driver::session::Session; use metadata::csearch; diff --git a/src/librustc/middle/trans/_match.rs b/src/librustc/middle/trans/_match.rs index 317d5e4e67225..6e692443300f5 100644 --- a/src/librustc/middle/trans/_match.rs +++ b/src/librustc/middle/trans/_match.rs @@ -192,7 +192,7 @@ * */ -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use back::abi; use driver::session::FullDebugInfo; diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs index a81301f4f3e6d..f1aa40fac59cb 100644 --- a/src/librustc/middle/trans/base.rs +++ b/src/librustc/middle/trans/base.rs @@ -23,7 +23,7 @@ // but one TypeRef corresponds to many `ty::t`s; for instance, tup(int, int, // int) and rec(x=int, y=int, z=int) will have the same TypeRef. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use back::link::{mangle_exported_name}; use back::{link, abi}; diff --git a/src/librustc/middle/trans/cabi_arm.rs b/src/librustc/middle/trans/cabi_arm.rs index 5dc9a91574606..ee2c6454aeedb 100644 --- a/src/librustc/middle/trans/cabi_arm.rs +++ b/src/librustc/middle/trans/cabi_arm.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_uppercase_pattern_statics)]; +#![allow(non_uppercase_pattern_statics)] use lib::llvm::{llvm, Integer, Pointer, Float, Double, Struct, Array}; use lib::llvm::StructRetAttribute; diff --git a/src/librustc/middle/trans/cabi_mips.rs b/src/librustc/middle/trans/cabi_mips.rs index a373207585595..cbcecb2220dc0 100644 --- a/src/librustc/middle/trans/cabi_mips.rs +++ b/src/librustc/middle/trans/cabi_mips.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_uppercase_pattern_statics)]; +#![allow(non_uppercase_pattern_statics)] use std::libc::c_uint; use std::cmp; diff --git a/src/librustc/middle/trans/cabi_x86_64.rs b/src/librustc/middle/trans/cabi_x86_64.rs index dbb258ea3997c..0ed87ef8092ea 100644 --- a/src/librustc/middle/trans/cabi_x86_64.rs +++ b/src/librustc/middle/trans/cabi_x86_64.rs @@ -11,7 +11,7 @@ // The classification code for the x86_64 ABI is taken from the clay language // https://github.com/jckarter/clay/blob/master/compiler/src/externals.cpp -#[allow(non_uppercase_pattern_statics)]; +#![allow(non_uppercase_pattern_statics)] use lib::llvm::{llvm, Integer, Pointer, Float, Double}; use lib::llvm::{Struct, Array, Attribute}; diff --git a/src/librustc/middle/trans/common.rs b/src/librustc/middle/trans/common.rs index 78700bab3f24d..86413406ba561 100644 --- a/src/librustc/middle/trans/common.rs +++ b/src/librustc/middle/trans/common.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] //! Code that is useful in various trans modules. diff --git a/src/librustc/middle/trans/expr.rs b/src/librustc/middle/trans/expr.rs index 5baf405620646..f1cd46923d71d 100644 --- a/src/librustc/middle/trans/expr.rs +++ b/src/librustc/middle/trans/expr.rs @@ -31,7 +31,7 @@ * See doc.rs for more comments. */ -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use back::abi; use lib::llvm::{ValueRef, llvm}; diff --git a/src/librustc/middle/trans/intrinsic.rs b/src/librustc/middle/trans/intrinsic.rs index 9618d08206888..95c0b08d400ea 100644 --- a/src/librustc/middle/trans/intrinsic.rs +++ b/src/librustc/middle/trans/intrinsic.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_uppercase_pattern_statics)]; +#![allow(non_uppercase_pattern_statics)] use arena::TypedArena; use lib::llvm::{SequentiallyConsistent, Acquire, Release, Xchg}; diff --git a/src/librustc/middle/trans/macros.rs b/src/librustc/middle/trans/macros.rs index 938484fd44ceb..313280cb7a8cc 100644 --- a/src/librustc/middle/trans/macros.rs +++ b/src/librustc/middle/trans/macros.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[macro_escape]; +#![macro_escape] macro_rules! unpack_datum( ($bcx: ident, $inp: expr) => ( diff --git a/src/librustc/middle/trans/tvec.rs b/src/librustc/middle/trans/tvec.rs index 1a54c25e36408..c30dde3a1e2fb 100644 --- a/src/librustc/middle/trans/tvec.rs +++ b/src/librustc/middle/trans/tvec.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use back::abi; use lib; diff --git a/src/librustc/middle/trans/type_.rs b/src/librustc/middle/trans/type_.rs index 7155c73c0026e..ca6c0afc8b5e0 100644 --- a/src/librustc/middle/trans/type_.rs +++ b/src/librustc/middle/trans/type_.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_uppercase_pattern_statics)]; +#![allow(non_uppercase_pattern_statics)] use lib::llvm::{llvm, TypeRef, Bool, False, True, TypeKind}; use lib::llvm::{Float, Double, X86_FP80, PPC_FP128, FP128}; diff --git a/src/librustc/middle/trans/type_of.rs b/src/librustc/middle/trans/type_of.rs index 684a6624c5e1a..a78520c8f6bfd 100644 --- a/src/librustc/middle/trans/type_of.rs +++ b/src/librustc/middle/trans/type_of.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use middle::trans::adt; use middle::trans::common::*; diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 3ec928d5f4669..a86348947f138 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use back::svh::Svh; use driver::session::Session; diff --git a/src/librustc/middle/typeck/check/_match.rs b/src/librustc/middle/typeck/check/_match.rs index 9518e16d269e9..a4b78bc3db2cc 100644 --- a/src/librustc/middle/typeck/check/_match.rs +++ b/src/librustc/middle/typeck/check/_match.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use middle::pat_util::{PatIdMap, pat_id_map, pat_is_binding, pat_is_const}; use middle::ty; diff --git a/src/librustc/middle/typeck/infer/macros.rs b/src/librustc/middle/typeck/infer/macros.rs index 306f124be3c8f..d3e81f07f7dc1 100644 --- a/src/librustc/middle/typeck/infer/macros.rs +++ b/src/librustc/middle/typeck/infer/macros.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[macro_escape]; +#![macro_escape] macro_rules! if_ok( ($inp: expr) => ( diff --git a/src/librustc/middle/typeck/infer/mod.rs b/src/librustc/middle/typeck/infer/mod.rs index a6baf9ef7bf9b..8084b712e5330 100644 --- a/src/librustc/middle/typeck/infer/mod.rs +++ b/src/librustc/middle/typeck/infer/mod.rs @@ -10,7 +10,7 @@ /*! See doc.rs for documentation */ -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] pub use middle::ty::IntVarValue; pub use middle::typeck::infer::resolve::resolve_and_force_all_but_regions; diff --git a/src/librustc/middle/typeck/mod.rs b/src/librustc/middle/typeck/mod.rs index 67db5b7f39620..e68bb70fc9adb 100644 --- a/src/librustc/middle/typeck/mod.rs +++ b/src/librustc/middle/typeck/mod.rs @@ -59,7 +59,7 @@ independently: */ -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use driver::session; diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs index 732723fec9cd5..c264916ab42df 100644 --- a/src/librustc/util/common.rs +++ b/src/librustc/util/common.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use syntax::ast; use syntax::codemap::{Span}; diff --git a/src/librustdoc/flock.rs b/src/librustdoc/flock.rs index c1e5d66b1d214..c2524d2b545f7 100644 --- a/src/librustdoc/flock.rs +++ b/src/librustdoc/flock.rs @@ -14,7 +14,7 @@ //! green/native threading. This is just a bare-bones enough solution for //! librustdoc, it is not production quality at all. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] pub use self::imp::Lock; diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index b162d9d4b7895..c52a6267657b3 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -24,7 +24,7 @@ //! // ... something using html //! ``` -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use std::cast; use std::fmt; diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 38b3901a0eea3..944cc08f2e37d 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[crate_id = "rustdoc#0.10-pre"]; -#[desc = "rustdoc, the Rust documentation extractor"]; -#[license = "MIT/ASL2"]; -#[crate_type = "dylib"]; -#[crate_type = "rlib"]; +#![crate_id = "rustdoc#0.10-pre"] +#![desc = "rustdoc, the Rust documentation extractor"] +#![license = "MIT/ASL2"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] -#[feature(globs, struct_variant, managed_boxes, macro_rules, phase)]; +#![feature(globs, struct_variant, managed_boxes, macro_rules, phase)] extern crate syntax; extern crate rustc; diff --git a/src/librustuv/homing.rs b/src/librustuv/homing.rs index 3ece7662dd57c..aa345ca32aa7e 100644 --- a/src/librustuv/homing.rs +++ b/src/librustuv/homing.rs @@ -31,7 +31,7 @@ //! This enqueueing is done with a concurrent queue from libstd, and the //! signalling is achieved with an async handle. -#[allow(dead_code)]; +#![allow(dead_code)] use std::cast; use std::rt::local::Local; diff --git a/src/librustuv/lib.rs b/src/librustuv/lib.rs index 41a6651cc1cab..427dd87a0a189 100644 --- a/src/librustuv/lib.rs +++ b/src/librustuv/lib.rs @@ -34,14 +34,14 @@ via `close` and `delete` methods. */ -#[crate_id = "rustuv#0.10-pre"]; -#[license = "MIT/ASL2"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; - -#[feature(macro_rules)]; -#[deny(unused_result, unused_must_use)]; -#[allow(visible_private_types)]; +#![crate_id = "rustuv#0.10-pre"] +#![license = "MIT/ASL2"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] + +#![feature(macro_rules)] +#![deny(unused_result, unused_must_use)] +#![allow(visible_private_types)] #[cfg(test)] extern crate green; #[cfg(test)] extern crate realrustuv = "rustuv"; diff --git a/src/librustuv/macros.rs b/src/librustuv/macros.rs index 75b68e3a52885..a51b842f13970 100644 --- a/src/librustuv/macros.rs +++ b/src/librustuv/macros.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[macro_escape]; +#![macro_escape] use std::fmt; diff --git a/src/librustuv/queue.rs b/src/librustuv/queue.rs index e998b5ca20b30..ad0de0b46c9cf 100644 --- a/src/librustuv/queue.rs +++ b/src/librustuv/queue.rs @@ -18,7 +18,7 @@ //! event loop alive we use uv_ref and uv_unref in order to control when the //! async handle is active or not. -#[allow(dead_code)]; +#![allow(dead_code)] use std::cast; use std::libc::{c_void, c_int}; diff --git a/src/librustuv/uvll.rs b/src/librustuv/uvll.rs index 25f4fb0edf8f4..578f90dee9aa7 100644 --- a/src/librustuv/uvll.rs +++ b/src/librustuv/uvll.rs @@ -27,7 +27,7 @@ * the mappings should be added in this module. */ -#[allow(non_camel_case_types)]; // C types +#![allow(non_camel_case_types)] // C types use std::libc::{size_t, c_int, c_uint, c_void, c_char, c_double}; use std::libc::{ssize_t, sockaddr, free, addrinfo}; diff --git a/src/libsemver/lib.rs b/src/libsemver/lib.rs index 42205207357b7..c30c0075e355b 100644 --- a/src/libsemver/lib.rs +++ b/src/libsemver/lib.rs @@ -28,14 +28,14 @@ //! An example version number with all five components is //! `0.8.1-rc.3.0+20130922.linux`. -#[crate_id = "semver#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[deny(deprecated_owned_vector)]; +#![crate_id = "semver#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![deny(deprecated_owned_vector)] use std::char; use std::cmp; diff --git a/src/libserialize/ebml.rs b/src/libserialize/ebml.rs index cc2385665a21a..cf1720041cc4f 100644 --- a/src/libserialize/ebml.rs +++ b/src/libserialize/ebml.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(missing_doc)]; +#![allow(missing_doc)] use std::io; use std::str; diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index f2bdef445bd7d..59a80f0f43224 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -11,8 +11,8 @@ // Rust JSON serialization library // Copyright (c) 2011 Google Inc. -#[forbid(non_camel_case_types)]; -#[allow(missing_doc)]; +#![forbid(non_camel_case_types)] +#![allow(missing_doc)] /*! JSON parsing and serialization diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index 86e03aae6733c..46a635c5aafce 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -14,14 +14,14 @@ Core encoding and decoding interfaces. */ -#[crate_id = "serialize#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[feature(macro_rules, managed_boxes, default_type_params, phase)]; +#![crate_id = "serialize#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![feature(macro_rules, managed_boxes, default_type_params, phase)] // test harness access #[cfg(test)] diff --git a/src/libstd/cleanup.rs b/src/libstd/cleanup.rs index 243f7b2055f39..2e51931f15a13 100644 --- a/src/libstd/cleanup.rs +++ b/src/libstd/cleanup.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[doc(hidden)]; +#![doc(hidden)] use ptr; use raw; diff --git a/src/libstd/cmp.rs b/src/libstd/cmp.rs index e956a1cdf1d63..a8d5aa6e38ee1 100644 --- a/src/libstd/cmp.rs +++ b/src/libstd/cmp.rs @@ -20,7 +20,7 @@ and `Eq` to overload the `==` and `!=` operators. */ -#[allow(missing_doc)]; +#![allow(missing_doc)] /** * Trait for values that can be compared for equality and inequality. diff --git a/src/libstd/comm/select.rs b/src/libstd/comm/select.rs index 1b2e79e02b418..23bbb5a56119e 100644 --- a/src/libstd/comm/select.rs +++ b/src/libstd/comm/select.rs @@ -43,7 +43,7 @@ //! } //! ``` -#[allow(dead_code)]; +#![allow(dead_code)] use cast; use cell::Cell; diff --git a/src/libstd/fmt/rt.rs b/src/libstd/fmt/rt.rs index 89895f305855a..2a2515754b46c 100644 --- a/src/libstd/fmt/rt.rs +++ b/src/libstd/fmt/rt.rs @@ -14,8 +14,8 @@ //! These definitions are similar to their `ct` equivalents, but differ in that //! these can be statically allocated and are slightly optimized for the runtime -#[allow(missing_doc)]; -#[doc(hidden)]; +#![allow(missing_doc)] +#![doc(hidden)] use fmt::parse; use option::Option; diff --git a/src/libstd/gc.rs b/src/libstd/gc.rs index 7fb23d77f3c6c..06a864f9a10ec 100644 --- a/src/libstd/gc.rs +++ b/src/libstd/gc.rs @@ -16,7 +16,7 @@ collector is task-local so `Gc` is not sendable. */ -#[allow(experimental)]; +#![allow(experimental)] use kinds::marker; use clone::Clone; diff --git a/src/libstd/hash/mod.rs b/src/libstd/hash/mod.rs index dc7d5c5b9c787..5e63f59f76188 100644 --- a/src/libstd/hash/mod.rs +++ b/src/libstd/hash/mod.rs @@ -61,7 +61,7 @@ * ``` */ -#[allow(unused_must_use)]; +#![allow(unused_must_use)] use container::Container; use io::Writer; diff --git a/src/libstd/intrinsics.rs b/src/libstd/intrinsics.rs index 1da9a3a710339..988140d38d43d 100644 --- a/src/libstd/intrinsics.rs +++ b/src/libstd/intrinsics.rs @@ -41,7 +41,7 @@ A quick refresher on memory ordering: */ -#[allow(missing_doc)]; +#![allow(missing_doc)] // This is needed to prevent duplicate lang item definitions. #[cfg(test)] diff --git a/src/libstd/io/extensions.rs b/src/libstd/io/extensions.rs index b9e933d0b14dd..0275d9ba8d943 100644 --- a/src/libstd/io/extensions.rs +++ b/src/libstd/io/extensions.rs @@ -10,7 +10,7 @@ //! Utility mixins that apply to all Readers and Writers -#[allow(missing_doc)]; +#![allow(missing_doc)] // FIXME: Not sure how this should be structured // FIXME: Iteration should probably be considered separately diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 3e193f246a82f..c1833e6b116aa 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -208,7 +208,7 @@ responding to errors that may occur while attempting to read the numbers. */ -#[deny(unused_must_use)]; +#![deny(unused_must_use)] use cast; use char::Char; diff --git a/src/libstd/io/net/addrinfo.rs b/src/libstd/io/net/addrinfo.rs index 6e0b766a5877e..f16db6e76c9b9 100644 --- a/src/libstd/io/net/addrinfo.rs +++ b/src/libstd/io/net/addrinfo.rs @@ -17,7 +17,7 @@ getaddrinfo() */ -#[allow(missing_doc)]; +#![allow(missing_doc)] use io::IoResult; use io::net::ip::{SocketAddr, IpAddr}; diff --git a/src/libstd/io/net/ip.rs b/src/libstd/io/net/ip.rs index fef4dd380e8c1..8cb205ab67e7c 100644 --- a/src/libstd/io/net/ip.rs +++ b/src/libstd/io/net/ip.rs @@ -13,7 +13,7 @@ //! This module contains functions useful for parsing, formatting, and //! manipulating IP addresses. -#[allow(missing_doc)]; +#![allow(missing_doc)] use container::Container; use fmt; diff --git a/src/libstd/io/net/tcp.rs b/src/libstd/io/net/tcp.rs index e343fdcd32565..61943eb3d6fb8 100644 --- a/src/libstd/io/net/tcp.rs +++ b/src/libstd/io/net/tcp.rs @@ -17,7 +17,7 @@ //! A TCP connection implements the `Reader` and `Writer` traits, while the TCP //! listener (socket server) implements the `Listener` and `Acceptor` traits. -#[deny(missing_doc)]; +#![deny(missing_doc)] use clone::Clone; use io::IoResult; diff --git a/src/libstd/io/net/unix.rs b/src/libstd/io/net/unix.rs index 1a020f9a82052..73bb6b5629826 100644 --- a/src/libstd/io/net/unix.rs +++ b/src/libstd/io/net/unix.rs @@ -22,7 +22,7 @@ instances as clients. */ -#[allow(missing_doc)]; +#![allow(missing_doc)] use prelude::*; diff --git a/src/libstd/io/pipe.rs b/src/libstd/io/pipe.rs index fbf79b194456a..43b53ca95dce6 100644 --- a/src/libstd/io/pipe.rs +++ b/src/libstd/io/pipe.rs @@ -13,7 +13,7 @@ //! Currently these aren't particularly useful, there only exists bindings //! enough so that pipes can be created to child processes. -#[allow(missing_doc)]; +#![allow(missing_doc)] use prelude::*; use io::IoResult; diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs index 4f4d2d793f6b0..0ce35018a9c62 100644 --- a/src/libstd/io/process.rs +++ b/src/libstd/io/process.rs @@ -10,7 +10,7 @@ //! Bindings for executing child processes -#[deny(missing_doc)]; +#![deny(missing_doc)] use prelude::*; diff --git a/src/libstd/io/test.rs b/src/libstd/io/test.rs index 6e98786923829..d5bd7ad24f89f 100644 --- a/src/libstd/io/test.rs +++ b/src/libstd/io/test.rs @@ -10,7 +10,7 @@ /*! Various utility functions useful for writing I/O tests */ -#[macro_escape]; +#![macro_escape] use libc; use os; diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 9e13d70b0ce18..c130b89b6d455 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -43,21 +43,21 @@ //! //! use std::prelude::*; -#[crate_id = "std#0.10-pre"]; -#[comment = "The Rust standard library"]; -#[license = "MIT/ASL2"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args, - simd, linkage, default_type_params, phase)]; +#![crate_id = "std#0.10-pre"] +#![comment = "The Rust standard library"] +#![license = "MIT/ASL2"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args, + simd, linkage, default_type_params, phase)] // Don't link to std. We are std. -#[no_std]; +#![no_std] -#[deny(missing_doc)]; +#![deny(missing_doc)] // When testing libstd, bring in libuv as the I/O backend so tests can print // things and all of the std::io tests have an I/O interface to run on top diff --git a/src/libstd/libc.rs b/src/libstd/libc.rs index 83a95952e0227..a310b95a21351 100644 --- a/src/libstd/libc.rs +++ b/src/libstd/libc.rs @@ -62,10 +62,10 @@ * dissolved. */ -#[allow(non_camel_case_types)]; -#[allow(non_uppercase_statics)]; -#[allow(missing_doc)]; -#[allow(uppercase_variables)]; +#![allow(non_camel_case_types)] +#![allow(non_uppercase_statics)] +#![allow(missing_doc)] +#![allow(uppercase_variables)] // Initial glob-exports mean that all the contents of all the modules // wind up exported, if you're interested in writing platform-specific code. diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index d183fae3ac6ee..9b1c5a406cf69 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -14,7 +14,7 @@ //! library. Each macro is available for use when linking against the standard //! library. -#[macro_escape]; +#![macro_escape] /// The entry point for failure of rust tasks. /// diff --git a/src/libstd/mem.rs b/src/libstd/mem.rs index 1f0a3b5b0bdf9..0e709445770d9 100644 --- a/src/libstd/mem.rs +++ b/src/libstd/mem.rs @@ -13,7 +13,7 @@ //! This module contains functions for querying the size and alignment of //! types, initializing and manipulating memory. -#[allow(missing_doc)]; // FIXME +#![allow(missing_doc)] // FIXME use cast; use ptr; diff --git a/src/libstd/num/cmath.rs b/src/libstd/num/cmath.rs index 13c4a812ec400..32864f14c9631 100644 --- a/src/libstd/num/cmath.rs +++ b/src/libstd/num/cmath.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(missing_doc)]; -#[allow(dead_code)]; +#![allow(missing_doc)] +#![allow(dead_code)] //! Bindings for the C math library (for basic mathematic functions) diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 323f24a52c31e..99484f41de13d 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -10,7 +10,7 @@ //! Operations and constants for 32-bits floats (`f32` type) -#[allow(missing_doc)]; +#![allow(missing_doc)] use prelude::*; diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index fc8c5f47073af..4029e111b0860 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -10,7 +10,7 @@ //! Operations and constants for 64-bits floats (`f64` type) -#[allow(missing_doc)]; +#![allow(missing_doc)] use prelude::*; diff --git a/src/libstd/num/float_macros.rs b/src/libstd/num/float_macros.rs index 7c93602af118c..3e403219a4fba 100644 --- a/src/libstd/num/float_macros.rs +++ b/src/libstd/num/float_macros.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[macro_escape]; -#[doc(hidden)]; +#![macro_escape] +#![doc(hidden)] macro_rules! assert_approx_eq( ($a:expr, $b:expr) => ({ diff --git a/src/libstd/num/i16.rs b/src/libstd/num/i16.rs index 0ecb55e510608..42710a8b459d0 100644 --- a/src/libstd/num/i16.rs +++ b/src/libstd/num/i16.rs @@ -10,7 +10,7 @@ //! Operations and constants for signed 16-bits integers (`i16` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/i32.rs b/src/libstd/num/i32.rs index 0526f2c488b20..69d4b0639f732 100644 --- a/src/libstd/num/i32.rs +++ b/src/libstd/num/i32.rs @@ -10,7 +10,7 @@ //! Operations and constants for signed 32-bits integers (`i32` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/i64.rs b/src/libstd/num/i64.rs index 0c1c01dbf4ab8..1f7066c25db3b 100644 --- a/src/libstd/num/i64.rs +++ b/src/libstd/num/i64.rs @@ -10,7 +10,7 @@ //! Operations and constants for signed 64-bits integers (`i64` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/i8.rs b/src/libstd/num/i8.rs index 881cc46201ef5..061ffddf2312e 100644 --- a/src/libstd/num/i8.rs +++ b/src/libstd/num/i8.rs @@ -10,7 +10,7 @@ //! Operations and constants for signed 8-bits integers (`i8` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/int.rs b/src/libstd/num/int.rs index 83c9e8ea855bc..66b204ee8bdc7 100644 --- a/src/libstd/num/int.rs +++ b/src/libstd/num/int.rs @@ -10,7 +10,7 @@ //! Operations and constants for architecture-sized signed integers (`int` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/int_macros.rs b/src/libstd/num/int_macros.rs index ea62a3ec374d3..1d2c38f22bb17 100644 --- a/src/libstd/num/int_macros.rs +++ b/src/libstd/num/int_macros.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[macro_escape]; -#[doc(hidden)]; +#![macro_escape] +#![doc(hidden)] macro_rules! int_module (($T:ty, $bits:expr) => ( diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs index d09cf28357bcd..feff0e7e6c0e5 100644 --- a/src/libstd/num/mod.rs +++ b/src/libstd/num/mod.rs @@ -13,7 +13,7 @@ //! These are implemented for the primitive numeric types in `std::{u8, u16, //! u32, u64, uint, i8, i16, i32, i64, int, f32, f64, float}`. -#[allow(missing_doc)]; +#![allow(missing_doc)] use clone::Clone; use cmp::{Eq, Ord}; diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 9f9a9ec8e2e3b..dc49da415a491 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(missing_doc)]; +#![allow(missing_doc)] use clone::Clone; use container::Container; diff --git a/src/libstd/num/u16.rs b/src/libstd/num/u16.rs index d1de1ff0a723c..ca473e9517e45 100644 --- a/src/libstd/num/u16.rs +++ b/src/libstd/num/u16.rs @@ -10,7 +10,7 @@ //! Operations and constants for unsigned 16-bits integers (`u16` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/u32.rs b/src/libstd/num/u32.rs index 1caec67802539..2a0b9aac667af 100644 --- a/src/libstd/num/u32.rs +++ b/src/libstd/num/u32.rs @@ -10,7 +10,7 @@ //! Operations and constants for unsigned 32-bits integers (`u32` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/u64.rs b/src/libstd/num/u64.rs index ab495834eaa5f..2cfc5da95e8ba 100644 --- a/src/libstd/num/u64.rs +++ b/src/libstd/num/u64.rs @@ -10,7 +10,7 @@ //! Operations and constants for unsigned 64-bits integer (`u64` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/u8.rs b/src/libstd/num/u8.rs index a0ef574f6cf2f..30ed13a5952b4 100644 --- a/src/libstd/num/u8.rs +++ b/src/libstd/num/u8.rs @@ -10,7 +10,7 @@ //! Operations and constants for unsigned 8-bits integers (`u8` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/uint.rs b/src/libstd/num/uint.rs index 95d4a3a50be57..6751fdb5d252c 100644 --- a/src/libstd/num/uint.rs +++ b/src/libstd/num/uint.rs @@ -10,7 +10,7 @@ //! Operations and constants for architecture-sized unsigned integers (`uint` type) -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] use prelude::*; diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs index 719afeb78784a..ece30e72e0682 100644 --- a/src/libstd/num/uint_macros.rs +++ b/src/libstd/num/uint_macros.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[macro_escape]; -#[doc(hidden)]; +#![macro_escape] +#![doc(hidden)] macro_rules! uint_module (($T:ty, $T_SIGNED:ty, $bits:expr) => ( diff --git a/src/libstd/os.rs b/src/libstd/os.rs index eeebede6c5833..b84ba6a501c2a 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -26,7 +26,7 @@ * to write OS-ignorant code by default. */ -#[allow(missing_doc)]; +#![allow(missing_doc)] #[cfg(target_os = "macos")] #[cfg(windows)] diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index d488997b0c292..a641787dfd15c 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -637,7 +637,7 @@ impl Path { /// See str_components() for details. pub fn components<'a>(&'a self) -> Components<'a> { fn convert<'a>(x: Option<&'a str>) -> &'a [u8] { - #[inline]; + #![inline] x.unwrap().as_bytes() } self.str_components().map(convert) @@ -647,7 +647,7 @@ impl Path { /// See str_components() for details. pub fn rev_components<'a>(&'a self) -> RevComponents<'a> { fn convert<'a>(x: Option<&'a str>) -> &'a [u8] { - #[inline]; + #![inline] x.unwrap().as_bytes() } self.rev_str_components().map(convert) diff --git a/src/libstd/raw.rs b/src/libstd/raw.rs index 94ad268f51206..d776b05bcd9de 100644 --- a/src/libstd/raw.rs +++ b/src/libstd/raw.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(missing_doc)]; +#![allow(missing_doc)] //! Contains struct definitions for the layout of compiler built-in types. //! diff --git a/src/libstd/reflect.rs b/src/libstd/reflect.rs index a9e70bd3c6316..183318cbfdb42 100644 --- a/src/libstd/reflect.rs +++ b/src/libstd/reflect.rs @@ -14,7 +14,7 @@ Runtime type reflection */ -#[allow(missing_doc)]; +#![allow(missing_doc)] use intrinsics::{Disr, Opaque, TyDesc, TyVisitor}; use mem; diff --git a/src/libstd/repr.rs b/src/libstd/repr.rs index 675250a271008..e15ca3c0320d6 100644 --- a/src/libstd/repr.rs +++ b/src/libstd/repr.rs @@ -14,7 +14,7 @@ More runtime type reflection */ -#[allow(missing_doc)]; +#![allow(missing_doc)] use cast::transmute; use char; diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs index 7ae2521c42352..96f95622b9213 100644 --- a/src/libstd/rt/backtrace.rs +++ b/src/libstd/rt/backtrace.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use char::Char; use container::Container; diff --git a/src/libstd/rt/bookkeeping.rs b/src/libstd/rt/bookkeeping.rs index 932cd7af033d7..9e772d8ad2385 100644 --- a/src/libstd/rt/bookkeeping.rs +++ b/src/libstd/rt/bookkeeping.rs @@ -18,8 +18,8 @@ //! each respective runtime to make sure that they call increment() and //! decrement() manually. -#[experimental]; // this is a massive code smell -#[doc(hidden)]; +#![experimental] // this is a massive code smell +#![doc(hidden)] use sync::atomics; use unstable::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT}; diff --git a/src/libstd/rt/libunwind.rs b/src/libstd/rt/libunwind.rs index fabfa2c8a7a6f..e9a925fb897fb 100644 --- a/src/libstd/rt/libunwind.rs +++ b/src/libstd/rt/libunwind.rs @@ -10,8 +10,8 @@ //! Unwind library interface -#[allow(non_camel_case_types)]; -#[allow(dead_code)]; // these are just bindings +#![allow(non_camel_case_types)] +#![allow(dead_code)] // these are just bindings use libc; diff --git a/src/libstd/rt/local_ptr.rs b/src/libstd/rt/local_ptr.rs index 898004c665d1d..30068712977b6 100644 --- a/src/libstd/rt/local_ptr.rs +++ b/src/libstd/rt/local_ptr.rs @@ -15,7 +15,7 @@ //! XXX: Add runtime checks for usage of inconsistent pointer types. //! and for overwriting an existing pointer. -#[allow(dead_code)]; +#![allow(dead_code)] use cast; use ops::Drop; diff --git a/src/libstd/rt/macros.rs b/src/libstd/rt/macros.rs index 3ef57710344dc..74675c85b96b3 100644 --- a/src/libstd/rt/macros.rs +++ b/src/libstd/rt/macros.rs @@ -13,7 +13,7 @@ //! These macros call functions which are only accessible in the `rt` module, so //! they aren't defined anywhere outside of the `rt` module. -#[macro_escape]; +#![macro_escape] macro_rules! rterrln ( ($($arg:tt)*) => ( { diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 28f11f44054ce..5e2f8efd2e35c 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -52,7 +52,7 @@ Several modules in `core` are clients of `rt`: */ // FIXME: this should not be here. -#[allow(missing_doc)]; +#![allow(missing_doc)] use any::Any; use kinds::Send; diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs index 7c4bd89546943..1802016e3b38a 100644 --- a/src/libstd/rt/thread.rs +++ b/src/libstd/rt/thread.rs @@ -14,7 +14,7 @@ //! These functions operate outside of the rust runtime, creating threads //! which are not used for scheduling in any way. -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use cast; use kinds::Send; diff --git a/src/libstd/rt/thread_local_storage.rs b/src/libstd/rt/thread_local_storage.rs index 40d9523cf3aac..2f567e91b4cdb 100644 --- a/src/libstd/rt/thread_local_storage.rs +++ b/src/libstd/rt/thread_local_storage.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(dead_code)]; +#![allow(dead_code)] #[cfg(unix)] use libc::c_int; diff --git a/src/libstd/slice.rs b/src/libstd/slice.rs index 8602c65352342..b5055dfe8b37c 100644 --- a/src/libstd/slice.rs +++ b/src/libstd/slice.rs @@ -99,7 +99,7 @@ There are a number of free functions that create or take vectors, for example: */ -#[warn(non_camel_case_types)]; +#![warn(non_camel_case_types)] use cast; use cast::transmute; diff --git a/src/libstd/str.rs b/src/libstd/str.rs index fac4202217f49..0e640d3a66262 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -4008,7 +4008,7 @@ mod tests { #[test] fn test_add() { - #[allow(unnecessary_allocation)]; + #![allow(unnecessary_allocation)] macro_rules! t ( ($s1:expr, $s2:expr, $e:expr) => { { let s1 = $s1; diff --git a/src/libstd/sync/atomics.rs b/src/libstd/sync/atomics.rs index bca7cf259444c..6cc2f85bd9542 100644 --- a/src/libstd/sync/atomics.rs +++ b/src/libstd/sync/atomics.rs @@ -105,7 +105,7 @@ //! } //! ``` -#[allow(missing_doc)]; +#![allow(missing_doc)] use intrinsics; use cast; diff --git a/src/libstd/sync/mpmc_bounded_queue.rs b/src/libstd/sync/mpmc_bounded_queue.rs index 95f592baff0b9..dfa962cdb80bd 100644 --- a/src/libstd/sync/mpmc_bounded_queue.rs +++ b/src/libstd/sync/mpmc_bounded_queue.rs @@ -25,7 +25,7 @@ * policies, either expressed or implied, of Dmitry Vyukov. */ -#[allow(missing_doc, dead_code)]; +#![allow(missing_doc, dead_code)] // http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue diff --git a/src/libstd/tuple.rs b/src/libstd/tuple.rs index c4ce6b5ae666f..732b006b24561 100644 --- a/src/libstd/tuple.rs +++ b/src/libstd/tuple.rs @@ -10,7 +10,7 @@ //! Operations on tuples -#[allow(missing_doc)]; +#![allow(missing_doc)] use clone::Clone; #[cfg(not(test))] use cmp::*; diff --git a/src/libstd/unicode.rs b/src/libstd/unicode.rs index 645db8e040b85..c98861a0fe76b 100644 --- a/src/libstd/unicode.rs +++ b/src/libstd/unicode.rs @@ -10,8 +10,8 @@ // The following code was generated by "src/etc/unicode.py" -#[allow(missing_doc)]; -#[allow(non_uppercase_statics)]; +#![allow(missing_doc)] +#![allow(non_uppercase_statics)] fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool { use cmp::{Equal, Less, Greater}; diff --git a/src/libstd/unstable/mod.rs b/src/libstd/unstable/mod.rs index 720bf011fa019..ddbf650e64a97 100644 --- a/src/libstd/unstable/mod.rs +++ b/src/libstd/unstable/mod.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[doc(hidden)]; +#![doc(hidden)] use prelude::*; use libc::uintptr_t; diff --git a/src/libstd/unstable/mutex.rs b/src/libstd/unstable/mutex.rs index 6f5ef067e891a..eda2df487aa64 100644 --- a/src/libstd/unstable/mutex.rs +++ b/src/libstd/unstable/mutex.rs @@ -56,7 +56,7 @@ //! } // `lock` is deallocated here //! ``` -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] use option::{Option, None, Some}; use ops::Drop; diff --git a/src/libstd/unstable/simd.rs b/src/libstd/unstable/simd.rs index 1029e5fdbd359..01200833b195d 100644 --- a/src/libstd/unstable/simd.rs +++ b/src/libstd/unstable/simd.rs @@ -10,7 +10,7 @@ //! SIMD vectors -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] #[experimental] #[simd] diff --git a/src/libsync/comm.rs b/src/libsync/comm.rs index 628f6459badf9..6413dccd96c95 100644 --- a/src/libsync/comm.rs +++ b/src/libsync/comm.rs @@ -14,7 +14,7 @@ Higher level communication abstractions. */ -#[allow(missing_doc)]; +#![allow(missing_doc)] use std::comm; diff --git a/src/libsync/future.rs b/src/libsync/future.rs index 8fc3dd3a460ff..94e78729aeea6 100644 --- a/src/libsync/future.rs +++ b/src/libsync/future.rs @@ -24,7 +24,7 @@ * ``` */ -#[allow(missing_doc)]; +#![allow(missing_doc)] use std::mem::replace; diff --git a/src/libsync/lib.rs b/src/libsync/lib.rs index 4df644e3b23c1..fa219009d41d5 100644 --- a/src/libsync/lib.rs +++ b/src/libsync/lib.rs @@ -12,15 +12,15 @@ * Concurrency-enabled mechanisms and primitives. */ -#[crate_id = "sync#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[feature(phase)]; -#[deny(missing_doc, deprecated_owned_vector)]; +#![crate_id = "sync#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![feature(phase)] +#![deny(missing_doc, deprecated_owned_vector)] #[cfg(test)] #[phase(syntax, link)] extern crate log; diff --git a/src/libsync/task_pool.rs b/src/libsync/task_pool.rs index e1764f970c7d9..d29e857cca656 100644 --- a/src/libsync/task_pool.rs +++ b/src/libsync/task_pool.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(missing_doc)]; +#![allow(missing_doc)] /// A task pool abstraction. Useful for achieving predictable CPU /// parallelism. diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 4de17dc598b0e..86795b6623c7c 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -18,17 +18,17 @@ This API is completely unstable and subject to change. */ -#[crate_id = "syntax#0.10-pre"]; -#[license = "MIT/ASL2"]; -#[crate_type = "dylib"]; -#[crate_type = "rlib"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; - -#[feature(macro_rules, globs, managed_boxes, default_type_params, phase, - quote)]; -#[allow(deprecated)]; +#![crate_id = "syntax#0.10-pre"] +#![license = "MIT/ASL2"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] + +#![feature(macro_rules, globs, managed_boxes, default_type_params, phase, + quote)] +#![allow(deprecated)] extern crate serialize; extern crate term; diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index b569bb28a7dc5..ddb6ddb64b433 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -93,9 +93,8 @@ impl<'a> ParserAttr for Parser<'a> { }; if permit_inner && self.eat(&token::SEMI) { - // NOTE: uncomment this after a stage0 snap - //self.warn("This uses the old attribute syntax. Semicolons - // are not longer required."); + self.span_warn(span, "this inner attribute syntax is deprecated. \ + The new syntax is `#![foo]`, with a bang and no semicolon."); style = ast::AttrInner; } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 0ae43db831584..aee843bd85706 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[macro_escape]; +#![macro_escape] use abi; use abi::AbiSet; @@ -811,6 +811,9 @@ impl<'a> Parser<'a> { pub fn warn(&mut self, m: &str) { self.sess.span_diagnostic.span_warn(self.span, m) } + pub fn span_warn(&mut self, sp: Span, m: &str) { + self.sess.span_diagnostic.span_warn(sp, m) + } pub fn span_err(&mut self, sp: Span, m: &str) { self.sess.span_diagnostic.span_err(sp, m) } diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index 5ccc6bfb91e1f..50f2118f0c4e0 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -10,17 +10,17 @@ //! Simple ANSI color library -#[crate_id = "term#0.10-pre"]; -#[comment = "Simple ANSI color library"]; -#[license = "MIT/ASL2"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; +#![crate_id = "term#0.10-pre"] +#![comment = "Simple ANSI color library"] +#![license = "MIT/ASL2"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] -#[feature(macro_rules)]; -#[deny(missing_doc)]; +#![feature(macro_rules)] +#![deny(missing_doc)] extern crate collections; diff --git a/src/libterm/terminfo/parser/compiled.rs b/src/libterm/terminfo/parser/compiled.rs index 66d322e079f35..edaa55a660319 100644 --- a/src/libterm/terminfo/parser/compiled.rs +++ b/src/libterm/terminfo/parser/compiled.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_uppercase_statics)]; +#![allow(non_uppercase_statics)] //! ncurses-compatible compiled terminfo format parsing (term(5)) diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 751dc58450f91..9084201fe99a3 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -23,17 +23,17 @@ // running tests while providing a base that other test frameworks may // build off of. -#[crate_id = "test#0.10-pre"]; -#[comment = "Rust internal test library only used by rustc"]; -#[license = "MIT/ASL2"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; - -#[feature(asm, macro_rules)]; -#[deny(deprecated_owned_vector)]; +#![crate_id = "test#0.10-pre"] +#![comment = "Rust internal test library only used by rustc"] +#![license = "MIT/ASL2"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] + +#![feature(asm, macro_rules)] +#![deny(deprecated_owned_vector)] extern crate collections; extern crate getopts; diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index 222aff3746519..3740967bc144c 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(missing_doc)]; +#![allow(missing_doc)] use std::hash::Hash; use std::io; diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs index 8b496964bc0f2..261e4e25aff31 100644 --- a/src/libtime/lib.rs +++ b/src/libtime/lib.rs @@ -8,15 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[crate_id = "time#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[feature(phase)]; -#[deny(deprecated_owned_vector)]; +#![crate_id = "time#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![feature(phase)] +#![deny(deprecated_owned_vector)] #[cfg(test)] #[phase(syntax, link)] extern crate log; extern crate serialize; diff --git a/src/liburl/lib.rs b/src/liburl/lib.rs index 031c7fafa0454..b729a7a69e21e 100644 --- a/src/liburl/lib.rs +++ b/src/liburl/lib.rs @@ -10,14 +10,14 @@ //! Types/fns concerning URLs (see RFC 3986) -#[crate_id = "url#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[feature(default_type_params)]; +#![crate_id = "url#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![feature(default_type_params)] extern crate collections; diff --git a/src/libuuid/lib.rs b/src/libuuid/lib.rs index 0065c90c91a12..1a6b00bee5624 100644 --- a/src/libuuid/lib.rs +++ b/src/libuuid/lib.rs @@ -54,15 +54,15 @@ Examples of string representations: */ -#[crate_id = "uuid#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; - -#[feature(default_type_params)]; +#![crate_id = "uuid#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] + +#![feature(default_type_params)] // test harness access #[cfg(test)] diff --git a/src/libworkcache/lib.rs b/src/libworkcache/lib.rs index a049279c5c40b..a078a770e86d5 100644 --- a/src/libworkcache/lib.rs +++ b/src/libworkcache/lib.rs @@ -8,15 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[crate_id = "workcache#0.10-pre"]; -#[crate_type = "rlib"]; -#[crate_type = "dylib"]; -#[license = "MIT/ASL2"]; -#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://static.rust-lang.org/doc/master")]; -#[feature(phase)]; -#[allow(visible_private_types)]; +#![crate_id = "workcache#0.10-pre"] +#![crate_type = "rlib"] +#![crate_type = "dylib"] +#![license = "MIT/ASL2"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] +#![feature(phase)] +#![allow(visible_private_types)] #[phase(syntax, link)] extern crate log; extern crate serialize; diff --git a/src/test/auxiliary/struct_variant_xc_aux.rs b/src/test/auxiliary/struct_variant_xc_aux.rs index 668e5c9afb352..1bd52d1d1e247 100644 --- a/src/test/auxiliary/struct_variant_xc_aux.rs +++ b/src/test/auxiliary/struct_variant_xc_aux.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[crate_id="struct_variant_xc_aux#0.1"]; -#[crate_type = "lib"]; +#![crate_id="struct_variant_xc_aux#0.1"] +#![crate_type = "lib"] -#[feature(struct_variant)]; +#![feature(struct_variant)] pub enum Enum { Variant { arg: u8 } diff --git a/src/test/compile-fail/asm-in-bad-modifier.rs b/src/test/compile-fail/asm-in-bad-modifier.rs index da4b0677f8f35..dfd9fd698c975 100644 --- a/src/test/compile-fail/asm-in-bad-modifier.rs +++ b/src/test/compile-fail/asm-in-bad-modifier.rs @@ -9,7 +9,7 @@ // except according to those terms. // ignore-fast #[feature] doesn't work with check-fast -#[feature(asm)]; +#![feature(asm)] fn foo(x: int) { println!("{}", x); } diff --git a/src/test/compile-fail/asm-misplaced-option.rs b/src/test/compile-fail/asm-misplaced-option.rs index 4f973cbbe2540..36896667281dd 100644 --- a/src/test/compile-fail/asm-misplaced-option.rs +++ b/src/test/compile-fail/asm-misplaced-option.rs @@ -11,9 +11,9 @@ // ignore-fast #[feature] doesn't work with check-fast // ignore-android -#[feature(asm)]; +#![feature(asm)] -#[allow(dead_code)]; +#![allow(dead_code)] #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")] diff --git a/src/test/compile-fail/asm-out-assign-imm.rs b/src/test/compile-fail/asm-out-assign-imm.rs index f183975ffe078..ae5c67c365ffd 100644 --- a/src/test/compile-fail/asm-out-assign-imm.rs +++ b/src/test/compile-fail/asm-out-assign-imm.rs @@ -9,7 +9,7 @@ // except according to those terms. // ignore-fast #[feature] doesn't work with check-fast -#[feature(asm)]; +#![feature(asm)] fn foo(x: int) { println!("{}", x); } diff --git a/src/test/compile-fail/asm-out-no-modifier.rs b/src/test/compile-fail/asm-out-no-modifier.rs index 475052b637eab..01aa01e09ce6b 100644 --- a/src/test/compile-fail/asm-out-no-modifier.rs +++ b/src/test/compile-fail/asm-out-no-modifier.rs @@ -9,7 +9,7 @@ // except according to those terms. // ignore-fast #[feature] doesn't work with check-fast -#[feature(asm)]; +#![feature(asm)] fn foo(x: int) { println!("{}", x); } diff --git a/src/test/compile-fail/asm-out-read-uninit.rs b/src/test/compile-fail/asm-out-read-uninit.rs index 664db071f828d..a63a59ff423b6 100644 --- a/src/test/compile-fail/asm-out-read-uninit.rs +++ b/src/test/compile-fail/asm-out-read-uninit.rs @@ -9,7 +9,7 @@ // except according to those terms. // ignore-fast #[feature] doesn't work with check-fast -#[feature(asm)]; +#![feature(asm)] fn foo(x: int) { println!("{}", x); } diff --git a/src/test/compile-fail/attr-bad-crate-attr.rc b/src/test/compile-fail/attr-bad-crate-attr.rc index 8ce20540b93b3..4ab07f4fa9918 100644 --- a/src/test/compile-fail/attr-bad-crate-attr.rc +++ b/src/test/compile-fail/attr-bad-crate-attr.rc @@ -10,5 +10,5 @@ // error-pattern: expected item -#[attr = "val"]; +#![attr = "val"] #[attr = "val"] // Unterminated diff --git a/src/test/compile-fail/auto-ref-slice-plus-ref.rs b/src/test/compile-fail/auto-ref-slice-plus-ref.rs index 8810421f6c412..8c8c0d9cfb620 100644 --- a/src/test/compile-fail/auto-ref-slice-plus-ref.rs +++ b/src/test/compile-fail/auto-ref-slice-plus-ref.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] fn main() { diff --git a/src/test/compile-fail/autoderef-full-lval.rs b/src/test/compile-fail/autoderef-full-lval.rs index 8ccf2a9e67585..ae9fe6112210b 100644 --- a/src/test/compile-fail/autoderef-full-lval.rs +++ b/src/test/compile-fail/autoderef-full-lval.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct clam { x: @int, diff --git a/src/test/compile-fail/bad-mid-path-type-params.rs b/src/test/compile-fail/bad-mid-path-type-params.rs index 12e54d09de5f3..1b72e46842862 100644 --- a/src/test/compile-fail/bad-mid-path-type-params.rs +++ b/src/test/compile-fail/bad-mid-path-type-params.rs @@ -10,7 +10,7 @@ // ignore-tidy-linelength -#[no_std]; +#![no_std] struct S { contents: T, diff --git a/src/test/compile-fail/borrowck-lend-flow-match.rs b/src/test/compile-fail/borrowck-lend-flow-match.rs index 4b59df4a98f15..9d234e0aaa632 100644 --- a/src/test/compile-fail/borrowck-lend-flow-match.rs +++ b/src/test/compile-fail/borrowck-lend-flow-match.rs @@ -10,8 +10,8 @@ // ignore-pretty -- comments are unfaithfully preserved -#[allow(unused_variable)]; -#[allow(dead_assignment)]; +#![allow(unused_variable)] +#![allow(dead_assignment)] fn cond() -> bool { fail!() } fn link<'a>(v: &'a uint, w: &mut &'a uint) -> bool { *w = v; true } diff --git a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs index 9d628c1f6c750..a6063ffefd457 100644 --- a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs +++ b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct Point { x: int, diff --git a/src/test/compile-fail/borrowck-loan-rcvr.rs b/src/test/compile-fail/borrowck-loan-rcvr.rs index dbeeb5213069b..2461f1ab39604 100644 --- a/src/test/compile-fail/borrowck-loan-rcvr.rs +++ b/src/test/compile-fail/borrowck-loan-rcvr.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct point { x: int, y: int } diff --git a/src/test/compile-fail/borrowck-move-subcomponent.rs b/src/test/compile-fail/borrowck-move-subcomponent.rs index 368ceb5adab4d..f6ca6ac42b2fe 100644 --- a/src/test/compile-fail/borrowck-move-subcomponent.rs +++ b/src/test/compile-fail/borrowck-move-subcomponent.rs @@ -11,7 +11,7 @@ // Tests that the borrow checker checks all components of a path when moving // out. -#[no_std]; +#![no_std] struct S { x : ~int diff --git a/src/test/compile-fail/borrowck-report-with-custom-diagnostic.rs b/src/test/compile-fail/borrowck-report-with-custom-diagnostic.rs index 1822cd4a89231..82189c6b7c1f1 100644 --- a/src/test/compile-fail/borrowck-report-with-custom-diagnostic.rs +++ b/src/test/compile-fail/borrowck-report-with-custom-diagnostic.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(dead_code)]; +#![allow(dead_code)] fn main() { // Original borrow ends at end of function let mut x = 1u; diff --git a/src/test/compile-fail/box-static-bound.rs b/src/test/compile-fail/box-static-bound.rs index 1ec5dfa2da9f2..c4064c6fcace6 100644 --- a/src/test/compile-fail/box-static-bound.rs +++ b/src/test/compile-fail/box-static-bound.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] fn f(x: T) -> @T { @x //~ ERROR value may contain references diff --git a/src/test/compile-fail/check-static-values-constraints.rs b/src/test/compile-fail/check-static-values-constraints.rs index 8ae40a74af188..f4e9521d6b65e 100644 --- a/src/test/compile-fail/check-static-values-constraints.rs +++ b/src/test/compile-fail/check-static-values-constraints.rs @@ -7,7 +7,7 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] // Verifies all possible restrictions for static items values. diff --git a/src/test/compile-fail/cleanup-rvalue-scopes-cf.rs b/src/test/compile-fail/cleanup-rvalue-scopes-cf.rs index 47b7b51b8f73c..01c6256173f03 100644 --- a/src/test/compile-fail/cleanup-rvalue-scopes-cf.rs +++ b/src/test/compile-fail/cleanup-rvalue-scopes-cf.rs @@ -11,7 +11,7 @@ // Test that the borrow checker prevents pointers to temporaries // with statement lifetimes from escaping. -#[feature(macro_rules)]; +#![feature(macro_rules)] use std::ops::Drop; diff --git a/src/test/compile-fail/deriving-primitive.rs b/src/test/compile-fail/deriving-primitive.rs index 0e530666a8cbf..7d8741c98e2e7 100644 --- a/src/test/compile-fail/deriving-primitive.rs +++ b/src/test/compile-fail/deriving-primitive.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(struct_variant)]; +#![feature(struct_variant)] use std::num::FromPrimitive; use std::int; diff --git a/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs index 37560444af695..7babb8ea1b9e8 100644 --- a/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Clone-enum.rs b/src/test/compile-fail/deriving-span-Clone-enum.rs index 89acf95f1563e..65404f155f10f 100644 --- a/src/test/compile-fail/deriving-span-Clone-enum.rs +++ b/src/test/compile-fail/deriving-span-Clone-enum.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Clone-struct.rs b/src/test/compile-fail/deriving-span-Clone-struct.rs index 0afcfa18c73fb..0ca429e07e9f6 100644 --- a/src/test/compile-fail/deriving-span-Clone-struct.rs +++ b/src/test/compile-fail/deriving-span-Clone-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs b/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs index d116a791620ce..e78e59baf1b1f 100644 --- a/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Default-struct.rs b/src/test/compile-fail/deriving-span-Default-struct.rs index 09afd9730fb0a..95132d9a5c718 100644 --- a/src/test/compile-fail/deriving-span-Default-struct.rs +++ b/src/test/compile-fail/deriving-span-Default-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Default-tuple-struct.rs b/src/test/compile-fail/deriving-span-Default-tuple-struct.rs index 4dbcc3de1fa5a..670f6e8ea5252 100644 --- a/src/test/compile-fail/deriving-span-Default-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Default-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Eq-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Eq-enum-struct-variant.rs index 4e9dfd96c631c..9e23493e37fdd 100644 --- a/src/test/compile-fail/deriving-span-Eq-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Eq-enum-struct-variant.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Eq-enum.rs b/src/test/compile-fail/deriving-span-Eq-enum.rs index 794c36b43d84a..d4962c8a76b35 100644 --- a/src/test/compile-fail/deriving-span-Eq-enum.rs +++ b/src/test/compile-fail/deriving-span-Eq-enum.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Eq-struct.rs b/src/test/compile-fail/deriving-span-Eq-struct.rs index 4488e74d851f1..39c9c23e8f5b1 100644 --- a/src/test/compile-fail/deriving-span-Eq-struct.rs +++ b/src/test/compile-fail/deriving-span-Eq-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Eq-tuple-struct.rs b/src/test/compile-fail/deriving-span-Eq-tuple-struct.rs index 949e1cee37a0c..a9a9a1b30713a 100644 --- a/src/test/compile-fail/deriving-span-Eq-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Eq-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs index 1323c4daf94fe..745ef50102171 100644 --- a/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Hash-enum.rs b/src/test/compile-fail/deriving-span-Hash-enum.rs index af78a1ace70ff..3cd867d118622 100644 --- a/src/test/compile-fail/deriving-span-Hash-enum.rs +++ b/src/test/compile-fail/deriving-span-Hash-enum.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Hash-struct.rs b/src/test/compile-fail/deriving-span-Hash-struct.rs index c8fdb0f19a5e9..e26bdd8d0899d 100644 --- a/src/test/compile-fail/deriving-span-Hash-struct.rs +++ b/src/test/compile-fail/deriving-span-Hash-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs b/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs index 897483c8ada40..7554db6dae356 100644 --- a/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Ord-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Ord-enum-struct-variant.rs index a99191fd0dcbe..900fa0dcb6cd3 100644 --- a/src/test/compile-fail/deriving-span-Ord-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Ord-enum-struct-variant.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq)] diff --git a/src/test/compile-fail/deriving-span-Ord-enum.rs b/src/test/compile-fail/deriving-span-Ord-enum.rs index 2be3d5c83af15..feb97dee79bec 100644 --- a/src/test/compile-fail/deriving-span-Ord-enum.rs +++ b/src/test/compile-fail/deriving-span-Ord-enum.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq)] diff --git a/src/test/compile-fail/deriving-span-Ord-struct.rs b/src/test/compile-fail/deriving-span-Ord-struct.rs index 5848bda1750ba..c0396b0822e88 100644 --- a/src/test/compile-fail/deriving-span-Ord-struct.rs +++ b/src/test/compile-fail/deriving-span-Ord-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq)] diff --git a/src/test/compile-fail/deriving-span-Ord-tuple-struct.rs b/src/test/compile-fail/deriving-span-Ord-tuple-struct.rs index 198721e9b75b1..26610d7e1fac4 100644 --- a/src/test/compile-fail/deriving-span-Ord-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Ord-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq)] diff --git a/src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs index 4fee8aa84e677..e1b112bb023c5 100644 --- a/src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Rand-enum.rs b/src/test/compile-fail/deriving-span-Rand-enum.rs index 58f8a2b44b27b..746a2aac88e8c 100644 --- a/src/test/compile-fail/deriving-span-Rand-enum.rs +++ b/src/test/compile-fail/deriving-span-Rand-enum.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Rand-struct.rs b/src/test/compile-fail/deriving-span-Rand-struct.rs index 7350f94e76b69..397b2adfcc846 100644 --- a/src/test/compile-fail/deriving-span-Rand-struct.rs +++ b/src/test/compile-fail/deriving-span-Rand-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Rand-tuple-struct.rs b/src/test/compile-fail/deriving-span-Rand-tuple-struct.rs index 0d7631e8e2077..be6b7dcbb8f81 100644 --- a/src/test/compile-fail/deriving-span-Rand-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Rand-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs index b3f94ff606d20..d50f1c692782c 100644 --- a/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Show-enum.rs b/src/test/compile-fail/deriving-span-Show-enum.rs index f3ff502c6e237..ada1abe8fbb60 100644 --- a/src/test/compile-fail/deriving-span-Show-enum.rs +++ b/src/test/compile-fail/deriving-span-Show-enum.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Show-struct.rs b/src/test/compile-fail/deriving-span-Show-struct.rs index 258efaaba0c74..8d74af6ad0b8f 100644 --- a/src/test/compile-fail/deriving-span-Show-struct.rs +++ b/src/test/compile-fail/deriving-span-Show-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Show-tuple-struct.rs b/src/test/compile-fail/deriving-span-Show-tuple-struct.rs index 002495389f391..6e421ca58f514 100644 --- a/src/test/compile-fail/deriving-span-Show-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Show-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs index 5d6d4531b40cd..8880d04ce41bf 100644 --- a/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq)] diff --git a/src/test/compile-fail/deriving-span-TotalEq-enum.rs b/src/test/compile-fail/deriving-span-TotalEq-enum.rs index b80aa2646d272..d0d8ef62f1e16 100644 --- a/src/test/compile-fail/deriving-span-TotalEq-enum.rs +++ b/src/test/compile-fail/deriving-span-TotalEq-enum.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq)] diff --git a/src/test/compile-fail/deriving-span-TotalEq-struct.rs b/src/test/compile-fail/deriving-span-TotalEq-struct.rs index 878316c4b036c..53d7e0cbe3a11 100644 --- a/src/test/compile-fail/deriving-span-TotalEq-struct.rs +++ b/src/test/compile-fail/deriving-span-TotalEq-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq)] diff --git a/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs b/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs index c590a1f216498..538ffdcd770ba 100644 --- a/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq)] diff --git a/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs index d6ca5f7267531..d0adb542fc58c 100644 --- a/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq, Ord, TotalEq)] diff --git a/src/test/compile-fail/deriving-span-TotalOrd-enum.rs b/src/test/compile-fail/deriving-span-TotalOrd-enum.rs index e53c849591412..0fc204f610147 100644 --- a/src/test/compile-fail/deriving-span-TotalOrd-enum.rs +++ b/src/test/compile-fail/deriving-span-TotalOrd-enum.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq, Ord, TotalEq)] diff --git a/src/test/compile-fail/deriving-span-TotalOrd-struct.rs b/src/test/compile-fail/deriving-span-TotalOrd-struct.rs index 8b7a9d3bea682..69cf5d2d8efb7 100644 --- a/src/test/compile-fail/deriving-span-TotalOrd-struct.rs +++ b/src/test/compile-fail/deriving-span-TotalOrd-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq, Ord, TotalEq)] diff --git a/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs b/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs index ff13923721707..230e5b7ed9989 100644 --- a/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; #[deriving(Eq, Ord, TotalEq)] diff --git a/src/test/compile-fail/deriving-span-Zero-struct.rs b/src/test/compile-fail/deriving-span-Zero-struct.rs index acebdff28ff05..f32db20ef3fe7 100644 --- a/src/test/compile-fail/deriving-span-Zero-struct.rs +++ b/src/test/compile-fail/deriving-span-Zero-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs b/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs index 64600fef2c569..66488b0ac6673 100644 --- a/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs @@ -10,7 +10,7 @@ // This file was auto-generated using 'src/etc/generate-keyword-span-tests.py' -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate rand; diff --git a/src/test/compile-fail/drop-on-non-struct.rs b/src/test/compile-fail/drop-on-non-struct.rs index e955f9d3289fe..1ce6cf55ac3f3 100644 --- a/src/test/compile-fail/drop-on-non-struct.rs +++ b/src/test/compile-fail/drop-on-non-struct.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] type Foo = Vec; diff --git a/src/test/compile-fail/dup-struct-enum-struct-variant.rs b/src/test/compile-fail/dup-struct-enum-struct-variant.rs index b9eda0765f645..064a3b9b168be 100644 --- a/src/test/compile-fail/dup-struct-enum-struct-variant.rs +++ b/src/test/compile-fail/dup-struct-enum-struct-variant.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(struct_variant)]; +#![feature(struct_variant)] enum Foo { C { a: int, b: int } } struct C { a: int, b: int } //~ ERROR error: duplicate definition of type `C` diff --git a/src/test/compile-fail/gated-bad-feature.rs b/src/test/compile-fail/gated-bad-feature.rs index ed4d32ada0987..5a68afaceb93a 100644 --- a/src/test/compile-fail/gated-bad-feature.rs +++ b/src/test/compile-fail/gated-bad-feature.rs @@ -8,16 +8,16 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature( +#![feature( foo_bar_baz, foo(bar), foo = "baz" -)]; +)] //~^^^ ERROR: malformed feature //~^^^ ERROR: malformed feature -#[feature]; //~ ERROR: malformed feature -#[feature = "foo"]; //~ ERROR: malformed feature +#![feature] //~ ERROR: malformed feature +#![feature = "foo"] //~ ERROR: malformed feature -#[feature(test_removed_feature)]; //~ ERROR: feature has been removed -#[feature(test_accepted_feature)]; //~ WARNING: feature has added +#![feature(test_removed_feature)] //~ ERROR: feature has been removed +#![feature(test_accepted_feature)] //~ WARNING: feature has added diff --git a/src/test/compile-fail/gated-default-type-param-usage.rs b/src/test/compile-fail/gated-default-type-param-usage.rs index 9961a81a85a84..4c8b5de4c864b 100644 --- a/src/test/compile-fail/gated-default-type-param-usage.rs +++ b/src/test/compile-fail/gated-default-type-param-usage.rs @@ -10,7 +10,7 @@ // aux-build:default_type_params_xc.rs -#[deny(default_type_param_usage)]; +#![deny(default_type_param_usage)] extern crate default_type_params_xc; diff --git a/src/test/compile-fail/gated-non-ascii-idents.rs b/src/test/compile-fail/gated-non-ascii-idents.rs index f37a6aa354a5f..174554a08321d 100644 --- a/src/test/compile-fail/gated-non-ascii-idents.rs +++ b/src/test/compile-fail/gated-non-ascii-idents.rs @@ -10,7 +10,7 @@ // ignore-fast feature doesn't work. -#[feature(struct_variant)]; +#![feature(struct_variant)] extern crate bäz; //~ ERROR non-ascii idents diff --git a/src/test/compile-fail/generic-impl-less-params-with-defaults.rs b/src/test/compile-fail/generic-impl-less-params-with-defaults.rs index a95124239a94f..d6a47ffd7863b 100644 --- a/src/test/compile-fail/generic-impl-less-params-with-defaults.rs +++ b/src/test/compile-fail/generic-impl-less-params-with-defaults.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(default_type_params)]; +#![feature(default_type_params)] struct Foo; diff --git a/src/test/compile-fail/generic-impl-more-params-with-defaults.rs b/src/test/compile-fail/generic-impl-more-params-with-defaults.rs index c6ee8a870ee53..b0040878d628c 100644 --- a/src/test/compile-fail/generic-impl-more-params-with-defaults.rs +++ b/src/test/compile-fail/generic-impl-more-params-with-defaults.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(default_type_params)]; +#![feature(default_type_params)] struct Heap; diff --git a/src/test/compile-fail/generic-non-trailing-defaults.rs b/src/test/compile-fail/generic-non-trailing-defaults.rs index a70a52992ddc2..0b6480fc17dcc 100644 --- a/src/test/compile-fail/generic-non-trailing-defaults.rs +++ b/src/test/compile-fail/generic-non-trailing-defaults.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(default_type_params)]; +#![feature(default_type_params)] struct Heap; diff --git a/src/test/compile-fail/generic-type-less-params-with-defaults.rs b/src/test/compile-fail/generic-type-less-params-with-defaults.rs index c5badee3bc5aa..d1fa40bd22cd5 100644 --- a/src/test/compile-fail/generic-type-less-params-with-defaults.rs +++ b/src/test/compile-fail/generic-type-less-params-with-defaults.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(default_type_params)]; +#![feature(default_type_params)] struct Heap; diff --git a/src/test/compile-fail/generic-type-more-params-with-defaults.rs b/src/test/compile-fail/generic-type-more-params-with-defaults.rs index b4c80bc1e3d13..2f3f91a9c3d71 100644 --- a/src/test/compile-fail/generic-type-more-params-with-defaults.rs +++ b/src/test/compile-fail/generic-type-more-params-with-defaults.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(default_type_params)]; +#![feature(default_type_params)] struct Heap; diff --git a/src/test/compile-fail/generic-type-params-forward-mention.rs b/src/test/compile-fail/generic-type-params-forward-mention.rs index 003ffdc8cc00d..424a92d74eec8 100644 --- a/src/test/compile-fail/generic-type-params-forward-mention.rs +++ b/src/test/compile-fail/generic-type-params-forward-mention.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(default_type_params)]; +#![feature(default_type_params)] // Ensure that we get an error and not an ICE for this problematic case. struct Foo, U = bool>; diff --git a/src/test/compile-fail/generic-type-params-name-repr.rs b/src/test/compile-fail/generic-type-params-name-repr.rs index 066bbc38e1a5f..e3d624e9452ba 100644 --- a/src/test/compile-fail/generic-type-params-name-repr.rs +++ b/src/test/compile-fail/generic-type-params-name-repr.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(default_type_params)]; +#![feature(default_type_params)] struct A; struct B; diff --git a/src/test/compile-fail/glob-resolve1.rs b/src/test/compile-fail/glob-resolve1.rs index 7363fb6d0b2df..aae5e0194a1d1 100644 --- a/src/test/compile-fail/glob-resolve1.rs +++ b/src/test/compile-fail/glob-resolve1.rs @@ -10,7 +10,7 @@ // Make sure that globs only bring in public things. -#[feature(globs)]; +#![feature(globs)] use bar::*; diff --git a/src/test/compile-fail/hygienic-label-1.rs b/src/test/compile-fail/hygienic-label-1.rs index d2720bc457050..010cde769d755 100644 --- a/src/test/compile-fail/hygienic-label-1.rs +++ b/src/test/compile-fail/hygienic-label-1.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! foo { () => { break 'x; } diff --git a/src/test/compile-fail/hygienic-label-2.rs b/src/test/compile-fail/hygienic-label-2.rs index c97317217fc5b..78d8fce38d5a6 100644 --- a/src/test/compile-fail/hygienic-label-2.rs +++ b/src/test/compile-fail/hygienic-label-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! foo { ($e: expr) => { 'x: loop { $e } } diff --git a/src/test/compile-fail/hygienic-label-3.rs b/src/test/compile-fail/hygienic-label-3.rs index d5284f5766e0e..439132fa152bb 100644 --- a/src/test/compile-fail/hygienic-label-3.rs +++ b/src/test/compile-fail/hygienic-label-3.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! foo { () => { break 'x; } diff --git a/src/test/compile-fail/hygienic-label-4.rs b/src/test/compile-fail/hygienic-label-4.rs index 79ac46ac59ab4..dfda458652704 100644 --- a/src/test/compile-fail/hygienic-label-4.rs +++ b/src/test/compile-fail/hygienic-label-4.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! foo { ($e: expr) => { 'x: for _ in range(0,1) { $e } } diff --git a/src/test/compile-fail/invalid-crate-type.rs b/src/test/compile-fail/invalid-crate-type.rs index e1398b2a361a1..4b6b6c2fe7677 100644 --- a/src/test/compile-fail/invalid-crate-type.rs +++ b/src/test/compile-fail/invalid-crate-type.rs @@ -9,7 +9,7 @@ // except according to those terms. // regression test for issue 11256 -#[crate_type="foo"]; //~ ERROR invalid `crate_type` value +#![crate_type="foo"] //~ ERROR invalid `crate_type` value fn main() { return diff --git a/src/test/compile-fail/issue-1697.rs b/src/test/compile-fail/issue-1697.rs index e49eb1454d8a2..f79a8fffd922d 100644 --- a/src/test/compile-fail/issue-1697.rs +++ b/src/test/compile-fail/issue-1697.rs @@ -10,7 +10,7 @@ // Testing that we don't fail abnormally after hitting the errors -#[feature(globs)]; +#![feature(globs)] use unresolved::*; //~ ERROR unresolved import. maybe a missing //~^ ERROR failed to resolve import diff --git a/src/test/compile-fail/issue-2063-resource.rs b/src/test/compile-fail/issue-2063-resource.rs index 0fd2b04a199c3..d34fb10e9dd58 100644 --- a/src/test/compile-fail/issue-2063-resource.rs +++ b/src/test/compile-fail/issue-2063-resource.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] // test that autoderef of a type like this does not // cause compiler to loop. Note that no instances diff --git a/src/test/compile-fail/issue-2150.rs b/src/test/compile-fail/issue-2150.rs index c89df46114cba..b12e6799e6a79 100644 --- a/src/test/compile-fail/issue-2150.rs +++ b/src/test/compile-fail/issue-2150.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unreachable_code)]; -#[allow(unused_variable)]; -#[allow(dead_code)]; -#[allow(deprecated_owned_vector)]; +#![deny(unreachable_code)] +#![allow(unused_variable)] +#![allow(dead_code)] +#![allow(deprecated_owned_vector)] fn fail_len(v: Vec ) -> uint { diff --git a/src/test/compile-fail/issue-3668.rs b/src/test/compile-fail/issue-3668.rs index 9f60cceb152ec..e3b145411baa6 100644 --- a/src/test/compile-fail/issue-3668.rs +++ b/src/test/compile-fail/issue-3668.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct P { child: Option<@P> } trait PTrait { diff --git a/src/test/compile-fail/issue-3763.rs b/src/test/compile-fail/issue-3763.rs index a4d184e346b0e..d28b2dd9904f3 100644 --- a/src/test/compile-fail/issue-3763.rs +++ b/src/test/compile-fail/issue-3763.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] mod my_mod { pub struct MyStruct { diff --git a/src/test/compile-fail/issue-4366-2.rs b/src/test/compile-fail/issue-4366-2.rs index 6764b489b6255..373e7339b6939 100644 --- a/src/test/compile-fail/issue-4366-2.rs +++ b/src/test/compile-fail/issue-4366-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(globs)]; +#![feature(globs)] // ensures that 'use foo:*' doesn't import non-public item diff --git a/src/test/compile-fail/issue-4366.rs b/src/test/compile-fail/issue-4366.rs index e9c1092a4a559..7959078359cf0 100644 --- a/src/test/compile-fail/issue-4366.rs +++ b/src/test/compile-fail/issue-4366.rs @@ -13,7 +13,7 @@ // ensures that 'use foo:*' doesn't import non-public 'use' statements in the // module 'foo' -#[feature(globs)]; +#![feature(globs)] use m1::*; diff --git a/src/test/compile-fail/issue-5060-fail.rs b/src/test/compile-fail/issue-5060-fail.rs index d15fed2d9d261..fedb064d2e5f5 100644 --- a/src/test/compile-fail/issue-5060-fail.rs +++ b/src/test/compile-fail/issue-5060-fail.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! print_hd_tl ( ($field_hd:ident, $($field_tl:ident),+) => ({ diff --git a/src/test/compile-fail/issue-6804.rs b/src/test/compile-fail/issue-6804.rs index 60f16275fc4ac..600b28048b4fb 100644 --- a/src/test/compile-fail/issue-6804.rs +++ b/src/test/compile-fail/issue-6804.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(dead_code)]; +#![allow(dead_code)] // Matching against NaN should result in a warning diff --git a/src/test/compile-fail/issue-7061.rs b/src/test/compile-fail/issue-7061.rs index c7fa286d351fe..d62c27edf51da 100644 --- a/src/test/compile-fail/issue-7061.rs +++ b/src/test/compile-fail/issue-7061.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct BarStruct; diff --git a/src/test/compile-fail/issue-7246.rs b/src/test/compile-fail/issue-7246.rs index 74bc1ac0d86a1..7e8d431bf1920 100644 --- a/src/test/compile-fail/issue-7246.rs +++ b/src/test/compile-fail/issue-7246.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unreachable_code)]; -#[allow(dead_code)]; +#![deny(unreachable_code)] +#![allow(dead_code)] use std::ptr; pub unsafe fn g() { diff --git a/src/test/compile-fail/issue-7364.rs b/src/test/compile-fail/issue-7364.rs index 541a103330252..ca66905688ad9 100644 --- a/src/test/compile-fail/issue-7364.rs +++ b/src/test/compile-fail/issue-7364.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] use std::cell::RefCell; diff --git a/src/test/compile-fail/issue-897-2.rs b/src/test/compile-fail/issue-897-2.rs index 91d47cae15cfe..45b45dbaf5da4 100644 --- a/src/test/compile-fail/issue-897-2.rs +++ b/src/test/compile-fail/issue-897-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unreachable_code)]; +#![deny(unreachable_code)] fn g() -> ! { fail!(); } fn f() -> ! { diff --git a/src/test/compile-fail/kindck-copy.rs b/src/test/compile-fail/kindck-copy.rs index a1b8b06ab955a..d4010346998cf 100644 --- a/src/test/compile-fail/kindck-copy.rs +++ b/src/test/compile-fail/kindck-copy.rs @@ -10,7 +10,7 @@ // Test which of the builtin types are considered POD. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] use std::rc::Rc; diff --git a/src/test/compile-fail/kindck-destructor-owned.rs b/src/test/compile-fail/kindck-destructor-owned.rs index 1557aff6689f2..0e1190d2c124e 100644 --- a/src/test/compile-fail/kindck-destructor-owned.rs +++ b/src/test/compile-fail/kindck-destructor-owned.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct Foo { f: @int, diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index 5de2b6b4bb5af..51687fffd1150 100644 --- a/src/test/compile-fail/kindck-nonsendable-1.rs +++ b/src/test/compile-fail/kindck-nonsendable-1.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] fn foo(_x: @uint) {} diff --git a/src/test/compile-fail/linkage2.rs b/src/test/compile-fail/linkage2.rs index 524324fa1f1b2..edbeebe882e51 100644 --- a/src/test/compile-fail/linkage2.rs +++ b/src/test/compile-fail/linkage2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(linkage)]; +#![feature(linkage)] extern { #[linkage = "extern_weak"] static foo: i32; diff --git a/src/test/compile-fail/linkage3.rs b/src/test/compile-fail/linkage3.rs index 2da800bcb1cf5..11ae2fcf9409a 100644 --- a/src/test/compile-fail/linkage3.rs +++ b/src/test/compile-fail/linkage3.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(linkage)]; +#![feature(linkage)] extern { #[linkage = "foo"] static foo: *i32; diff --git a/src/test/compile-fail/lint-allocation.rs b/src/test/compile-fail/lint-allocation.rs index 608cb7fd4a53e..46199fa0280f8 100644 --- a/src/test/compile-fail/lint-allocation.rs +++ b/src/test/compile-fail/lint-allocation.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unnecessary_allocation)]; +#![deny(unnecessary_allocation)] fn f(_: &int) {} fn g(_: &mut int) {} diff --git a/src/test/compile-fail/lint-change-warnings.rs b/src/test/compile-fail/lint-change-warnings.rs index e9985430adfa5..441a8410700bf 100644 --- a/src/test/compile-fail/lint-change-warnings.rs +++ b/src/test/compile-fail/lint-change-warnings.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(warnings)]; -#[allow(dead_code)]; +#![deny(warnings)] +#![allow(dead_code)] fn main() { while true {} //~ ERROR: infinite diff --git a/src/test/compile-fail/lint-ctypes-enum.rs b/src/test/compile-fail/lint-ctypes-enum.rs index 2e47695f0fc0f..e968bd601c572 100644 --- a/src/test/compile-fail/lint-ctypes-enum.rs +++ b/src/test/compile-fail/lint-ctypes-enum.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(ctypes)]; -#[allow(dead_code)]; +#![deny(ctypes)] +#![allow(dead_code)] enum Z { } enum U { A } diff --git a/src/test/compile-fail/lint-ctypes.rs b/src/test/compile-fail/lint-ctypes.rs index 0a1b78c8d5d0a..352a31cf67b2d 100644 --- a/src/test/compile-fail/lint-ctypes.rs +++ b/src/test/compile-fail/lint-ctypes.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(ctypes)]; +#![deny(ctypes)] use std::libc; diff --git a/src/test/compile-fail/lint-dead-code-1.rs b/src/test/compile-fail/lint-dead-code-1.rs index 629a203fcbb6c..04326403376f8 100644 --- a/src/test/compile-fail/lint-dead-code-1.rs +++ b/src/test/compile-fail/lint-dead-code-1.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[no_std]; -#[allow(unused_variable)]; -#[allow(non_camel_case_types)]; -#[allow(visible_private_types)]; -#[deny(dead_code)]; +#![no_std] +#![allow(unused_variable)] +#![allow(non_camel_case_types)] +#![allow(visible_private_types)] +#![deny(dead_code)] -#[crate_type="lib"]; +#![crate_type="lib"] pub use foo2::Bar2; mod foo { diff --git a/src/test/compile-fail/lint-dead-code-2.rs b/src/test/compile-fail/lint-dead-code-2.rs index 663e7890bbe09..1563850c64135 100644 --- a/src/test/compile-fail/lint-dead-code-2.rs +++ b/src/test/compile-fail/lint-dead-code-2.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(unused_variable)]; -#[deny(dead_code)]; +#![allow(unused_variable)] +#![deny(dead_code)] struct Foo; diff --git a/src/test/compile-fail/lint-dead-code-3.rs b/src/test/compile-fail/lint-dead-code-3.rs index e07fc96a1f312..7c8a4c2a22cc2 100644 --- a/src/test/compile-fail/lint-dead-code-3.rs +++ b/src/test/compile-fail/lint-dead-code-3.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(unused_variable)]; -#[allow(non_camel_case_types)]; -#[deny(dead_code)]; +#![allow(unused_variable)] +#![allow(non_camel_case_types)] +#![deny(dead_code)] -#[crate_type="lib"]; +#![crate_type="lib"] struct Foo; //~ ERROR: code is never used impl Foo { diff --git a/src/test/compile-fail/lint-deprecated-owned-vector.rs b/src/test/compile-fail/lint-deprecated-owned-vector.rs index e73e1eacc7ce8..acc916a03910b 100644 --- a/src/test/compile-fail/lint-deprecated-owned-vector.rs +++ b/src/test/compile-fail/lint-deprecated-owned-vector.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(deprecated_owned_vector)]; +#![deny(deprecated_owned_vector)] fn main() { ~[1]; //~ ERROR use of deprecated `~[]` diff --git a/src/test/compile-fail/lint-heap-memory.rs b/src/test/compile-fail/lint-heap-memory.rs index f45888010750e..abe4d08903dc3 100644 --- a/src/test/compile-fail/lint-heap-memory.rs +++ b/src/test/compile-fail/lint-heap-memory.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; -#[forbid(heap_memory)]; -#[allow(dead_code)]; -#[allow(deprecated_owned_vector)]; +#![feature(managed_boxes)] +#![forbid(heap_memory)] +#![allow(dead_code)] +#![allow(deprecated_owned_vector)] struct Foo { x: @int //~ ERROR type uses managed diff --git a/src/test/compile-fail/lint-impl-fn.rs b/src/test/compile-fail/lint-impl-fn.rs index ad35a22b4efa0..eaef43a90836d 100644 --- a/src/test/compile-fail/lint-impl-fn.rs +++ b/src/test/compile-fail/lint-impl-fn.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(while_true)]; -#[allow(dead_code)]; +#![allow(while_true)] +#![allow(dead_code)] struct A(int); diff --git a/src/test/compile-fail/lint-managed-heap-memory.rs b/src/test/compile-fail/lint-managed-heap-memory.rs index 6b8a971653d63..d9a79d7597592 100644 --- a/src/test/compile-fail/lint-managed-heap-memory.rs +++ b/src/test/compile-fail/lint-managed-heap-memory.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; -#[forbid(managed_heap_memory)]; +#![feature(managed_boxes)] +#![forbid(managed_heap_memory)] struct Foo { x: @int //~ ERROR type uses managed diff --git a/src/test/compile-fail/lint-misplaced-attr.rs b/src/test/compile-fail/lint-misplaced-attr.rs index 64b3a52848b1e..d422dfc513d26 100644 --- a/src/test/compile-fail/lint-misplaced-attr.rs +++ b/src/test/compile-fail/lint-misplaced-attr.rs @@ -11,10 +11,10 @@ // When denying at the crate level, be sure to not get random warnings from the // injected intrinsics by the compiler. -#[deny(attribute_usage)]; +#![deny(attribute_usage)] mod a { - #[crate_type = "bin"]; //~ ERROR: crate-level attribute + #![crate_type = "bin"] //~ ERROR: crate-level attribute } #[crate_type = "bin"] fn main() {} //~ ERROR: crate-level attribute diff --git a/src/test/compile-fail/lint-missing-doc.rs b/src/test/compile-fail/lint-missing-doc.rs index 9d640647fe08b..1abfbf43e79b4 100644 --- a/src/test/compile-fail/lint-missing-doc.rs +++ b/src/test/compile-fail/lint-missing-doc.rs @@ -10,13 +10,13 @@ // When denying at the crate level, be sure to not get random warnings from the // injected intrinsics by the compiler. -#[feature(struct_variant)]; -#[feature(globs)]; -#[deny(missing_doc)]; -#[allow(dead_code)]; +#![feature(struct_variant)] +#![feature(globs)] +#![deny(missing_doc)] +#![allow(dead_code)] //! Some garbage docs for the crate here -#[doc="More garbage"]; +#![doc="More garbage"] struct Foo { a: int, diff --git a/src/test/compile-fail/lint-non-camel-case-types.rs b/src/test/compile-fail/lint-non-camel-case-types.rs index 6d217656cd010..57b051e1beac5 100644 --- a/src/test/compile-fail/lint-non-camel-case-types.rs +++ b/src/test/compile-fail/lint-non-camel-case-types.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[forbid(non_camel_case_types)]; -#[allow(dead_code)]; +#![forbid(non_camel_case_types)] +#![allow(dead_code)] struct foo { //~ ERROR type `foo` should have a camel case identifier bar: int, diff --git a/src/test/compile-fail/lint-non-uppercase-statics.rs b/src/test/compile-fail/lint-non-uppercase-statics.rs index d41a4ccda8d12..6eca7c3ed3d54 100644 --- a/src/test/compile-fail/lint-non-uppercase-statics.rs +++ b/src/test/compile-fail/lint-non-uppercase-statics.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[forbid(non_uppercase_statics)]; -#[allow(dead_code)]; +#![forbid(non_uppercase_statics)] +#![allow(dead_code)] static foo: int = 1; //~ ERROR static constant should have an uppercase identifier diff --git a/src/test/compile-fail/lint-obsolete-attr.rs b/src/test/compile-fail/lint-obsolete-attr.rs index 442bcaa092314..8b70953146da7 100644 --- a/src/test/compile-fail/lint-obsolete-attr.rs +++ b/src/test/compile-fail/lint-obsolete-attr.rs @@ -11,8 +11,8 @@ // When denying at the crate level, be sure to not get random warnings from the // injected intrinsics by the compiler. -#[deny(attribute_usage)]; -#[allow(dead_code)]; +#![deny(attribute_usage)] +#![allow(dead_code)] #[abi="stdcall"] extern {} //~ ERROR: obsolete attribute diff --git a/src/test/compile-fail/lint-owned-heap-memory.rs b/src/test/compile-fail/lint-owned-heap-memory.rs index 9f5b4497d93fa..859dd127b9720 100644 --- a/src/test/compile-fail/lint-owned-heap-memory.rs +++ b/src/test/compile-fail/lint-owned-heap-memory.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[forbid(owned_heap_memory)]; +#![forbid(owned_heap_memory)] struct Foo { x: ~int //~ ERROR type uses owned diff --git a/src/test/compile-fail/lint-qualification.rs b/src/test/compile-fail/lint-qualification.rs index a6775c51c456e..7006a2837508d 100644 --- a/src/test/compile-fail/lint-qualification.rs +++ b/src/test/compile-fail/lint-qualification.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unnecessary_qualification)]; +#![deny(unnecessary_qualification)] mod foo { pub fn bar() {} diff --git a/src/test/compile-fail/lint-raw-ptr-deriving.rs b/src/test/compile-fail/lint-raw-ptr-deriving.rs index f58ccf2d498a2..d3fdd508f4559 100644 --- a/src/test/compile-fail/lint-raw-ptr-deriving.rs +++ b/src/test/compile-fail/lint-raw-ptr-deriving.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(struct_variant)]; -#[allow(dead_code)]; -#[deny(raw_pointer_deriving)]; +#![feature(struct_variant)] +#![allow(dead_code)] +#![deny(raw_pointer_deriving)] #[deriving(Clone)] struct Foo { diff --git a/src/test/compile-fail/lint-stability.rs b/src/test/compile-fail/lint-stability.rs index f45f654229f54..4ebd9f1cefdb4 100644 --- a/src/test/compile-fail/lint-stability.rs +++ b/src/test/compile-fail/lint-stability.rs @@ -11,11 +11,11 @@ // ignore-fast aux-build // aux-build:lint_stability.rs -#[feature(globs)]; -#[deny(unstable)]; -#[deny(deprecated)]; -#[deny(experimental)]; -#[allow(dead_code)]; +#![feature(globs)] +#![deny(unstable)] +#![deny(deprecated)] +#![deny(experimental)] +#![allow(dead_code)] mod cross_crate { extern crate lint_stability; diff --git a/src/test/compile-fail/lint-type-limits.rs b/src/test/compile-fail/lint-type-limits.rs index f609debb5bd8f..8cca39a7a257e 100644 --- a/src/test/compile-fail/lint-type-limits.rs +++ b/src/test/compile-fail/lint-type-limits.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(dead_code)]; +#![allow(dead_code)] // compile-flags: -D type-limits fn main() { } diff --git a/src/test/compile-fail/lint-type-overflow.rs b/src/test/compile-fail/lint-type-overflow.rs index e6c535925a4a0..e5a5c7dd1c7c2 100644 --- a/src/test/compile-fail/lint-type-overflow.rs +++ b/src/test/compile-fail/lint-type-overflow.rs @@ -9,7 +9,7 @@ // except according to those terms. // -#[deny(type_overflow)]; +#![deny(type_overflow)] fn test(x: i8) { println!("x {}", x); diff --git a/src/test/compile-fail/lint-unknown-attr.rs b/src/test/compile-fail/lint-unknown-attr.rs index ce83ba464c06e..dbbf91f725dc0 100644 --- a/src/test/compile-fail/lint-unknown-attr.rs +++ b/src/test/compile-fail/lint-unknown-attr.rs @@ -11,9 +11,9 @@ // When denying at the crate level, be sure to not get random warnings from the // injected intrinsics by the compiler. -#[deny(attribute_usage)]; +#![deny(attribute_usage)] -#[mutable_doc]; //~ ERROR: unknown crate attribute +#![mutable_doc] //~ ERROR: unknown crate attribute #[dance] mod a {} //~ ERROR: unknown attribute diff --git a/src/test/compile-fail/lint-unknown-feature.rs b/src/test/compile-fail/lint-unknown-feature.rs index 15f446a671cac..6252e01749bd2 100644 --- a/src/test/compile-fail/lint-unknown-feature.rs +++ b/src/test/compile-fail/lint-unknown-feature.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unknown_features)]; +#![deny(unknown_features)] -#[feature(this_is_not_a_feature)]; //~ ERROR: unknown feature +#![feature(this_is_not_a_feature)] //~ ERROR: unknown feature fn main() {} diff --git a/src/test/compile-fail/lint-unnecessary-casts.rs b/src/test/compile-fail/lint-unnecessary-casts.rs index 9324bf110056a..644c5d9fb3d57 100644 --- a/src/test/compile-fail/lint-unnecessary-casts.rs +++ b/src/test/compile-fail/lint-unnecessary-casts.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[forbid(unnecessary_typecast)]; +#![forbid(unnecessary_typecast)] fn foo_i32(_: i32) {} diff --git a/src/test/compile-fail/lint-unnecessary-parens.rs b/src/test/compile-fail/lint-unnecessary-parens.rs index 528fc2f64b49b..b2abe025794bf 100644 --- a/src/test/compile-fail/lint-unnecessary-parens.rs +++ b/src/test/compile-fail/lint-unnecessary-parens.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unnecessary_parens)]; +#![deny(unnecessary_parens)] fn foo() -> int { return (1); //~ ERROR unnecessary parentheses around `return` value diff --git a/src/test/compile-fail/lint-unsafe-block.rs b/src/test/compile-fail/lint-unsafe-block.rs index 529d3e921a069..a4c50781a774b 100644 --- a/src/test/compile-fail/lint-unsafe-block.rs +++ b/src/test/compile-fail/lint-unsafe-block.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(unused_unsafe)]; -#[allow(dead_code)]; -#[deny(unsafe_block)]; -#[feature(macro_rules)]; +#![allow(unused_unsafe)] +#![allow(dead_code)] +#![deny(unsafe_block)] +#![feature(macro_rules)] unsafe fn allowed() {} diff --git a/src/test/compile-fail/lint-unused-import-tricky-globs.rs b/src/test/compile-fail/lint-unused-import-tricky-globs.rs index 9d6140b8fd233..62ea337656d77 100644 --- a/src/test/compile-fail/lint-unused-import-tricky-globs.rs +++ b/src/test/compile-fail/lint-unused-import-tricky-globs.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(globs)]; -#[deny(unused_imports)]; -#[allow(dead_code)]; +#![feature(globs)] +#![deny(unused_imports)] +#![allow(dead_code)] mod A { pub fn p() {} diff --git a/src/test/compile-fail/lint-unused-import-tricky-names.rs b/src/test/compile-fail/lint-unused-import-tricky-names.rs index 0dc1091dabd1d..39e344da115e1 100644 --- a/src/test/compile-fail/lint-unused-import-tricky-names.rs +++ b/src/test/compile-fail/lint-unused-import-tricky-names.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unused_imports)]; -#[allow(non_camel_case_types)]; -#[allow(dead_code)]; +#![deny(unused_imports)] +#![allow(non_camel_case_types)] +#![allow(dead_code)] // Regression test for issue #6633 mod issue6633 { diff --git a/src/test/compile-fail/lint-unused-imports.rs b/src/test/compile-fail/lint-unused-imports.rs index e4d9048ca8d51..0e89094aace62 100644 --- a/src/test/compile-fail/lint-unused-imports.rs +++ b/src/test/compile-fail/lint-unused-imports.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(globs)]; -#[deny(unused_imports)]; -#[allow(dead_code)]; -#[allow(deprecated_owned_vector)]; +#![feature(globs)] +#![deny(unused_imports)] +#![allow(dead_code)] +#![allow(deprecated_owned_vector)] use cal = bar::c::cc; diff --git a/src/test/compile-fail/lint-unused-mut-self.rs b/src/test/compile-fail/lint-unused-mut-self.rs index ada534ffc72a5..84c484a91e2c4 100644 --- a/src/test/compile-fail/lint-unused-mut-self.rs +++ b/src/test/compile-fail/lint-unused-mut-self.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(dead_assignment)]; -#[allow(unused_variable)]; -#[allow(dead_code)]; -#[deny(unused_mut)]; +#![allow(dead_assignment)] +#![allow(unused_variable)] +#![allow(dead_code)] +#![deny(unused_mut)] struct Foo; impl Foo { diff --git a/src/test/compile-fail/lint-unused-mut-variables.rs b/src/test/compile-fail/lint-unused-mut-variables.rs index ad3ac4eba1188..b372720467e3f 100644 --- a/src/test/compile-fail/lint-unused-mut-variables.rs +++ b/src/test/compile-fail/lint-unused-mut-variables.rs @@ -10,11 +10,11 @@ // Exercise the unused_mut attribute in some positive and negative cases -#[allow(dead_assignment)]; -#[allow(unused_variable)]; -#[allow(dead_code)]; -#[allow(deprecated_owned_vector)]; -#[deny(unused_mut)]; +#![allow(dead_assignment)] +#![allow(unused_variable)] +#![allow(dead_code)] +#![allow(deprecated_owned_vector)] +#![deny(unused_mut)] fn main() { diff --git a/src/test/compile-fail/lint-unused-unsafe.rs b/src/test/compile-fail/lint-unused-unsafe.rs index 87448f68d0203..ecea33cbe8efd 100644 --- a/src/test/compile-fail/lint-unused-unsafe.rs +++ b/src/test/compile-fail/lint-unused-unsafe.rs @@ -10,9 +10,9 @@ // Exercise the unused_unsafe attribute in some positive and negative cases -#[allow(dead_code)]; -#[deny(unused_unsafe)]; -#[allow(deprecated_owned_vector)]; +#![allow(dead_code)] +#![deny(unused_unsafe)] +#![allow(deprecated_owned_vector)] mod foo { diff --git a/src/test/compile-fail/lint-uppercase-variables.rs b/src/test/compile-fail/lint-uppercase-variables.rs index 114d5d4fdf042..386b4019485a9 100644 --- a/src/test/compile-fail/lint-uppercase-variables.rs +++ b/src/test/compile-fail/lint-uppercase-variables.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(uppercase_variables)]; +#![deny(uppercase_variables)] use std::io::File; use std::io::IoError; diff --git a/src/test/compile-fail/lint-visible-private-types.rs b/src/test/compile-fail/lint-visible-private-types.rs index 6d77f8b324c52..484bb1532d157 100644 --- a/src/test/compile-fail/lint-visible-private-types.rs +++ b/src/test/compile-fail/lint-visible-private-types.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(struct_variant)]; -#[deny(visible_private_types)]; -#[allow(dead_code)]; -#[crate_type="lib"]; +#![feature(struct_variant)] +#![deny(visible_private_types)] +#![allow(dead_code)] +#![crate_type="lib"] struct Private; pub struct Public; diff --git a/src/test/compile-fail/liveness-dead.rs b/src/test/compile-fail/liveness-dead.rs index a3d388d7c341b..cba0a1da7e657 100644 --- a/src/test/compile-fail/liveness-dead.rs +++ b/src/test/compile-fail/liveness-dead.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(dead_code)]; -#[deny(dead_assignment)]; +#![allow(dead_code)] +#![deny(dead_assignment)] fn f1(x: &mut int) { *x = 1; // no error diff --git a/src/test/compile-fail/liveness-return-last-stmt-semi.rs b/src/test/compile-fail/liveness-return-last-stmt-semi.rs index 1b32c008af182..8a6585f8bbc41 100644 --- a/src/test/compile-fail/liveness-return-last-stmt-semi.rs +++ b/src/test/compile-fail/liveness-return-last-stmt-semi.rs @@ -10,7 +10,7 @@ // // regression test for #8005 -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! test ( () => { fn foo() -> int { 1i; } } ) //~^ ERROR not all control paths return a value diff --git a/src/test/compile-fail/liveness-unused.rs b/src/test/compile-fail/liveness-unused.rs index 33fc094abbe75..ee44872d12201 100644 --- a/src/test/compile-fail/liveness-unused.rs +++ b/src/test/compile-fail/liveness-unused.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unused_variable)]; -#[deny(dead_assignment)]; -#[allow(dead_code, non_camel_case_types)]; +#![deny(unused_variable)] +#![deny(dead_assignment)] +#![allow(dead_code, non_camel_case_types)] fn f1(x: int) { //~^ ERROR unused variable: `x` diff --git a/src/test/compile-fail/macro-crate-unexported-macro.rs b/src/test/compile-fail/macro-crate-unexported-macro.rs index 3ff19923df6bf..6f4c450940e0f 100644 --- a/src/test/compile-fail/macro-crate-unexported-macro.rs +++ b/src/test/compile-fail/macro-crate-unexported-macro.rs @@ -13,7 +13,7 @@ // ignore-android // ignore-cross-compile #12102 -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate macro_crate_test; diff --git a/src/test/compile-fail/macro-crate-unknown-crate.rs b/src/test/compile-fail/macro-crate-unknown-crate.rs index 3301eb145ce27..84c915f267ec2 100644 --- a/src/test/compile-fail/macro-crate-unknown-crate.rs +++ b/src/test/compile-fail/macro-crate-unknown-crate.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate doesnt_exist; //~ ERROR can't find crate diff --git a/src/test/compile-fail/macro-incomplete-parse.rs b/src/test/compile-fail/macro-incomplete-parse.rs index 98e0ecfad8645..43ba2c8a8a5e7 100644 --- a/src/test/compile-fail/macro-incomplete-parse.rs +++ b/src/test/compile-fail/macro-incomplete-parse.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! ignored_item { () => { diff --git a/src/test/compile-fail/macro-inner-attributes.rs b/src/test/compile-fail/macro-inner-attributes.rs index 753ab3d036810..ae804ea7ece40 100644 --- a/src/test/compile-fail/macro-inner-attributes.rs +++ b/src/test/compile-fail/macro-inner-attributes.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! test ( ($nm:ident, #[$a:meta], diff --git a/src/test/compile-fail/macro-outer-attributes.rs b/src/test/compile-fail/macro-outer-attributes.rs index a4ded8e20b91c..e41f1bd369a88 100644 --- a/src/test/compile-fail/macro-outer-attributes.rs +++ b/src/test/compile-fail/macro-outer-attributes.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! test ( ($nm:ident, #[$a:meta], diff --git a/src/test/compile-fail/macros-nonfatal-errors.rs b/src/test/compile-fail/macros-nonfatal-errors.rs index effab305c1a60..4cfa5b8926c2d 100644 --- a/src/test/compile-fail/macros-nonfatal-errors.rs +++ b/src/test/compile-fail/macros-nonfatal-errors.rs @@ -11,8 +11,8 @@ // test that errors in a (selection) of macros don't kill compilation // immediately, so that we get more errors listed at a time. -#[feature(asm)]; -#[feature(trace_macros)]; +#![feature(asm)] +#![feature(trace_macros)] #[deriving(Default, //~ ERROR Rand, //~ ERROR diff --git a/src/test/compile-fail/match-static-const-lc.rs b/src/test/compile-fail/match-static-const-lc.rs index fd605b79dbecd..f77ea2db8c02b 100644 --- a/src/test/compile-fail/match-static-const-lc.rs +++ b/src/test/compile-fail/match-static-const-lc.rs @@ -10,8 +10,8 @@ // Issue #7526: lowercase static constants in patterns look like bindings -#[allow(dead_code)]; -#[deny(non_uppercase_pattern_statics)]; +#![allow(dead_code)] +#![deny(non_uppercase_pattern_statics)] pub static a : int = 97; diff --git a/src/test/compile-fail/moves-based-on-type-exprs.rs b/src/test/compile-fail/moves-based-on-type-exprs.rs index ed0138e05be4c..710d9d1ca200e 100644 --- a/src/test/compile-fail/moves-based-on-type-exprs.rs +++ b/src/test/compile-fail/moves-based-on-type-exprs.rs @@ -11,7 +11,7 @@ // Tests that references to move-by-default values trigger moves when // they occur as part of various kinds of expressions. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct Foo { f: A } fn guard(_s: ~str) -> bool {fail!()} diff --git a/src/test/compile-fail/no-implicit-prelude.rs b/src/test/compile-fail/no-implicit-prelude.rs index 7f88af36e8a5c..fecc597b8fd2f 100644 --- a/src/test/compile-fail/no-implicit-prelude.rs +++ b/src/test/compile-fail/no-implicit-prelude.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[no_implicit_prelude]; +#![no_implicit_prelude] // Test that things from the prelude aren't in scope. Use many of them // so that renaming some things won't magically make this test fail diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs index 68077d61c9f81..825a8fc604c6f 100644 --- a/src/test/compile-fail/no-send-res-ports.rs +++ b/src/test/compile-fail/no-send-res-ports.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] use std::task; diff --git a/src/test/compile-fail/no_crate_type.rs b/src/test/compile-fail/no_crate_type.rs index 51ca71ae2cc53..bef909917d22a 100644 --- a/src/test/compile-fail/no_crate_type.rs +++ b/src/test/compile-fail/no_crate_type.rs @@ -9,7 +9,7 @@ // except according to those terms. // regresion test for issue 11256 -#[crate_type]; //~ ERROR `crate_type` requires a value +#![crate_type] //~ ERROR `crate_type` requires a value fn main() { return diff --git a/src/test/compile-fail/occurs-check.rs b/src/test/compile-fail/occurs-check.rs index f08272f58acd7..fd0da8ba9cf38 100644 --- a/src/test/compile-fail/occurs-check.rs +++ b/src/test/compile-fail/occurs-check.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] fn main() { let f; //~ ERROR cyclic type of infinite size diff --git a/src/test/compile-fail/once-cant-call-twice-on-heap.rs b/src/test/compile-fail/once-cant-call-twice-on-heap.rs index c9ee105fe7b93..9d0de6b37538e 100644 --- a/src/test/compile-fail/once-cant-call-twice-on-heap.rs +++ b/src/test/compile-fail/once-cant-call-twice-on-heap.rs @@ -11,7 +11,7 @@ // Testing guarantees provided by once functions. // This program would segfault if it were legal. -#[feature(once_fns)]; +#![feature(once_fns)] extern crate sync; use sync::Arc; diff --git a/src/test/compile-fail/once-cant-call-twice-on-stack.rs b/src/test/compile-fail/once-cant-call-twice-on-stack.rs index a81ddf06ac86e..45cfa88369639 100644 --- a/src/test/compile-fail/once-cant-call-twice-on-stack.rs +++ b/src/test/compile-fail/once-cant-call-twice-on-stack.rs @@ -11,7 +11,7 @@ // Testing guarantees provided by once functions. // This program would segfault if it were legal. -#[feature(once_fns)]; +#![feature(once_fns)] extern crate sync; use sync::Arc; diff --git a/src/test/compile-fail/once-fn-subtyping.rs b/src/test/compile-fail/once-fn-subtyping.rs index 3a0afd70e3e71..7594deda3b2d8 100644 --- a/src/test/compile-fail/once-fn-subtyping.rs +++ b/src/test/compile-fail/once-fn-subtyping.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(once_fns)]; +#![feature(once_fns)] fn main() { let f: once || = ||(); let g: || = f; //~ ERROR mismatched types diff --git a/src/test/compile-fail/phase-syntax-doesnt-resolve.rs b/src/test/compile-fail/phase-syntax-doesnt-resolve.rs index 98ca0697db95e..9bfc7fc34bb5b 100644 --- a/src/test/compile-fail/phase-syntax-doesnt-resolve.rs +++ b/src/test/compile-fail/phase-syntax-doesnt-resolve.rs @@ -13,7 +13,7 @@ // ignore-android // ignore-cross-compile #12102 -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate macro_crate_test; diff --git a/src/test/compile-fail/pinned-deep-copy.rs b/src/test/compile-fail/pinned-deep-copy.rs index 6479a9404e2d5..0589d58a4c25d 100644 --- a/src/test/compile-fail/pinned-deep-copy.rs +++ b/src/test/compile-fail/pinned-deep-copy.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] use std::cell::Cell; diff --git a/src/test/compile-fail/privacy-ns1.rs b/src/test/compile-fail/privacy-ns1.rs index 541356f65999b..cb11a50055f7d 100644 --- a/src/test/compile-fail/privacy-ns1.rs +++ b/src/test/compile-fail/privacy-ns1.rs @@ -11,9 +11,9 @@ // Check we do the correct privacy checks when we import a name and there is an // item with that name in both the value and type namespaces. -#[feature(globs)]; -#[allow(dead_code)]; -#[allow(unused_imports)]; +#![feature(globs)] +#![allow(dead_code)] +#![allow(unused_imports)] // public type, private value pub mod foo1 { diff --git a/src/test/compile-fail/privacy-ns2.rs b/src/test/compile-fail/privacy-ns2.rs index e293153e9da2d..c75b12165c090 100644 --- a/src/test/compile-fail/privacy-ns2.rs +++ b/src/test/compile-fail/privacy-ns2.rs @@ -11,9 +11,9 @@ // Check we do the correct privacy checks when we import a name and there is an // item with that name in both the value and type namespaces. -#[feature(globs)]; -#[allow(dead_code)]; -#[allow(unused_imports)]; +#![feature(globs)] +#![allow(dead_code)] +#![allow(unused_imports)] // public type, private value pub mod foo1 { diff --git a/src/test/compile-fail/privacy1.rs b/src/test/compile-fail/privacy1.rs index fdc681e1da0c3..0aba36eebee8a 100644 --- a/src/test/compile-fail/privacy1.rs +++ b/src/test/compile-fail/privacy1.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(globs)]; -#[no_std]; // makes debugging this test *a lot* easier (during resolve) +#![feature(globs)] +#![no_std] // makes debugging this test *a lot* easier (during resolve) mod bar { // shouln't bring in too much diff --git a/src/test/compile-fail/privacy2.rs b/src/test/compile-fail/privacy2.rs index 98772b0c67b82..df4e401dfa53f 100644 --- a/src/test/compile-fail/privacy2.rs +++ b/src/test/compile-fail/privacy2.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(globs)]; -#[no_std]; // makes debugging this test *a lot* easier (during resolve) +#![feature(globs)] +#![no_std] // makes debugging this test *a lot* easier (during resolve) // Test to make sure that globs don't leak in regular `use` statements. diff --git a/src/test/compile-fail/privacy3.rs b/src/test/compile-fail/privacy3.rs index 3308be4a12e78..f8d8ba2ab1aa3 100644 --- a/src/test/compile-fail/privacy3.rs +++ b/src/test/compile-fail/privacy3.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(globs)]; -#[no_std]; // makes debugging this test *a lot* easier (during resolve) +#![feature(globs)] +#![no_std] // makes debugging this test *a lot* easier (during resolve) // Test to make sure that private items imported through globs remain private // when they're used. diff --git a/src/test/compile-fail/privacy4.rs b/src/test/compile-fail/privacy4.rs index 4e33536b2b05f..18a94cb86c847 100644 --- a/src/test/compile-fail/privacy4.rs +++ b/src/test/compile-fail/privacy4.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(globs)]; -#[no_std]; // makes debugging this test *a lot* easier (during resolve) +#![feature(globs)] +#![no_std] // makes debugging this test *a lot* easier (during resolve) // Test to make sure that private items imported through globs remain private // when they're used. diff --git a/src/test/compile-fail/regions-infer-borrow-scope-too-big.rs b/src/test/compile-fail/regions-infer-borrow-scope-too-big.rs index b17ec8782f10c..b069a35ad7a26 100644 --- a/src/test/compile-fail/regions-infer-borrow-scope-too-big.rs +++ b/src/test/compile-fail/regions-infer-borrow-scope-too-big.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct point { x: int, diff --git a/src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs b/src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs index 3719be3612bc0..9be8a5fef4dee 100644 --- a/src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs +++ b/src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] fn borrow<'r, T>(x: &'r T) -> &'r T {x} diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs index b36933c4957f2..ae1cbcf3e6874 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct invariant<'a> { f: 'static |x: &mut &'a int| diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs index 449cbc6970fdb..096d8912f8b84 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct invariant<'a> { f: 'static || -> &mut &'a int diff --git a/src/test/compile-fail/regions-infer-paramd-indirect.rs b/src/test/compile-fail/regions-infer-paramd-indirect.rs index e2f4f791652a5..6e8013529a937 100644 --- a/src/test/compile-fail/regions-infer-paramd-indirect.rs +++ b/src/test/compile-fail/regions-infer-paramd-indirect.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] // Check that we correctly infer that b and c must be region // parameterized because they reference a which requires a region. diff --git a/src/test/compile-fail/simd-experimental.rs b/src/test/compile-fail/simd-experimental.rs index 64c045366e138..f9cc4d0d8c372 100644 --- a/src/test/compile-fail/simd-experimental.rs +++ b/src/test/compile-fail/simd-experimental.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(experimental)]; +#![deny(experimental)] use std::unstable::simd; diff --git a/src/test/compile-fail/simd-type.rs b/src/test/compile-fail/simd-type.rs index 6a57ee76cdff2..16be3941298de 100644 --- a/src/test/compile-fail/simd-type.rs +++ b/src/test/compile-fail/simd-type.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(simd)]; +#![feature(simd)] #[simd] struct vec4(T, T, T, T); //~ ERROR SIMD vector cannot be generic diff --git a/src/test/compile-fail/static-assert.rs b/src/test/compile-fail/static-assert.rs index d9e3846c5060b..349e5f4cb5105 100644 --- a/src/test/compile-fail/static-assert.rs +++ b/src/test/compile-fail/static-assert.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(dead_code)]; +#![allow(dead_code)] #[static_assert] static A: bool = false; //~ ERROR static assertion failed diff --git a/src/test/compile-fail/static-assert2.rs b/src/test/compile-fail/static-assert2.rs index 30c6f05bd6084..d5e70205e9536 100644 --- a/src/test/compile-fail/static-assert2.rs +++ b/src/test/compile-fail/static-assert2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(dead_code)]; +#![allow(dead_code)] #[static_assert] static E: bool = 1 == 2; //~ ERROR static assertion failed diff --git a/src/test/compile-fail/static-region-bound.rs b/src/test/compile-fail/static-region-bound.rs index ed9d3cd74d045..4911ceb3ef444 100644 --- a/src/test/compile-fail/static-region-bound.rs +++ b/src/test/compile-fail/static-region-bound.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] fn f(_: T) {} diff --git a/src/test/compile-fail/std-uncopyable-atomics.rs b/src/test/compile-fail/std-uncopyable-atomics.rs index 1b2f1fc32072d..cd853a2cf4d78 100644 --- a/src/test/compile-fail/std-uncopyable-atomics.rs +++ b/src/test/compile-fail/std-uncopyable-atomics.rs @@ -10,7 +10,7 @@ // Issue #8380 -#[feature(globs)]; +#![feature(globs)] use std::sync::atomics::*; use std::ptr; diff --git a/src/test/compile-fail/struct-like-enum-nonexhaustive.rs b/src/test/compile-fail/struct-like-enum-nonexhaustive.rs index 06fd4e6d8c9c3..8d1e5b462792f 100644 --- a/src/test/compile-fail/struct-like-enum-nonexhaustive.rs +++ b/src/test/compile-fail/struct-like-enum-nonexhaustive.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(struct_variant)]; +#![feature(struct_variant)] enum A { B { x: Option }, diff --git a/src/test/compile-fail/syntax-extension-fourcc-bad-len.rs b/src/test/compile-fail/syntax-extension-fourcc-bad-len.rs index 920726a487013..865ab7e6e84b6 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-bad-len.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-bad-len.rs @@ -12,7 +12,7 @@ // ignore-pretty // ignore-cross-compile #12102 -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate fourcc; diff --git a/src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs b/src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs index 08ee57a2d94ea..c127035bf1e45 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs @@ -12,7 +12,7 @@ // ignore-pretty // ignore-cross-compile #12102 -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate fourcc; diff --git a/src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs b/src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs index af49d9988d890..28b146635f145 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs @@ -12,7 +12,7 @@ // ignore-pretty // ignore-cross-compile #12102 -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate fourcc; diff --git a/src/test/compile-fail/syntax-extension-fourcc-non-literal.rs b/src/test/compile-fail/syntax-extension-fourcc-non-literal.rs index b4195ed9bc88b..1f1a7ab80f966 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-non-literal.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-non-literal.rs @@ -12,7 +12,7 @@ // ignore-pretty // ignore-cross-compile #12102 -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate fourcc; diff --git a/src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs b/src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs index 1997b7ad8e762..a745c227fb14d 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs @@ -12,7 +12,7 @@ // ignore-pretty // ignore-cross-compile #12102 -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate fourcc; diff --git a/src/test/compile-fail/syntax-extension-hexfloat-bad-lits.rs b/src/test/compile-fail/syntax-extension-hexfloat-bad-lits.rs index 9a7129dd2cf84..04b34c85b78f7 100644 --- a/src/test/compile-fail/syntax-extension-hexfloat-bad-lits.rs +++ b/src/test/compile-fail/syntax-extension-hexfloat-bad-lits.rs @@ -12,7 +12,7 @@ // ignore-pretty // ignore-cross-compile #12102 -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate hexfloat; diff --git a/src/test/compile-fail/syntax-extension-hexfloat-bad-types.rs b/src/test/compile-fail/syntax-extension-hexfloat-bad-types.rs index cf7a2fb6acbc6..6b2f8067ccc44 100644 --- a/src/test/compile-fail/syntax-extension-hexfloat-bad-types.rs +++ b/src/test/compile-fail/syntax-extension-hexfloat-bad-types.rs @@ -12,7 +12,7 @@ // ignore-pretty // ignore-cross-compile #12102 -#[feature(phase)]; +#![feature(phase)] #[phase(syntax)] extern crate hexfloat; diff --git a/src/test/compile-fail/terr-sorts.rs b/src/test/compile-fail/terr-sorts.rs index 6a2fd99f6480f..8f3cb5bc0a6ba 100644 --- a/src/test/compile-fail/terr-sorts.rs +++ b/src/test/compile-fail/terr-sorts.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] struct foo { a: int, diff --git a/src/test/compile-fail/trace_macros-format.rs b/src/test/compile-fail/trace_macros-format.rs index 557dcdc73c8e1..d5955601f2dc4 100644 --- a/src/test/compile-fail/trace_macros-format.rs +++ b/src/test/compile-fail/trace_macros-format.rs @@ -9,7 +9,7 @@ // except according to those terms. // ignore-fast feature doesn't work -#[feature(macro_rules, trace_macros)]; +#![feature(macro_rules, trace_macros)] fn main() { trace_macros!(); //~ ERROR trace_macros! accepts only `true` or `false` diff --git a/src/test/compile-fail/trait-impl-method-mismatch.rs b/src/test/compile-fail/trait-impl-method-mismatch.rs index b5474210dc5f3..039f94ec2e768 100644 --- a/src/test/compile-fail/trait-impl-method-mismatch.rs +++ b/src/test/compile-fail/trait-impl-method-mismatch.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] trait Mumbo { fn jumbo(&self, x: @uint) -> uint; diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs index b9965b1822936..8e951cc9b55d3 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] fn f(_i: T) { } diff --git a/src/test/compile-fail/unique-vec-res.rs b/src/test/compile-fail/unique-vec-res.rs index c76a6f2453e24..b83277b38a689 100644 --- a/src/test/compile-fail/unique-vec-res.rs +++ b/src/test/compile-fail/unique-vec-res.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] use std::cell::Cell; diff --git a/src/test/compile-fail/unreachable-code.rs b/src/test/compile-fail/unreachable-code.rs index a9365eeda1c55..96adb29cbc80d 100644 --- a/src/test/compile-fail/unreachable-code.rs +++ b/src/test/compile-fail/unreachable-code.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unreachable_code)]; -#[allow(unused_variable)]; +#![deny(unreachable_code)] +#![allow(unused_variable)] fn main() { loop{} diff --git a/src/test/compile-fail/unsafe-around-compiler-generated-unsafe.rs b/src/test/compile-fail/unsafe-around-compiler-generated-unsafe.rs index 2aefdd213bbc5..484a8979d718b 100644 --- a/src/test/compile-fail/unsafe-around-compiler-generated-unsafe.rs +++ b/src/test/compile-fail/unsafe-around-compiler-generated-unsafe.rs @@ -10,7 +10,7 @@ // issue #12418 -#[deny(unused_unsafe)]; +#![deny(unused_unsafe)] fn main() { unsafe { println!("foo"); } //~ ERROR unnecessary `unsafe` diff --git a/src/test/compile-fail/unsendable-class.rs b/src/test/compile-fail/unsendable-class.rs index 4fbb4db44796c..acfcccf3ace5d 100644 --- a/src/test/compile-fail/unsendable-class.rs +++ b/src/test/compile-fail/unsendable-class.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; +#![feature(managed_boxes)] // Test that a class with an unsendable field can't be // sent diff --git a/src/test/compile-fail/unused-result.rs b/src/test/compile-fail/unused-result.rs index eaf4d7d94c454..44058c1ddda19 100644 --- a/src/test/compile-fail/unused-result.rs +++ b/src/test/compile-fail/unused-result.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deny(unused_result, unused_must_use)]; -#[allow(dead_code)]; +#![deny(unused_result, unused_must_use)] +#![allow(dead_code)] #[must_use] enum MustUse { Test } diff --git a/src/test/compile-fail/warn-foreign-int-types.rs b/src/test/compile-fail/warn-foreign-int-types.rs index 726d778c3bb2b..8a5881d379767 100644 --- a/src/test/compile-fail/warn-foreign-int-types.rs +++ b/src/test/compile-fail/warn-foreign-int-types.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[forbid(ctypes)]; -#[allow(dead_code)]; +#![forbid(ctypes)] +#![allow(dead_code)] mod xx { extern { diff --git a/src/test/run-pass/macro-meta-items.rs b/src/test/run-pass/macro-meta-items.rs index e92685f3e58ab..cfcde320d99b1 100644 --- a/src/test/run-pass/macro-meta-items.rs +++ b/src/test/run-pass/macro-meta-items.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-fast // ignore-pretty - token trees can't pretty print // compile-flags: --cfg foo