Skip to content

Commit

Permalink
auto merge of rust-lang#13493 : Manishearth/rust/newattr-everywhere, …
Browse files Browse the repository at this point in the history
…r=alexcrichton

See rust-lang#13478
  • Loading branch information
bors committed Apr 14, 2014
2 parents 347e9e4 + 713e875 commit 246ebd2
Show file tree
Hide file tree
Showing 473 changed files with 607 additions and 607 deletions.
2 changes: 1 addition & 1 deletion src/etc/generate-deriving-span-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
#[feature(struct_variant)];
#![feature(struct_variant)]
extern crate rand;
{error_deriving}
Expand Down
4 changes: 2 additions & 2 deletions src/etc/unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ def emit_decomp_module(f, canon, compat, combine):
// The following code was generated by "src/etc/unicode.py"
#[allow(missing_doc)];
#[allow(non_uppercase_statics)];
#![allow(missing_doc)]
#![allow(non_uppercase_statics)]
''')

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/front/std_inject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl<'a> fold::Folder for PreludeInjector<'a> {
fn fold_crate(&mut self, krate: ast::Crate) -> ast::Crate {
if !no_prelude(krate.attrs.as_slice()) {
// only add `use std::prelude::*;` if there wasn't a
// `#[no_implicit_prelude];` at the crate level.
// `#![no_implicit_prelude]` at the crate level.
ast::Crate {
module: self.fold_mod(&krate.module),
..krate
Expand All @@ -138,7 +138,7 @@ impl<'a> fold::Folder for PreludeInjector<'a> {

fn fold_item(&mut self, item: @ast::Item) -> SmallVector<@ast::Item> {
if !no_prelude(item.attrs.as_slice()) {
// only recur if there wasn't `#[no_implicit_prelude];`
// only recur if there wasn't `#![no_implicit_prelude]`
// on this item, i.e. this means that the prelude is not
// implicitly imported though the whole subtree
fold::noop_fold_item(item, self)
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/check/regionmanip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// #[warn(deprecated_mode)];
// #![warn(deprecated_mode)]

use middle::ty;
use middle::ty_fold;
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ strings and instead directly write the output. Under the hood, this function is
actually invoking the `write` function defined in this module. Example usage is:
```rust
# #[allow(unused_must_use)];
# #![allow(unused_must_use)]
use std::io;
let mut w = io::MemWriter::new();
Expand Down Expand Up @@ -699,7 +699,7 @@ uniform_fn_call_workaround! {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::fmt;
/// use std::io;
///
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl<R: Reader> Reader for BufferedReader<R> {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::{BufferedWriter, File};
///
/// let file = File::open(&Path::new("message.txt"));
Expand Down Expand Up @@ -287,7 +287,7 @@ impl<W: Reader> Reader for InternalBufferedWriter<W> {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::{BufferedStream, File};
///
/// let file = File::open(&Path::new("message.txt"));
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/comm_adapters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Reader for ChanReader {
/// # Example
///
/// ```
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::ChanWriter;
///
/// let (tx, rx) = channel();
Expand Down
16 changes: 8 additions & 8 deletions src/libstd/io/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ particular bits of it, etc.
# Example
```rust
# #[allow(unused_must_use)];
# #![allow(unused_must_use)]
use std::io::{File, fs};
let path = Path::new("foo.txt");
Expand Down Expand Up @@ -162,7 +162,7 @@ impl File {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::File;
///
/// let mut f = File::create(&Path::new("foo.txt"));
Expand Down Expand Up @@ -220,7 +220,7 @@ impl File {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::fs;
///
/// let p = Path::new("/some/file/path.txt");
Expand Down Expand Up @@ -290,7 +290,7 @@ pub fn lstat(path: &Path) -> IoResult<FileStat> {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::fs;
///
/// fs::rename(&Path::new("foo"), &Path::new("bar"));
Expand All @@ -314,7 +314,7 @@ pub fn rename(from: &Path, to: &Path) -> IoResult<()> {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::fs;
///
/// fs::copy(&Path::new("foo.txt"), &Path::new("bar.txt"));
Expand Down Expand Up @@ -364,7 +364,7 @@ pub fn copy(from: &Path, to: &Path) -> IoResult<()> {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io;
/// use std::io::fs;
///
Expand Down Expand Up @@ -416,7 +416,7 @@ pub fn readlink(path: &Path) -> IoResult<Path> {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io;
/// use std::io::fs;
///
Expand All @@ -437,7 +437,7 @@ pub fn mkdir(path: &Path, mode: FilePermission) -> IoResult<()> {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::fs;
///
/// let p = Path::new("/some/dir");
Expand Down
8 changes: 4 additions & 4 deletions src/libstd/io/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn combine(seek: SeekStyle, cur: uint, end: uint, offset: i64) -> IoResult<u64>
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::MemWriter;
///
/// let mut w = MemWriter::new();
Expand Down Expand Up @@ -125,7 +125,7 @@ impl Seek for MemWriter {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::MemReader;
///
/// let mut r = MemReader::new(vec!(0, 1, 2));
Expand Down Expand Up @@ -209,7 +209,7 @@ impl Buffer for MemReader {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::BufWriter;
///
/// let mut buf = [0, ..4];
Expand Down Expand Up @@ -267,7 +267,7 @@ impl<'a> Seek for BufWriter<'a> {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::BufReader;
///
/// let mut buf = [0, 1, 2, 3];
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Some examples of obvious things you might want to do
* Write a line to a file
```rust
# #[allow(unused_must_use)];
# #![allow(unused_must_use)]
use std::io::File;
let mut file = File::create(&Path::new("message.txt"));
Expand Down Expand Up @@ -82,7 +82,7 @@ Some examples of obvious things you might want to do
* Make a simple TCP client connection and request
```rust,should_fail
# #[allow(unused_must_use)];
# #![allow(unused_must_use)]
use std::io::net::ip::SocketAddr;
use std::io::net::tcp::TcpStream;
Expand Down Expand Up @@ -159,7 +159,7 @@ be an error.
If you wanted to handle the error though you might write:
```rust
# #[allow(unused_must_use)];
# #![allow(unused_must_use)]
use std::io::File;
match File::create(&Path::new("diary.txt")).write(bytes!("Met a girl.\n")) {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use rt::rtio::{RtioTcpAcceptor, RtioTcpStream};
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::net::tcp::TcpStream;
/// use std::io::net::ip::{Ipv4Addr, SocketAddr};
///
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use rt::rtio::{RtioSocket, RtioUdpSocket, IoFactory, LocalIo};
/// # Example
///
/// ```rust,no_run
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::net::udp::UdpSocket;
/// use std::io::net::ip::{Ipv4Addr, SocketAddr};
///
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/io/net/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl UnixStream {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::net::unix::UnixStream;
///
/// let server = Path::new("path/to/my/socket");
Expand Down Expand Up @@ -98,7 +98,7 @@ impl UnixListener {
/// ```
/// # fn main() {}
/// # fn foo() {
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::net::unix::UnixListener;
/// use std::io::{Listener, Acceptor};
///
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl PipeStream {
/// # Example
///
/// ```rust
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// extern crate libc;
///
/// use std::io::pipe::PipeStream;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ about the stream or terminal to which it is attached.
# Example
```rust
# #[allow(unused_must_use)];
# #![allow(unused_must_use)]
use std::io;
let mut out = io::stdout();
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/// # Example
///
/// ```should_fail
/// # #[allow(unreachable_code)];
/// # #![allow(unreachable_code)]
/// fail!();
/// fail!("this is a terrible mistake!");
/// fail!(4); // fail with the value of 4 to be collected elsewhere
Expand Down Expand Up @@ -188,7 +188,7 @@ macro_rules! format(
/// # Example
///
/// ```
/// # #[allow(unused_must_use)];
/// # #![allow(unused_must_use)]
/// use std::io::MemWriter;
///
/// let mut w = MemWriter::new();
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/anon-extern-mod-cross-crate-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[crate_id="anonexternmod#0.1"];
#![crate_id="anonexternmod#0.1"]

extern crate libc;

Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/cci_impl_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[crate_id="cci_impl_lib"];
#![crate_id="cci_impl_lib"]

pub trait uint_helpers {
fn to(&self, v: uint, f: |uint|);
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/cci_iter_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[crate_id="cci_iter_lib"];
#![crate_id="cci_iter_lib"]

#[inline]
pub fn iter<T>(v: &[T], f: |&T|) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/cci_nested_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/cci_no_inline_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[crate_id="cci_no_inline_lib"];
#![crate_id="cci_no_inline_lib"]


// same as cci_iter_lib, more-or-less, but not marked inline
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/changing-crates-a1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[crate_id = "a"];
#![crate_id = "a"]

pub fn foo<T>() {}
2 changes: 1 addition & 1 deletion src/test/auxiliary/changing-crates-a2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[crate_id = "a"];
#![crate_id = "a"]

pub fn foo<T>() { println!("hello!"); }

2 changes: 1 addition & 1 deletion src/test/auxiliary/changing-crates-b.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[crate_id = "b"];
#![crate_id = "b"]

extern crate a;

Expand Down
4 changes: 2 additions & 2 deletions src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[feature(managed_boxes)];
#[crate_id="crate_method_reexport_grrrrrrr2"];
#![feature(managed_boxes)]
#![crate_id="crate_method_reexport_grrrrrrr2"]

pub use name_pool::add;

Expand Down
4 changes: 2 additions & 2 deletions src/test/auxiliary/crateresolve1-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[crate_id="crateresolve1#0.1"];
#![crate_id="crateresolve1#0.1"]

#[crate_type = "lib"];
#![crate_type = "lib"]

pub fn f() -> int { 10 }
Loading

0 comments on commit 246ebd2

Please sign in to comment.