mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 22:16:53 +00:00
Test fixes and rebase conflicts
Also some tidying up of a bunch of crate attributes
This commit is contained in:
parent
188d7c0bc3
commit
3a2530d611
@ -9,21 +9,20 @@
|
||||
// except according to those terms.
|
||||
|
||||
#![crate_type = "bin"]
|
||||
#![allow(unknown_features)]
|
||||
#![feature(slicing_syntax, unboxed_closures)]
|
||||
|
||||
#![feature(box_syntax)]
|
||||
#![feature(int_uint)]
|
||||
#![feature(test)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(std_misc)]
|
||||
#![feature(path)]
|
||||
#![feature(io)]
|
||||
#![feature(core)]
|
||||
#![feature(collections)]
|
||||
#![feature(core)]
|
||||
#![feature(int_uint)]
|
||||
#![feature(io)]
|
||||
#![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;
|
||||
|
@ -180,7 +180,7 @@ If you want to match against a slice or array, you can use `&`:
|
||||
fn main() {
|
||||
let v = vec!["match_this", "1"];
|
||||
|
||||
match &v {
|
||||
match &v[] {
|
||||
["match_this", second] => println!("The second element is {}", second),
|
||||
_ => {},
|
||||
}
|
||||
|
@ -8,7 +8,6 @@
|
||||
// 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))]
|
||||
|
||||
|
@ -66,11 +66,10 @@
|
||||
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)]
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#![crate_name = "arena"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
@ -29,16 +28,14 @@
|
||||
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;
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
#![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",
|
||||
@ -23,19 +22,20 @@
|
||||
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)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![allow(unknown_features)] #![feature(int_uint)]
|
||||
#![no_std]
|
||||
#![feature(core)]
|
||||
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
|
||||
|
||||
#![feature(alloc)]
|
||||
#![feature(unicode)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(core)]
|
||||
#![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;
|
||||
|
@ -2204,7 +2204,7 @@ mod tests {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -2214,21 +2214,21 @@ mod tests {
|
||||
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);
|
||||
}
|
||||
|
||||
@ -2669,7 +2669,7 @@ mod tests {
|
||||
#[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 {
|
||||
@ -2690,14 +2690,14 @@ mod tests {
|
||||
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 {
|
||||
@ -2718,7 +2718,7 @@ mod tests {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ impl<T> Vec<T> {
|
||||
/// # 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);
|
||||
|
@ -49,7 +49,6 @@
|
||||
|
||||
#![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",
|
||||
@ -58,15 +57,16 @@
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
|
||||
#![no_std]
|
||||
#![allow(unknown_features, raw_pointer_derive)]
|
||||
#![allow(unknown_features)] #![feature(intrinsics, lang_items)]
|
||||
#![feature(simd, unsafe_destructor, slicing_syntax)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![allow(unknown_features)] #![feature(int_uint)]
|
||||
#![feature(on_unimplemented)]
|
||||
#![allow(raw_pointer_derive)]
|
||||
#![deny(missing_docs)]
|
||||
// NOTE(stage0) remove cfg_attr after a snapshot
|
||||
#![cfg_attr(not(stage0), allow(unused_mut))]
|
||||
#![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)]
|
||||
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
|
@ -1728,11 +1728,11 @@ from_str_radix_int_impl! { u32 }
|
||||
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,
|
||||
@ -1760,11 +1760,11 @@ impl Error for ParseIntError {
|
||||
}
|
||||
|
||||
/// 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,
|
||||
|
@ -148,7 +148,7 @@ impl FromStr for bool {
|
||||
}
|
||||
|
||||
/// 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: () }
|
||||
|
@ -76,12 +76,12 @@ fn test_writer_hasher() {
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ fn test_iterator_len() {
|
||||
|
||||
#[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);
|
||||
@ -336,7 +336,7 @@ fn test_iterator_sum() {
|
||||
|
||||
#[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);
|
||||
@ -730,23 +730,23 @@ fn test_random_access_cycle() {
|
||||
|
||||
#[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);
|
||||
|
@ -8,10 +8,10 @@
|
||||
// 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;
|
||||
|
@ -16,17 +16,17 @@
|
||||
|
||||
#![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;
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#![crate_name = "fmt_macros"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
@ -25,10 +24,10 @@
|
||||
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::*;
|
||||
|
@ -80,7 +80,6 @@
|
||||
#![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"]
|
||||
@ -88,11 +87,13 @@
|
||||
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;
|
||||
|
@ -274,7 +274,7 @@
|
||||
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)]
|
||||
|
@ -15,7 +15,7 @@
|
||||
#![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",
|
||||
|
@ -158,7 +158,6 @@
|
||||
#![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"]
|
||||
@ -166,17 +165,15 @@
|
||||
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;
|
||||
|
@ -22,7 +22,7 @@
|
||||
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)]
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#![crate_name = "rbml"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
@ -25,13 +24,14 @@
|
||||
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;
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#![crate_name = "rustc"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -24,25 +23,25 @@
|
||||
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;
|
||||
|
@ -23,23 +23,23 @@
|
||||
|
||||
#![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;
|
||||
|
@ -9,7 +9,6 @@
|
||||
// except according to those terms.
|
||||
|
||||
#![crate_name = "rustc_bitflags"]
|
||||
#![allow(unknown_features)]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#![crate_name = "rustc_borrowck"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -18,16 +17,16 @@
|
||||
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;
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#![crate_name = "rustc_driver"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -24,19 +23,19 @@
|
||||
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)]
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
#![crate_name = "rustc_llvm"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -23,16 +22,16 @@
|
||||
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(libc)]
|
||||
#![feature(path)]
|
||||
#![feature(std_misc)]
|
||||
#![feature(hash)]
|
||||
#![feature(int_uint)]
|
||||
#![feature(libc)]
|
||||
#![feature(link_args)]
|
||||
#![feature(path)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(std_misc)]
|
||||
|
||||
extern crate libc;
|
||||
#[macro_use] #[no_link] extern crate rustc_bitflags;
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#![crate_name = "rustc_privacy"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -18,11 +17,11 @@
|
||||
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;
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#![crate_name = "rustc_resolve"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -18,15 +17,16 @@
|
||||
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(rustc_private)]
|
||||
#![feature(std_misc)]
|
||||
#![feature(hash)]
|
||||
#![feature(int_uint)]
|
||||
#![feature(rustc_diagnostic_macros)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(slicing_syntax)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(std_misc)]
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
#[macro_use] extern crate syntax;
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#![crate_name = "rustc_trans"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -24,25 +23,25 @@
|
||||
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;
|
||||
|
@ -130,7 +130,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
|
||||
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)
|
||||
};
|
||||
@ -169,7 +169,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
|
||||
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)
|
||||
@ -339,7 +339,6 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
|
||||
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,
|
||||
@ -1149,20 +1148,20 @@ impl<'l, 'tcx, 'v> Visitor<'v> for DxrVisitor<'l, 'tcx> {
|
||||
}
|
||||
}
|
||||
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[],
|
||||
|
@ -1865,7 +1865,7 @@ pub enum LvaluePreference {
|
||||
}
|
||||
|
||||
/// 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`).
|
||||
|
@ -65,7 +65,6 @@ This API is completely unstable and subject to change.
|
||||
|
||||
#![crate_name = "rustc_typeck"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -73,19 +72,19 @@ This API is completely unstable and subject to change.
|
||||
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;
|
||||
|
@ -420,7 +420,7 @@ impl LangString {
|
||||
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())
|
||||
);
|
||||
|
||||
|
@ -1942,7 +1942,7 @@ fn item_enum(w: &mut fmt::Formatter, it: &clean::Item,
|
||||
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,
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#![crate_name = "rustdoc"]
|
||||
#![unstable(feature = "rustdoc")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -18,22 +17,22 @@
|
||||
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;
|
||||
|
@ -17,7 +17,6 @@ Core encoding and decoding interfaces.
|
||||
#![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"]
|
||||
@ -25,16 +24,16 @@ Core encoding and decoding interfaces.
|
||||
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))]
|
||||
|
@ -97,7 +97,6 @@
|
||||
|
||||
#![crate_name = "std"]
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
@ -106,30 +105,29 @@
|
||||
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(collections)]
|
||||
#![feature(core)]
|
||||
#![feature(hash)]
|
||||
#![feature(int_uint)]
|
||||
#![feature(lang_items, unsafe_destructor)]
|
||||
#![feature(libc)]
|
||||
#![feature(linkage, thread_local, asm)]
|
||||
#![feature(old_impl_check)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(int_uint)]
|
||||
#![feature(core)]
|
||||
#![feature(libc)]
|
||||
#![feature(alloc)]
|
||||
#![feature(unicode)]
|
||||
#![feature(collections)]
|
||||
#![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]
|
||||
|
@ -1101,10 +1101,10 @@ mod test {
|
||||
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));
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ impl FromStr for SocketAddr {
|
||||
}
|
||||
}
|
||||
|
||||
#[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.
|
||||
|
@ -1160,7 +1160,7 @@ mod test {
|
||||
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 => {}
|
||||
@ -1260,7 +1260,7 @@ mod test {
|
||||
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,
|
||||
@ -1318,7 +1318,7 @@ mod test {
|
||||
|
||||
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,
|
||||
|
@ -97,7 +97,7 @@ impl FromStr for Path {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
|
@ -126,7 +126,7 @@ impl FromStr 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 {
|
||||
|
@ -160,7 +160,7 @@ pub fn panicking() -> bool {
|
||||
// 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()");
|
||||
|
||||
@ -238,7 +238,7 @@ pub mod eabi {
|
||||
|
||||
#[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,
|
||||
|
@ -110,7 +110,7 @@ static KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[
|
||||
("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
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#![crate_name = "syntax"]
|
||||
#![unstable(feature = "rustc_private")]
|
||||
#![feature(staged_api)]
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
@ -24,23 +23,23 @@
|
||||
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;
|
||||
|
@ -41,7 +41,6 @@
|
||||
#![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"]
|
||||
@ -49,18 +48,18 @@
|
||||
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)]
|
||||
#![feature(box_syntax)]
|
||||
#![allow(unknown_features)] #![feature(int_uint)]
|
||||
#![deny(missing_docs)]
|
||||
|
||||
#![feature(box_syntax)]
|
||||
#![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)]
|
||||
|
||||
|
@ -25,27 +25,27 @@
|
||||
|
||||
#![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;
|
||||
|
@ -31,7 +31,7 @@
|
||||
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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# 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
|
||||
|
@ -104,8 +104,8 @@ impl<'a, T> Iterator for ListIterator<'a, T> {
|
||||
// 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})
|
||||
@ -133,14 +133,14 @@ fn transform(piece: Vec<(int, int)> , all: bool) -> Vec<Vec<(int, int)>> {
|
||||
// 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)
|
||||
}
|
||||
@ -164,12 +164,12 @@ fn make_masks() -> Vec<Vec<Vec<u64> > > {
|
||||
// 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()
|
||||
@ -212,7 +212,7 @@ fn filter_masks(masks: &mut Vec<Vec<Vec<u64>>>) {
|
||||
// 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);
|
||||
}
|
||||
@ -222,7 +222,7 @@ fn to_vec(raw_sol: &List<u64>) -> Vec<u8> {
|
||||
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;
|
||||
}
|
||||
@ -244,7 +244,7 @@ fn print_sol(sol: &Vec<u8>) {
|
||||
// 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.
|
||||
@ -286,7 +286,7 @@ fn handle_sol(raw_sol: &List<u64>, data: &mut Data) {
|
||||
fn search(
|
||||
masks: &Vec<Vec<Vec<u64>>>,
|
||||
board: u64,
|
||||
mut i: uint,
|
||||
mut i: usize,
|
||||
cur: List<u64>,
|
||||
data: &mut Data)
|
||||
{
|
||||
@ -297,7 +297,7 @@ fn search(
|
||||
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.
|
||||
|
@ -27,5 +27,10 @@ fn take_direct<'a,'b>(p: direct<'a>) -> direct<'b> { p } //~ ERROR mismatched ty
|
||||
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() {}
|
||||
|
@ -12,15 +12,15 @@
|
||||
|
||||
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");
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ extern crate "flate" as myflate;
|
||||
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;
|
||||
@ -62,9 +62,9 @@ fn test_tup_struct(x: TupStruct) -> int {
|
||||
|
||||
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");
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ struct Parser<'a, I, O> {
|
||||
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| {
|
||||
|
Loading…
Reference in New Issue
Block a user