Permalink
Browse files

Use new attribute syntax in python files in src/etc too (#13478)

  • Loading branch information...
Manishearth committed Apr 14, 2014
1 parent e2e7548 commit 713e87526eac42aa9879e7cfb556ea64d63e7a91
Showing 473 changed files with 607 additions and 607 deletions.
@@ -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}
View
@@ -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)]
''')
@@ -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
@@ -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)
@@ -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;
View
@@ -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();
@@ -699,7 +699,7 @@ uniform_fn_call_workaround! {
/// # Example
///
/// ```rust
-/// # #[allow(unused_must_use)];
+/// # #![allow(unused_must_use)]
/// use std::fmt;
/// use std::io;
///
@@ -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"));
@@ -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"));
@@ -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();
View
@@ -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");
@@ -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"));
@@ -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");
@@ -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"));
@@ -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"));
@@ -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;
///
@@ -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;
///
@@ -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");
View
@@ -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();
@@ -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));
@@ -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];
@@ -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];
View
@@ -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"));
@@ -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;
@@ -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")) {
View
@@ -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};
///
View
@@ -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};
///
@@ -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");
@@ -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};
///
View
@@ -37,7 +37,7 @@ impl PipeStream {
/// # Example
///
/// ```rust
- /// # #[allow(unused_must_use)];
+ /// # #![allow(unused_must_use)]
/// extern crate libc;
///
/// use std::io::pipe::PipeStream;
View
@@ -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();
View
@@ -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
@@ -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();
@@ -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;
@@ -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|);
@@ -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|) {
@@ -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;
@@ -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
@@ -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>() {}
@@ -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!"); }
@@ -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;
@@ -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;
@@ -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 }
Oops, something went wrong.

5 comments on commit 713e875

Contributor

bors replied Apr 14, 2014

saw approval from alexcrichton
at Manishearth/rust@713e875

Contributor

bors replied Apr 14, 2014

merging Manishearth/rust/newattr-everywhere = 713e875 into auto

Contributor

bors replied Apr 14, 2014

Manishearth/rust/newattr-everywhere = 713e875 merged ok, testing candidate = 246ebd2

Contributor

bors replied Apr 14, 2014

fast-forwarding master to auto = 246ebd2

Please sign in to comment.