);
```
-Any use of `asm` is feature gated (requires `#[feature(asm)];` on the
+Any use of `asm` is feature gated (requires `#![feature(asm)]` on the
crate to allow) and of course requires an `unsafe` block.
> **Note**: the examples here are given in x86/x86-64 assembly, but all
literal string (i.e `""`)
```
-#[feature(asm)];
+#![feature(asm)]
#[cfg(target_arch = "x86")]
#[cfg(target_arch = "x86_64")]
but you must add the right number of `:` if you skip them:
```
-# #[feature(asm)];
+# #![feature(asm)]
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
# fn main() { unsafe {
asm!("xor %eax, %eax"
Whitespace also doesn't matter:
```
-# #[feature(asm)];
+# #![feature(asm)]
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
# fn main() { unsafe {
asm!("xor %eax, %eax" ::: "eax");
expressions must be mutable lvalues:
```
-# #[feature(asm)];
+# #![feature(asm)]
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
fn add(a: int, b: int) -> int {
let mut c = 0;
stay valid.
```
-# #[feature(asm)];
+# #![feature(asm)]
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
# fn main() { unsafe {
// Put the value 0x200 in eax
# Japanese translations for Rust package
-# Copyright (C) 2013 The Rust Project Developers
+# Copyright (C) 2013-2014 The Rust Project Developers
# This file is distributed under the same license as the Rust package.
# Automatically generated, 2013.
#
#: src/doc/rust.md:2008
#, fuzzy
#| msgid "~~~~ use std::task::spawn;"
-msgid "~~~~ {.ignore} #[warn(unstable)];"
+msgid "~~~~ {.ignore} #![warn(unstable)]"
msgstr ""
"~~~~\n"
"use std::task::spawn;"
#[crate_id=\"run_pass_stage2#0.1\"];
#[crate_id=\"run_pass_stage2#0.1\"];
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
-#[allow(warnings)];
+#![allow(warnings)]
extern crate collections;
"""
)
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
## Example
```
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)] extern crate log;
fn main() {
/// # Example
///
/// ```
-/// #[feature(phase)];
+/// #![feature(phase)]
/// #[phase(syntax, link)] extern crate log;
///
/// # fn main() {
/// # Example
///
/// ```
-/// #[feature(phase)];
+/// #![feature(phase)]
/// #[phase(syntax, link)] extern crate log;
///
/// # fn main() {
/// # Example
///
/// ```
-/// #[feature(phase)];
+/// #![feature(phase)]
/// #[phase(syntax, link)] extern crate log;
///
/// # fn main() {
/// # Example
///
/// ```
-/// #[feature(phase)];
+/// #![feature(phase)]
/// #[phase(syntax, link)] extern crate log;
///
/// # fn main() {
/// # Example
///
/// ```
-/// #[feature(phase)];
+/// #![feature(phase)]
/// #[phase(syntax, link)] extern crate log;
///
/// # fn main() {
/// # Example
///
/// ```
-/// #[feature(phase)];
+/// #![feature(phase)]
/// #[phase(syntax, link)] extern crate log;
///
/// # fn main() {
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// except according to those terms.
#[allow(unused_imports)];
-#[feature(globs)];
+#![feature(globs)]
extern crate issue_2316_a;
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)] extern crate log;
pub fn foo<T>() {
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// error-pattern: unresolved name
-#[feature(globs)];
+#![feature(globs)]
use module_of_many_things::*;
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// error-pattern: unresolved
-#[feature(globs)];
+#![feature(globs)]
mod circ1 {
pub use circ2::f2;
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(globs)];
+#![feature(globs)]
// error-pattern:declaration of `None` shadows
use std::option::*;
// ignore-test Can't use syntax crate here
-#[feature(quote)];
+#![feature(quote)]
extern crate syntax;
// ignore-test Can't use syntax crate here
-#[feature(quote)];
+#![feature(quote)]
extern crate syntax;
// debugger:continue
-#[allow(experimental)];
+#![allow(experimental)]
#[allow(unused_variable)];
use std::unstable::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2};
// ignore-fast #[feature] doesn't work with check-fast
// pp-exact
-#[feature(asm)];
+#![feature(asm)]
#[cfg = r#"just parse this"#]
extern crate blah = r##"blah"##;
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Issue #7580
// error-pattern:fail works
-#[feature(globs)];
+#![feature(globs)]
use std::*;
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// error-pattern:whatever
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)] extern crate log;
use std::os;
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// error-pattern:whatever
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)] extern crate log;
use std::os;
use std::task;
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// error-pattern:whatever
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)] extern crate log;
use std::os;
// ignore-android
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate macro_crate_outlive_expansion_phase;
// ignore-android
// ignore-cross-compile #12102
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate macro_crate_test;
// can't run host binaries, and force-host to make this test build as the host
// arch.
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)]
extern crate macro_crate_test;
// ignore-pretty
// ignore-test
-#[feature(quote)];
+#![feature(quote)]
extern crate syntax;
// ignore-test
-#[feature(quote)];
+#![feature(quote)]
#[feature(managed_boxes)];
extern crate syntax;
// ignore-fast
// ignore-android
-#[feature(quote)];
+#![feature(quote)]
#[deny(unused_variable)];
extern crate syntax;
// ignore-pretty
// ignore-cross-compile
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate fourcc;
// ignore-cross-compile #12102
// ignore-fast
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate hexfloat;
// except according to those terms.
// ignore-fast #[feature] doesn't work with check-fast
-#[feature(asm)];
+#![feature(asm)]
pub fn main() {
unsafe { asm!(concat!("", "")) };
// except according to those terms.
// ignore-fast #[feature] doesn't work with check-fast
-#[feature(asm)];
+#![feature(asm)]
#[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)]
#[cfg(target_arch = "x86")]
#[cfg(target_arch = "x86_64")]
// ignore-android (FIXME #11419)
// exec-env:RUST_LOG=info
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)]
extern crate log;
// compile-flags: --cfg ndebug
// exec-env:RUST_LOG=conditional-debug-macro-off=4
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)]
extern crate log;
// Modified to not use export since it's going away. --pcw
-#[feature(globs)];
+#![feature(globs)]
mod foo {
use foo::bar::*;
// ignore-fast: check-fast screws up repr paths
#[feature(macro_rules)];
-#[deny(warnings)];
+#![deny(warnings)]
#[allow(unused_must_use)];
#[allow(deprecated_owned_vector)];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(globs)];
+#![feature(globs)]
use module_of_many_things::*;
use dug::too::greedily::and::too::deep::*;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(globs)];
+#![feature(globs)]
#[allow(dead_assignment)];
use std::mem::*;
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(globs)];
+#![feature(globs)]
pub fn main() {
use std::mem::replace;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(globs)];
+#![feature(globs)]
mod rusti {
extern "rust-intrinsic" {
// ignore-fast
// aux-build:issue-2526.rs
-#[feature(globs)];
+#![feature(globs)]
#[allow(unused_imports)];
extern crate issue_2526;
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
use std::libc;
extern {
- #[attr];
+ #![attr]
#[attr]
fn rust_get_test_int() -> libc::intptr_t;
// ignore-macos
// aux-build:linkage1.rs
-#[feature(linkage)];
+#![feature(linkage)]
extern crate other = "linkage1";
// compile-flags:--cfg ndebug
// exec-env:RUST_LOG=logging-enabled-debug=debug
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)]
extern crate log;
// ignore-fast
// exec-env:RUST_LOG=logging-enabled=info
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)]
extern crate log;
// aux-build:macro_crate_def_only.rs
// ignore-fast
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate macro_crate_def_only;
//ignore-stage1
//ignore-fast
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
extern crate macro_export_inner_module;
// ignore-fast
-#[feature(asm)];
+#![feature(asm)]
use std::io::Process;
use std::os;
// ignore-fast
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax)]
use std::mem;
// 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)];
+#![feature(globs)]
#[allow(dead_code)];
#[allow(unused_imports)];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(globs)];
+#![feature(globs)]
// FIXME #3654
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[allow(experimental)];
+#![allow(experimental)]
use std::unstable::simd::{i32x4, f32x4, u32x4};
// ignore-fast
-#[feature(simd)];
+#![feature(simd)]
use std::ops;
// ignore-fast
-#[allow(experimental)];
-#[feature(simd)];
+#![allow(experimental)]
+#![feature(simd)]
pub fn main() {
let _o = None::<std::unstable::simd::i32x4>;
// ignore-fast feature doesn't work
-#[feature(simd)];
+#![feature(simd)]
#[simd]
struct RGBA {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[feature(globs)];
+#![feature(globs)]
use alder::*;
// ignore-android needs extra network permissions
// exec-env:RUST_LOG=debug
-#[feature(phase)];
+#![feature(phase)]
#[phase(syntax, link)]
extern crate log;
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// compile-flags:-D ctypes
-#[allow(ctypes)];
+#![allow(ctypes)]
mod libc {
extern {