// 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;
//! 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;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use std::cmp;
* 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;
//! 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};
* are O(highest integer key).
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use std::iter::{Enumerate, FilterMap, Rev};
use std::mem::replace;
*/
-#[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;
*/
-#[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;
//! }
//! ~~~
-#[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;
* `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};
//! 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;
// FIXME: this file probably shouldn't exist
-#[macro_escape];
+#![macro_escape]
use std::fmt;
*/
-#[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;
*/
-#[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;
//! Logging macros
-#[macro_escape];
+#![macro_escape]
/// The standard logging macro
///
//! }
//! ```
-#[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
#[cfg(test)]
mod test {
- #[allow(non_uppercase_statics)];
+ #![allow(non_uppercase_statics)]
use super::{Complex64, Cmplx};
use std::num::{Zero,One,Float};
// 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;
```
*/
-#[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;
// 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,
// 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;
*/
-#[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;
// 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;
// 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;
// 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
// Searching for information from the cstore
-#[allow(non_camel_case_types)];
+#![allow(non_camel_case_types)]
use metadata::common::*;
use metadata::cstore;
// 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
// 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;
// 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::*;
// 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;
// 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;
// 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;
// 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;
/*! 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;
// 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};
// 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;
// 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;
//! 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;
* 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;
// 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;
*
*/
-#[allow(non_camel_case_types)];
+#![allow(non_camel_case_types)]
use back::abi;
use driver::session::FullDebugInfo;
// 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};
// 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;
// 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;
// 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};
// 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.
* See doc.rs for more comments.
*/
-#[allow(non_camel_case_types)];
+#![allow(non_camel_case_types)]
use back::abi;
use lib::llvm::{ValueRef, llvm};
// 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};
// 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) => (
// 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;
// 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};
// 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::*;
// 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;
// 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;
// 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) => (
/*! 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;
*/
-#[allow(non_camel_case_types)];
+#![allow(non_camel_case_types)]
use driver::session;
// 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};
//! 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;
//! // ... something using html
//! ```
-#[allow(non_camel_case_types)];
+#![allow(non_camel_case_types)]
use std::cast;
use std::fmt;
// 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;
//! 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;
*/
-#[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";
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[macro_escape];
+#![macro_escape]
use std::fmt;
//! 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};
* 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};
//! 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;
// 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;
// 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
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)]
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[doc(hidden)];
+#![doc(hidden)]
use ptr;
use raw;
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
/**
* Trait for values that can be compared for equality and inequality.
//! }
//! ```
-#[allow(dead_code)];
+#![allow(dead_code)]
use cast;
use cell::Cell;
//! 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;
*/
-#[allow(experimental)];
+#![allow(experimental)]
use kinds::marker;
use clone::Clone;
* ```
*/
-#[allow(unused_must_use)];
+#![allow(unused_must_use)]
use container::Container;
use io::Writer;
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
// This is needed to prevent duplicate lang item definitions.
#[cfg(test)]
//! 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
*/
-#[deny(unused_must_use)];
+#![deny(unused_must_use)]
use cast;
use char::Char;
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use io::IoResult;
use io::net::ip::{SocketAddr, IpAddr};
//! This module contains functions useful for parsing, formatting, and
//! manipulating IP addresses.
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use container::Container;
use fmt;
//! 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;
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use prelude::*;
//! 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;
//! Bindings for executing child processes
-#[deny(missing_doc)];
+#![deny(missing_doc)]
use prelude::*;
/*! Various utility functions useful for writing I/O tests */
-#[macro_escape];
+#![macro_escape]
use libc;
use os;
//!
//! 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
* 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.
//! 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.
///
//! 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;
// 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)
//! Operations and constants for 32-bits floats (`f32` type)
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use prelude::*;
//! Operations and constants for 64-bits floats (`f64` type)
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use prelude::*;
// 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) => ({
//! Operations and constants for signed 16-bits integers (`i16` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
//! Operations and constants for signed 32-bits integers (`i32` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
//! Operations and constants for signed 64-bits integers (`i64` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
//! Operations and constants for signed 8-bits integers (`i8` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
//! Operations and constants for architecture-sized signed integers (`int` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
// 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) => (
//! 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};
// 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;
//! Operations and constants for unsigned 16-bits integers (`u16` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
//! Operations and constants for unsigned 32-bits integers (`u32` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
//! Operations and constants for unsigned 64-bits integer (`u64` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
//! Operations and constants for unsigned 8-bits integers (`u8` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
//! Operations and constants for architecture-sized unsigned integers (`uint` type)
-#[allow(non_uppercase_statics)];
+#![allow(non_uppercase_statics)]
use prelude::*;
// 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) => (
* to write OS-ignorant code by default.
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
#[cfg(target_os = "macos")]
#[cfg(windows)]
/// 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)
/// 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)
// 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.
//!
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use intrinsics::{Disr, Opaque, TyDesc, TyVisitor};
use mem;
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use cast::transmute;
use char;
// 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;
//! 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};
//! 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;
//! 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;
//! 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)*) => ( {
*/
// FIXME: this should not be here.
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use any::Any;
use kinds::Send;
//! 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;
// 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;
*/
-#[warn(non_camel_case_types)];
+#![warn(non_camel_case_types)]
use cast;
use cast::transmute;
#[test]
fn test_add() {
- #[allow(unnecessary_allocation)];
+ #![allow(unnecessary_allocation)]
macro_rules! t (
($s1:expr, $s2:expr, $e:expr) => { {
let s1 = $s1;
//! }
//! ```
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use intrinsics;
use cast;
* 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
//! Operations on tuples
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use clone::Clone;
#[cfg(not(test))] use cmp::*;
// 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};
// 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;
//! } // `lock` is deallocated here
//! ```
-#[allow(non_camel_case_types)];
+#![allow(non_camel_case_types)]
use option::{Option, None, Some};
use ops::Drop;
//! SIMD vectors
-#[allow(non_camel_case_types)];
+#![allow(non_camel_case_types)]
#[experimental]
#[simd]
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use std::comm;
* ```
*/
-#[allow(missing_doc)];
+#![allow(missing_doc)]
use std::mem::replace;
* 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;
// 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.
*/
-#[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;
};
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;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[macro_escape];
+#![macro_escape]
use abi;
use abi::AbiSet;
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)
}
//! 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;
// 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))
// 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;
// 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;
// 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;
//! 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;
*/
-#[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)]
// 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;
// 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 }
// except according to those terms.
// ignore-fast #[feature] doesn't work with check-fast
-#[feature(asm)];
+#![feature(asm)]
fn foo(x: int) { println!("{}", x); }
// 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")]
// except according to those terms.
// ignore-fast #[feature] doesn't work with check-fast
-#[feature(asm)];
+#![feature(asm)]
fn foo(x: int) { println!("{}", x); }
// except according to those terms.
// ignore-fast #[feature] doesn't work with check-fast
-#[feature(asm)];
+#![feature(asm)]
fn foo(x: int) { println!("{}", x); }
// except according to those terms.
// ignore-fast #[feature] doesn't work with check-fast
-#[feature(asm)];
+#![feature(asm)]
fn foo(x: int) { println!("{}", x); }
// error-pattern: expected item
-#[attr = "val"];
+#![attr = "val"]
#[attr = "val"] // Unterminated
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(managed_boxes)];
+#![feature(managed_boxes)]
fn main() {
// 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,
// ignore-tidy-linelength
-#[no_std];
+#![no_std]
struct S<T> {
contents: T,
// 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 }
// 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,
// 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 }
// Tests that the borrow checker checks all components of a path when moving
// out.
-#[no_std];
+#![no_std]
struct S {
x : ~int
// 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;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(managed_boxes)];
+#![feature(managed_boxes)]
fn f<T>(x: T) -> @T {
@x //~ ERROR value may contain references
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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.
// Test that the borrow checker prevents pointers to temporaries
// with statement lifetimes from escaping.
-#[feature(macro_rules)];
+#![feature(macro_rules)]
use std::ops::Drop;
// 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;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
#[deriving(Eq)]
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
#[deriving(Eq)]
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
#[deriving(Eq)]
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
#[deriving(Eq)]
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
#[deriving(Eq)]
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
#[deriving(Eq)]
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
#[deriving(Eq)]
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
#[deriving(Eq)]
// 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)]
// 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)]
// 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)]
// 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)]
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate rand;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(managed_boxes)];
+#![feature(managed_boxes)]
type Foo = Vec<u8>;
// 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`
// 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
// aux-build:default_type_params_xc.rs
-#[deny(default_type_param_usage)];
+#![deny(default_type_param_usage)]
extern crate default_type_params_xc;
// ignore-fast feature doesn't work.
-#[feature(struct_variant)];
+#![feature(struct_variant)]
extern crate bäz; //~ ERROR non-ascii idents
// 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<A, B, C = (A, B)>;
// 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;
// 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;
// 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;
// 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;
// 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<T = Option<U>, U = bool>;
// 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;
// Make sure that globs only bring in public things.
-#[feature(globs)];
+#![feature(globs)]
use bar::*;
// 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; }
// 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 } }
// 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; }
// 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 } }
// 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
// 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
// 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
// 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<int> ) -> uint {
// 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 {
// 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 {
// 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
// ensures that 'use foo:*' doesn't import non-public 'use' statements in the
// module 'foo'
-#[feature(globs)];
+#![feature(globs)]
use m1::*;
// 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),+) => ({
// 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
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(managed_boxes)];
+#![feature(managed_boxes)]
struct BarStruct;
// 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() {
// 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;
// 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() -> ! {
// Test which of the builtin types are considered POD.
-#[feature(managed_boxes)];
+#![feature(managed_boxes)]
use std::rc::Rc;
// 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,
// 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) {}
// 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;
// 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;
// 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) {}
// 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
// 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 }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[deny(ctypes)];
+#![deny(ctypes)]
use std::libc;
// 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 {
// 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;
// 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 {
// 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 `~[]`
// 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
// 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);
// 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
// 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
// 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,
// 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,
// 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
// 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
// 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
// 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() {}
// 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 {
// 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;
// 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() { }
// except according to those terms.
//
-#[deny(type_overflow)];
+#![deny(type_overflow)]
fn test(x: i8) {
println!("x {}", x);
// 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
// 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() {}
// 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) {}
// 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
// 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() {}
// 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() {}
// 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 {
// 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;
// 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 {
// 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() {
// 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 {
// 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;
// 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<T>;
pub struct Public<T>;
// 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
//
// 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
// 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`
// ignore-android
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate macro_crate_test;
// 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
// 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 {
() => {
// 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],
// 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],
// 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
// 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;
// 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<A> { f: A }
fn guard(_s: ~str) -> bool {fail!()}
// 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
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(managed_boxes)];
+#![feature(managed_boxes)]
use std::task;
// 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
// 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
// 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;
// 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;
// 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
// ignore-android
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate macro_crate_test;
// 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;
// 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 {
// 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 {
// 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
// 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.
// 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.
// 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.
// 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,
// 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}
// 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|
// 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
// 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.
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[deny(experimental)];
+#![deny(experimental)]
use std::unstable::simd;
// 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, T); //~ ERROR SIMD vector cannot be generic
// 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
// 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
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(managed_boxes)];
+#![feature(managed_boxes)]
fn f<T:'static>(_: T) {}
// Issue #8380
-#[feature(globs)];
+#![feature(globs)]
use std::sync::atomics::*;
use std::ptr;
// 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<int> },
// ignore-pretty
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate fourcc;
// ignore-pretty
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate fourcc;
// ignore-pretty
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate fourcc;
// ignore-pretty
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate fourcc;
// ignore-pretty
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate fourcc;
// ignore-pretty
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate hexfloat;
// ignore-pretty
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate hexfloat;
// 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,
// 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`
// 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;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(managed_boxes)];
+#![feature(managed_boxes)]
fn f<T:Send>(_i: T) {
}
// 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;
// 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{}
// issue #12418
-#[deny(unused_unsafe)];
+#![deny(unused_unsafe)]
fn main() {
unsafe { println!("foo"); } //~ ERROR unnecessary `unsafe`
// 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
// 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 }
// 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 {
// 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