// except according to those terms.
#![crate_type = "bin"]
-#![allow(unknown_features)]
-#![feature(slicing_syntax, unboxed_closures)]
+
#![feature(box_syntax)]
+#![feature(collections)]
+#![feature(core)]
#![feature(int_uint)]
-#![feature(test)]
-#![feature(rustc_private)]
-#![feature(std_misc)]
-#![feature(path)]
#![feature(io)]
-#![feature(core)]
-#![feature(collections)]
#![feature(os)]
+#![feature(path)]
+#![feature(rustc_private)]
+#![feature(slicing_syntax, unboxed_closures)]
+#![feature(std_misc)]
+#![feature(test)]
#![feature(unicode)]
-#![allow(unstable)]
#![deny(warnings)]
extern crate test;
fn main() {
let v = vec!["match_this", "1"];
- match &v {
+ match &v[] {
["match_this", second] => println!("The second element is {}", second),
_ => {},
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![allow(unknown_features)]
#![cfg_attr(rustc, feature(rustc_private))]
#![cfg_attr(rustdoc, feature(rustdoc))]
html_root_url = "http://doc.rust-lang.org/nightly/")]
#![no_std]
-#![allow(unknown_features)]
#![feature(lang_items, unsafe_destructor)]
#![feature(box_syntax)]
#![feature(optin_builtin_traits)]
-#![allow(unknown_features)] #![feature(int_uint)]
+#![feature(int_uint)]
#![feature(core)]
#![feature(hash)]
#![feature(libc)]
#![crate_name = "arena"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
-#![feature(unsafe_destructor)]
-#![feature(unboxed_closures)]
-#![feature(box_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
-#![allow(missing_docs)]
#![feature(alloc)]
+#![feature(box_syntax)]
#![feature(core)]
+#![feature(int_uint)]
+#![feature(staged_api)]
+#![feature(unboxed_closures)]
+#![feature(unsafe_destructor)]
#![cfg_attr(test, feature(test))]
-#![cfg_attr(test, feature(collections))]
extern crate alloc;
#![crate_name = "collections"]
#![unstable(feature = "collections")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
-#![allow(unknown_features)]
-#![feature(unsafe_destructor, slicing_syntax)]
+#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
+
+#![feature(alloc)]
#![feature(box_syntax)]
-#![feature(unboxed_closures)]
-#![allow(unknown_features)] #![feature(int_uint)]
-#![no_std]
#![feature(core)]
-#![feature(alloc)]
-#![feature(unicode)]
#![feature(hash)]
+#![feature(int_uint)]
+#![feature(staged_api)]
+#![feature(unboxed_closures)]
+#![feature(unicode)]
+#![feature(unsafe_destructor, slicing_syntax)]
#![cfg_attr(test, feature(test))]
-// NOTE(stage0): remove after a snapshot
-#![cfg_attr(not(stage0), allow(unused_mut))]
+
+#![no_std]
#[macro_use]
extern crate core;
d.push_back(i);
}
- assert_eq!(d.drain().collect::<Vec<i32>>(), [0, 1, 2, 3, 4]);
+ assert_eq!(d.drain().collect::<Vec<_>>(), [0, 1, 2, 3, 4]);
assert!(d.is_empty());
}
for i in 0..5 {
d.push_back(i);
}
- for i in 6i..9 {
+ for i in 6..9 {
d.push_front(i);
}
- assert_eq!(d.drain().collect::<Vec<i32>>(), [8,7,6,0,1,2,3,4]);
+ assert_eq!(d.drain().collect::<Vec<_>>(), [8,7,6,0,1,2,3,4]);
assert!(d.is_empty());
}
// partially used
{
- let mut d = RingBuf::new();
+ let mut d: RingBuf<i32> = RingBuf::new();
for i in 0..5 {
d.push_back(i);
}
- for i in 6i..9 {
+ for i in 6..9 {
d.push_front(i);
}
#[test]
fn test_as_slices() {
let mut ring: RingBuf<i32> = RingBuf::with_capacity(127);
- let cap = ring.capacity() as int;
+ let cap = ring.capacity() as i32;
let first = cap/2;
let last = cap - first;
for i in 0..first {
assert_eq!(right, expected_right);
}
- assert_eq!(ring.len() as int, cap);
- assert_eq!(ring.capacity() as int, cap);
+ assert_eq!(ring.len() as i32, cap);
+ assert_eq!(ring.capacity() as i32, cap);
}
#[test]
fn test_as_mut_slices() {
let mut ring: RingBuf<i32> = RingBuf::with_capacity(127);
- let cap = ring.capacity() as int;
+ let cap = ring.capacity() as i32;
let first = cap/2;
let last = cap - first;
for i in 0..first {
assert_eq!(right, expected_right);
}
- assert_eq!(ring.len() as int, cap);
- assert_eq!(ring.capacity() as int, cap);
+ assert_eq!(ring.len() as i32, cap);
+ assert_eq!(ring.capacity() as i32, cap);
}
}
/// # Examples
///
/// ```
- /// let mut vec: Vec<int> = Vec::with_capacity(10);
+ /// let mut vec: Vec<_> = Vec::with_capacity(10);
///
/// // The vector contains no items, even though it has capacity for more
/// assert_eq!(vec.len(), 0);
#![crate_name = "core"]
#![unstable(feature = "core")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_playground_url = "http://play.rust-lang.org/")]
#![no_std]
-#![allow(unknown_features, raw_pointer_derive)]
-#![allow(unknown_features)] #![feature(intrinsics, lang_items)]
+#![allow(raw_pointer_derive)]
+#![deny(missing_docs)]
+#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
+
+#![feature(int_uint)]
+#![feature(intrinsics, lang_items)]
+#![feature(on_unimplemented)]
#![feature(simd, unsafe_destructor, slicing_syntax)]
+#![feature(staged_api)]
#![feature(unboxed_closures)]
-#![allow(unknown_features)] #![feature(int_uint)]
-#![feature(on_unimplemented)]
-#![deny(missing_docs)]
-// NOTE(stage0) remove cfg_attr after a snapshot
-#![cfg_attr(not(stage0), allow(unused_mut))]
#[macro_use]
mod macros;
from_str_radix_int_impl! { u64 }
/// An error which can be returned when parsing an integer.
-#[derive(Show, Clone, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct ParseIntError { kind: IntErrorKind }
-#[derive(Show, Clone, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
enum IntErrorKind {
Empty,
InvalidDigit,
}
/// An error which can be returned when parsing a float.
-#[derive(Show, Clone, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct ParseFloatError { kind: FloatErrorKind }
-#[derive(Show, Clone, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
enum FloatErrorKind {
Empty,
Invalid,
}
/// An error returned when parsing a `bool` from a string fails.
-#[derive(Show, Clone, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
#[allow(missing_copy_implementations)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct ParseBoolError { _priv: () }
// FIXME (#18248) Add tests for hashing Rc<str> and Rc<[T]>
unsafe {
- let ptr: *const int = mem::transmute(5);
+ let ptr: *const i32 = mem::transmute(5is);
assert_eq!(hash(&ptr), 5);
}
unsafe {
- let ptr: *mut int = mem::transmute(5);
+ let ptr: *mut i32 = mem::transmute(5is);
assert_eq!(hash(&ptr), 5);
}
}
#[test]
fn test_iterator_sum() {
- let v: &[_] = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+ let v: &[i32] = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
assert_eq!(v[..4].iter().map(|&x| x).sum(), 6);
assert_eq!(v.iter().map(|&x| x).sum(), 55);
assert_eq!(v[..0].iter().map(|&x| x).sum(), 0);
#[test]
fn test_iterator_product() {
- let v: &[_] = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+ let v: &[i32] = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
assert_eq!(v[..4].iter().map(|&x| x).product(), 0);
assert_eq!(v[1..5].iter().map(|&x| x).product(), 24);
assert_eq!(v[..0].iter().map(|&x| x).product(), 1);
#[test]
fn test_double_ended_range() {
- assert!((11..14).rev().collect::<Vec<int>>() == vec![13, 12, 11]);
+ assert!((11..14).rev().collect::<Vec<_>>() == vec![13, 12, 11]);
for _ in (10..0).rev() {
panic!("unreachable");
}
- assert!((11u..14).rev().collect::<Vec<uint>>() == vec![13u, 12, 11]);
- for _ in (10u..0).rev() {
+ assert!((11..14).rev().collect::<Vec<_>>() == vec![13, 12, 11]);
+ for _ in (10..0).rev() {
panic!("unreachable");
}
}
#[test]
fn test_range() {
- assert!((0..5).collect::<Vec<int>>() == vec![0, 1, 2, 3, 4]);
- assert!((-10..-1).collect::<Vec<int>>() ==
+ assert!((0..5).collect::<Vec<_>>() == vec![0, 1, 2, 3, 4]);
+ assert!((-10..-1).collect::<Vec<_>>() ==
vec![-10, -9, -8, -7, -6, -5, -4, -3, -2]);
- assert!((0..5).rev().collect::<Vec<int>>() == vec![4, 3, 2, 1, 0]);
+ assert!((0..5).rev().collect::<Vec<_>>() == vec![4, 3, 2, 1, 0]);
assert_eq!((200..-5).count(), 0);
assert_eq!((200..-5).rev().count(), 0);
assert_eq!((200..200).count(), 0);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(unsafe_destructor, slicing_syntax)]
-#![feature(unboxed_closures)]
#![feature(box_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
+#![feature(int_uint)]
+#![feature(unboxed_closures)]
+#![feature(unsafe_destructor, slicing_syntax)]
extern crate core;
extern crate test;
#![crate_name = "flate"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
-#![allow(unknown_features)] #![feature(int_uint)]
#![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://doc.rust-lang.org/nightly/")]
-#![feature(hash)]
+
#![feature(core)]
+#![feature(int_uint)]
#![feature(libc)]
+#![feature(staged_api)]
#[cfg(test)] #[macro_use] extern crate log;
#![crate_name = "fmt_macros"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
+#![cfg_attr(stage0, feature(core))]
+#![feature(int_uint)]
#![feature(slicing_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
-#![feature(collections)]
-#![feature(core)]
+#![feature(staged_api)]
#![feature(unicode)]
pub use self::Piece::*;
#![crate_name = "getopts"]
#![unstable(feature = "rustc_private",
reason = "use the crates.io `getopts` library instead")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
-#![feature(slicing_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
+
#![deny(missing_docs)]
#![feature(collections)]
#![feature(core)]
+#![feature(int_uint)]
+#![feature(slicing_syntax)]
+#![feature(staged_api)]
#![cfg_attr(test, feature(rustc_private))]
#[cfg(test)] #[macro_use] extern crate log;
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
#![feature(slicing_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
+#![feature(int_uint)]
#![feature(collections)]
#![feature(core)]
#![feature(io)]
#![cfg_attr(not(feature = "cargo-build"), feature(staged_api))]
#![cfg_attr(not(feature = "cargo-build"), staged_api)]
#![cfg_attr(not(feature = "cargo-build"), feature(core))]
-#![allow(unknown_features)] #![feature(int_uint)]
+#![feature(int_uint)]
#![no_std]
#![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",
#![crate_name = "log"]
#![unstable(feature = "rustc_private",
reason = "use the crates.io `log` library instead")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
+#![deny(missing_docs)]
-#![allow(unknown_features)]
+#![feature(staged_api)]
#![feature(slicing_syntax)]
#![feature(box_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
-#![deny(missing_docs)]
-#![feature(collections)]
+#![feature(int_uint)]
#![feature(core)]
#![feature(io)]
#![feature(os)]
-#![feature(rustc_private)]
#![feature(std_misc)]
use std::cell::RefCell;
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
-#![allow(unknown_features)] #![feature(int_uint)]
+#![feature(int_uint)]
#![no_std]
#![unstable(feature = "rand")]
#![feature(staged_api)]
#![crate_name = "rbml"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
-#![allow(unknown_features)]
-#![feature(slicing_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
+
#![feature(collections)]
#![feature(core)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(rustc_private)]
+#![feature(slicing_syntax)]
+#![feature(staged_api)]
extern crate serialize;
#[macro_use] extern crate log;
#![crate_name = "rustc"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
-#![feature(quote)]
-#![feature(slicing_syntax, unsafe_destructor)]
+#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
+
#![feature(box_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
-#![feature(rustc_diagnostic_macros)]
#![feature(collections)]
#![feature(core)]
+#![feature(hash)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(libc)]
#![feature(os)]
#![feature(path)]
+#![feature(quote)]
+#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
+#![feature(slicing_syntax, unsafe_destructor)]
+#![feature(staged_api)]
#![feature(std_misc)]
#![feature(unicode)]
-#![feature(hash)]
#![cfg_attr(test, feature(test))]
-// NOTE(stage0) remove cfg_attr after a snapshot
-#![cfg_attr(not(stage0), allow(unused_mut))]
extern crate arena;
extern crate flate;
#![crate_name = "rustc_back"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![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://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
-#![feature(slicing_syntax, box_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
+
+#![feature(box_syntax)]
#![feature(collections)]
#![feature(core)]
#![feature(hash)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(os)]
#![feature(path)]
#![feature(rustc_private)]
+#![feature(staged_api)]
extern crate syntax;
extern crate serialize;
// except according to those terms.
#![crate_name = "rustc_bitflags"]
-#![allow(unknown_features)]
#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![crate_name = "rustc_borrowck"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
-#![feature(quote)]
-#![feature(slicing_syntax, unsafe_destructor)]
-#![feature(rustc_diagnostic_macros)]
-#![allow(unknown_features)] #![feature(int_uint)]
#![allow(non_camel_case_types)]
-#![feature(collections)]
+
#![feature(core)]
-#![feature(rustc_private)]
#![feature(hash)]
+#![feature(int_uint)]
+#![feature(quote)]
+#![feature(rustc_diagnostic_macros)]
+#![feature(rustc_private)]
+#![feature(staged_api)]
+#![feature(unsafe_destructor)]
#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
#![crate_name = "rustc_driver"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
-#![feature(quote)]
-#![feature(slicing_syntax, unsafe_destructor)]
#![feature(box_syntax)]
-#![feature(rustc_diagnostic_macros)]
-#![allow(unknown_features)] #![feature(int_uint)]
#![feature(collections)]
#![feature(core)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(libc)]
#![feature(os)]
#![feature(path)]
+#![feature(quote)]
+#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
+#![feature(slicing_syntax, unsafe_destructor)]
+#![feature(staged_api)]
#![feature(std_misc)]
#![feature(unicode)]
#![crate_name = "rustc_llvm"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
-#![feature(link_args)]
#![feature(box_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
#![feature(collections)]
#![feature(core)]
+#![feature(hash)]
+#![feature(int_uint)]
#![feature(libc)]
+#![feature(link_args)]
#![feature(path)]
+#![feature(staged_api)]
#![feature(std_misc)]
-#![feature(hash)]
extern crate libc;
#[macro_use] #[no_link] extern crate rustc_bitflags;
#![crate_name = "rustc_privacy"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![feature(rustc_diagnostic_macros)]
-#![allow(unknown_features)] #![feature(int_uint)]
-#![feature(collections)]
#![feature(core)]
+#![feature(int_uint)]
+#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
+#![feature(staged_api)]
#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
#![crate_name = "rustc_resolve"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![feature(slicing_syntax)]
-#![feature(rustc_diagnostic_macros)]
-#![allow(unknown_features)] #![feature(int_uint)]
#![feature(alloc)]
#![feature(collections)]
#![feature(core)]
+#![feature(hash)]
+#![feature(int_uint)]
+#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
+#![feature(slicing_syntax)]
+#![feature(staged_api)]
#![feature(std_misc)]
-#![feature(hash)]
#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
#![crate_name = "rustc_trans"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
-#![feature(quote)]
-#![feature(slicing_syntax, unsafe_destructor)]
-#![feature(box_syntax)]
-#![feature(rustc_diagnostic_macros)]
-#![allow(unknown_features)] #![feature(int_uint)]
+#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
+
#![feature(alloc)]
+#![feature(box_syntax)]
#![feature(collections)]
#![feature(core)]
+#![feature(hash)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(libc)]
#![feature(os)]
#![feature(path)]
+#![feature(quote)]
+#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
+#![feature(slicing_syntax, unsafe_destructor)]
+#![feature(staged_api)]
#![feature(std_misc)]
#![feature(unicode)]
-#![feature(hash)]
-// NOTE(stage0) remove cfg_attr after a snapshot
-#![cfg_attr(not(stage0), allow(unused_mut))]
extern crate arena;
extern crate flate;
global: path.global,
segments: segs};
let qualname = if i == 0 && path.global {
- format("::{}", path_to_string(&sub_path))
+ format!("::{}", path_to_string(&sub_path))
} else {
path_to_string(&sub_path)
};
return;
}
- let sub_paths = sub_paths[..len-1];
+ let sub_paths = &sub_paths[..len-1];
for (i, &(ref span, ref qualname)) in sub_paths.iter().enumerate() {
let qualname = if i == 0 && global && !path.global {
format!("::{}", qualname)
match self.analysis.ty_cx.map.get(def_id.node) {
NodeItem(_) => {
format!("::{}", ty::item_path_str(&self.analysis.ty_cx, def_id))
- result
}
_ => {
self.sess.span_bug(method.span,
}
}
ast::ItemExternCrate(ref s) => {
- let name = get_ident(ident);
+ let name = get_ident(item.ident);
let name = name.get();
let location = match *s {
Some((ref s, _)) => s.get().to_string(),
None => name.to_string(),
};
- let alias_span = self.span.span_for_last_ident(i.span);
- let cnum = match self.sess.cstore.find_extern_mod_stmt_cnum(id) {
+ let alias_span = self.span.span_for_last_ident(item.span);
+ let cnum = match self.sess.cstore.find_extern_mod_stmt_cnum(item.id) {
Some(cnum) => cnum,
None => 0,
};
- self.fmt.extern_crate_str(i.span,
+ self.fmt.extern_crate_str(item.span,
alias_span,
- id,
+ item.id,
cnum,
name,
&location[],
}
/// Whether `autoderef` requires types to resolve.
-#[derive(Copy, Show, PartialEq, Eq)]
+#[derive(Copy, Debug, PartialEq, Eq)]
pub enum UnresolvedTypeAction {
/// Produce an error and return `ty_err` whenever a type cannot
/// be resolved (i.e. it is `ty_infer`).
#![crate_name = "rustc_typeck"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
-#![feature(quote)]
-#![feature(slicing_syntax, unsafe_destructor)]
-#![feature(box_syntax)]
-#![feature(rustc_diagnostic_macros)]
-#![allow(unknown_features)] #![feature(int_uint)]
#![allow(non_camel_case_types)]
+#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
+
+#![feature(box_syntax)]
#![feature(collections)]
#![feature(core)]
+#![feature(int_uint)]
+#![feature(quote)]
+#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
+#![feature(slicing_syntax, unsafe_destructor)]
+#![feature(staged_api)]
#![feature(std_misc)]
-// NOTE(stage0) remove cfg_attr after a snapshot
-#![cfg_attr(not(stage0), allow(unused_mut))]
#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
let mut seen_other_tags = false;
let mut data = LangString::all_false();
- let mut tokens = string.split(|&: c: char|
+ let tokens = string.split(|&: c: char|
!(c == '_' || c == '-' || c.is_alphanumeric())
);
clean::VariantItem(ref var) => {
match var.kind {
clean::StructVariant(ref s) => {
- let mut fields = s.fields.iter().filter(|f| {
+ let fields = s.fields.iter().filter(|f| {
match f.inner {
clean::StructFieldItem(ref t) => match *t {
clean::HiddenStructField => false,
#![crate_name = "rustdoc"]
#![unstable(feature = "rustdoc")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
-#![feature(slicing_syntax)]
+
#![feature(box_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
#![feature(collections)]
#![feature(core)]
+#![feature(hash)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(libc)]
#![feature(os)]
#![feature(path)]
#![feature(rustc_private)]
+#![feature(slicing_syntax)]
+#![feature(staged_api)]
#![feature(std_misc)]
#![feature(test)]
#![feature(unicode)]
-#![feature(hash)]
-// NOTE(stage0) remove cfg_attr after a snapshot
-#![cfg_attr(not(stage0), allow(unused_mut))]
extern crate arena;
extern crate getopts;
#![crate_name = "serialize"]
#![unstable(feature = "rustc_private",
reason = "deprecated in favor of rustc-serialize on crates.io")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
-#![allow(unknown_features)]
+
#![feature(box_syntax)]
-#![feature(old_impl_check)]
-#![feature(slicing_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
#![feature(collections)]
#![feature(core)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(path)]
#![feature(rustc_private)]
+#![feature(slicing_syntax)]
+#![feature(staged_api)]
#![feature(std_misc)]
#![feature(unicode)]
#![cfg_attr(test, feature(test))]
#![crate_name = "std"]
#![stable(feature = "rust1", since = "1.0.0")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
-#![allow(unknown_features)]
-#![feature(linkage, thread_local, asm)]
-#![feature(lang_items, unsafe_destructor)]
-#![feature(slicing_syntax, unboxed_closures)]
+#![feature(alloc)]
#![feature(box_syntax)]
-#![feature(old_impl_check)]
-#![feature(optin_builtin_traits)]
-#![feature(int_uint)]
+#![feature(collections)]
#![feature(core)]
+#![feature(hash)]
+#![feature(int_uint)]
+#![feature(lang_items, unsafe_destructor)]
#![feature(libc)]
-#![feature(alloc)]
-#![feature(unicode)]
-#![feature(collections)]
+#![feature(linkage, thread_local, asm)]
+#![feature(old_impl_check)]
+#![feature(optin_builtin_traits)]
#![feature(rand)]
-#![feature(hash)]
+#![feature(staged_api)]
+#![feature(unboxed_closures)]
+#![feature(unicode)]
+#![cfg_attr(not(stage0), feature(macro_reexport))]
#![cfg_attr(test, feature(test))]
-// NOTE(stage0): remove cfg_attr after a snapshot
-#![cfg_attr(not(stage0), allow(unused_mut))]
-#![feature(macro_reexport)]
// Don't link to std. We are std.
#![no_std]
#![deny(missing_docs)]
+#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
#[cfg(test)]
#[macro_use]
let dir = &tmpdir.join("di_readdir");
check!(mkdir(dir, old_io::USER_RWX));
let prefix = "foo";
- for n in 0..3 {
+ for n in 0is..3 {
let f = dir.join(format!("{}.txt", n));
let mut w = check!(File::create(&f));
- let msg_str = format!("{}{}", prefix, n.to_string());
+ let msg_str = format!("{}{}", prefix, n);
let msg = msg_str.as_bytes();
check!(w.write(msg));
}
}
}
-#[derive(Show, Clone, PartialEq, Copy)]
+#[derive(Debug, Clone, PartialEq, Copy)]
pub struct ParseError;
/// A trait for objects which can be converted or resolved to one or more `SocketAddr` values.
tx.send(TcpStream::connect(addr).unwrap()).unwrap();
});
let _l = rx.recv().unwrap();
- for i in 0..1001 {
+ for i in 0is..1001 {
match a.accept() {
Ok(..) => break,
Err(ref e) if e.kind == TimedOut => {}
assert_eq!(s.read(&mut [0]).err().unwrap().kind, TimedOut);
s.set_timeout(Some(20));
- for i in 0..1001 {
+ for i in 0is..1001 {
match s.write(&[0; 128 * 1024]) {
Ok(()) | Err(IoError { kind: ShortWrite(..), .. }) => {},
Err(IoError { kind: TimedOut, .. }) => break,
let mut s = a.accept().unwrap();
s.set_write_timeout(Some(20));
- for i in 0..1001 {
+ for i in 0is..1001 {
match s.write(&[0; 128 * 1024]) {
Ok(()) | Err(IoError { kind: ShortWrite(..), .. }) => {},
Err(IoError { kind: TimedOut, .. }) => break,
}
/// Valuelue indicating that a path could not be parsed from a string.
-#[derive(Show, Clone, PartialEq, Copy)]
+#[derive(Debug, Clone, PartialEq, Copy)]
pub struct ParsePathError;
impl<S: hash::Writer + hash::Hasher> hash::Hash<S> for Path {
}
/// Value indicating that a path could not be parsed from a string.
-#[derive(Show, Clone, PartialEq, Copy)]
+#[derive(Debug, Clone, PartialEq, Copy)]
pub struct ParsePathError;
impl<S: hash::Writer + hash::Hasher> hash::Hash<S> for Path {
// An uninlined, unmangled function upon which to slap yer breakpoints
#[inline(never)]
#[no_mangle]
-#[allow(private_no_mangle_fns)]
+#[cfg_attr(not(stage0), allow(private_no_mangle_fns))]
fn rust_panic(cause: Box<Any + Send>) -> ! {
rtdebug!("begin_unwind()");
#[lang="eh_personality"]
#[no_mangle] // referenced from rust_try.ll
- #[allow(private_no_mangle_fns)]
+ #[cfg_attr(not(stage0), allow(private_no_mangle_fns))]
extern fn rust_eh_personality(
version: c_int,
actions: uw::_Unwind_Action,
("int_uint", "1.0.0", Active),
// macro reexport needs more discusion and stabilization
- ("macro_reexport", Active),
+ ("macro_reexport", "1.0.0", Active),
// These are used to test this portion of the compiler, they don't actually
// mean anything
#![crate_name = "syntax"]
#![unstable(feature = "rustc_private")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
-#![feature(slicing_syntax)]
+#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
+
#![feature(box_syntax)]
-#![feature(quote, unsafe_destructor)]
-#![allow(unknown_features)] #![feature(int_uint)]
#![feature(collections)]
#![feature(core)]
#![feature(hash)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(libc)]
#![feature(os)]
#![feature(path)]
+#![feature(quote, unsafe_destructor)]
#![feature(rustc_private)]
+#![feature(slicing_syntax)]
+#![feature(staged_api)]
#![feature(std_misc)]
#![feature(unicode)]
-// NOTE(stage0) remove cfg_attr after a snapshot
-#![cfg_attr(not(stage0), allow(unused_mut))]
extern crate arena;
extern crate fmt_macros;
#![crate_name = "term"]
#![unstable(feature = "rustc_private",
reason = "use the crates.io `term` library instead")]
-#![feature(staged_api)]
#![staged_api]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
+#![deny(missing_docs)]
-#![allow(unknown_features)]
-#![feature(slicing_syntax)]
#![feature(box_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
-#![deny(missing_docs)]
#![feature(collections)]
#![feature(core)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(os)]
#![feature(path)]
#![feature(rustc_private)]
+#![feature(slicing_syntax)]
+#![feature(staged_api)]
#![feature(std_misc)]
#![feature(unicode)]
#![crate_name = "test"]
#![unstable(feature = "test")]
-#![feature(staged_api)]
#![staged_api]
#![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://doc.rust-lang.org/nightly/")]
-#![allow(unknown_features)]
+
+#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
+
#![feature(asm, slicing_syntax)]
#![feature(box_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
#![feature(collections)]
#![feature(core)]
+#![feature(hash)]
+#![feature(int_uint)]
#![feature(io)]
#![feature(os)]
#![feature(path)]
#![feature(rustc_private)]
+#![feature(staged_api)]
#![feature(std_misc)]
-#![feature(hash)]
-// NOTE(stage0): remove cfg_attr after a snapshot
-#![cfg_attr(not(stage0), allow(unused_mut))]
extern crate getopts;
extern crate serialize;
html_playground_url = "http://play.rust-lang.org/")]
#![no_std]
#![feature(slicing_syntax)]
-#![allow(unknown_features)] #![feature(int_uint)]
+#![feature(int_uint)]
#![feature(core)]
extern crate core;
# If this file is modified, then llvm will be forcibly cleaned and then rebuilt.
# The actual contents of this file do not matter, but to trigger a change on the
# build bots then the contents should be changed so git updates the mtime.
-2015-01-18
+2015-01-30
// corresponding mirrored piece), with, as minimum coordinates, (0,
// 0). If all is false, only generate half of the possibilities (used
// to break the symmetry of the board).
-fn transform(piece: Vec<(int, int)> , all: bool) -> Vec<Vec<(int, int)>> {
- let mut res: Vec<Vec<(int, int)>> =
+fn transform(piece: Vec<(isize, isize)> , all: bool) -> Vec<Vec<(isize, isize)>> {
+ let mut res: Vec<Vec<(isize, isize)>> =
// rotations
iterate(piece, |rot| rot.iter().map(|&(y, x)| (x + y, -y)).collect())
.take(if all {6} else {3})
// Takes a piece with minimum coordinate (0, 0) (as generated by
// transform). Returns the corresponding mask if p translated by (dy,
// dx) is on the board.
-fn mask(dy: int, dx: int, id: uint, p: &Vec<(int, int)>) -> Option<u64> {
+fn mask(dy: isize, dx: isize, id: usize, p: &Vec<(isize, isize)>) -> Option<u64> {
let mut m = 1 << (50 + id);
for &(y, x) in p.iter() {
let x = x + dx + (y + (dy % 2)) / 2;
if x < 0 || x > 4 {return None;}
let y = y + dy;
if y < 0 || y > 9 {return None;}
- m |= 1 << (y * 5 + x) as uint;
+ m |= 1 << (y * 5 + x) as usize;
}
Some(m)
}
// To break the central symmetry of the problem, every
// transformation must be taken except for one piece (piece 3
// here).
- let transforms: Vec<Vec<Vec<(int, int)>>> =
+ let transforms: Vec<Vec<Vec<(isize, isize)>>> =
pieces.into_iter().enumerate()
.map(|(id, p)| transform(p, id != 3))
.collect();
- (0..50).map(|yx| {
+ (0is..50).map(|yx| {
transforms.iter().enumerate().map(|(id, t)| {
t.iter().filter_map(|p| mask(yx / 5, yx % 5, id, p)).collect()
}).collect()
// Gets the identifier of a mask.
fn get_id(m: u64) -> u8 {
for id in 0u8..10 {
- if m & (1 << (id + 50) as uint) != 0 {return id;}
+ if m & (1 << (id + 50) as usize) != 0 {return id;}
}
panic!("{:016x} does not have a valid identifier", m);
}
let mut sol = repeat('.' as u8).take(50).collect::<Vec<_>>();
for &m in raw_sol.iter() {
let id = '0' as u8 + get_id(m);
- for i in 0u..50 {
+ for i in 0us..50 {
if m & 1 << i != 0 {
sol[i] = id;
}
// The data managed during the search
struct Data {
// Number of solution found.
- nb: int,
+ nb: isize,
// Lexicographically minimal solution found.
min: Vec<u8>,
// Lexicographically maximal solution found.
fn search(
masks: &Vec<Vec<Vec<u64>>>,
board: u64,
- mut i: uint,
+ mut i: usize,
cur: List<u64>,
data: &mut Data)
{
let masks_at = &masks[i];
// for every unused piece
- for id in (0u..10).filter(|&id| board & (1 << (id + 50)) == 0) {
+ for id in (0us..10).filter(|&id| board & (1 << (id + 50)) == 0) {
// for each mask that fits on the board
for m in masks_at[id].iter().filter(|&m| board & *m == 0) {
// This check is too costly.
fn take_indirect1(p: indirect1) -> indirect1 { p }
fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
+//~| expected `indirect2<'b>`
+//~| found `indirect2<'a>`
+//~| ERROR mismatched types
+//~| expected `indirect2<'b>`
+//~| found `indirect2<'a>`
fn main() {}
use sub::sub2 as msalias;
use sub::sub2;
-use std::io::stdio::println;
+use std::old_io::stdio::println;
static yy: usize = 25us;
mod sub {
pub mod sub2 {
- use std::io::stdio::println;
+ use std::old_io::stdio::println;
pub mod sub3 {
- use std::io::stdio::println;
+ use std::old_io::stdio::println;
pub fn hello() {
println("hello from module 3");
}
use graphviz::maybe_owned_vec::MaybeOwnedVector;
use std::collections::{HashMap,HashSet};
use std::cell::RefCell;
-use std::io::stdio::println;
+use std::old_io::stdio::println;
use sub::sub2 as msalias;
mod sub {
pub mod sub2 {
- use std::io::stdio::println;
+ use std::old_io::stdio::println;
pub mod sub3 {
- use std::io::stdio::println;
+ use std::old_io::stdio::println;
pub fn hello() {
println("hello from module 3");
}
parse: Box<FnMut(I) -> Result<O, String> + 'a>
}
-impl<'a, I, O: 'a> Parser<'a, I, O> {
+impl<'a, I: 'a, O: 'a> Parser<'a, I, O> {
fn compose<K: 'a>(mut self, mut rhs: Parser<'a, O, K>) -> Parser<'a, I, K> {
Parser {
parse: box move |&mut: x: I| {