Skip to content

Commit 3a2530d

Browse files
committed
Test fixes and rebase conflicts
Also some tidying up of a bunch of crate attributes
1 parent 188d7c0 commit 3a2530d

File tree

56 files changed

+220
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+220
-239
lines changed

src/compiletest/compiletest.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,20 @@
99
// except according to those terms.
1010

1111
#![crate_type = "bin"]
12-
#![allow(unknown_features)]
13-
#![feature(slicing_syntax, unboxed_closures)]
12+
1413
#![feature(box_syntax)]
14+
#![feature(collections)]
15+
#![feature(core)]
1516
#![feature(int_uint)]
16-
#![feature(test)]
17-
#![feature(rustc_private)]
18-
#![feature(std_misc)]
19-
#![feature(path)]
2017
#![feature(io)]
21-
#![feature(core)]
22-
#![feature(collections)]
2318
#![feature(os)]
19+
#![feature(path)]
20+
#![feature(rustc_private)]
21+
#![feature(slicing_syntax, unboxed_closures)]
22+
#![feature(std_misc)]
23+
#![feature(test)]
2424
#![feature(unicode)]
2525

26-
#![allow(unstable)]
2726
#![deny(warnings)]
2827

2928
extern crate test;

src/doc/trpl/patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ If you want to match against a slice or array, you can use `&`:
180180
fn main() {
181181
let v = vec!["match_this", "1"];
182182
183-
match &v {
183+
match &v[] {
184184
["match_this", second] => println!("The second element is {}", second),
185185
_ => {},
186186
}

src/driver/driver.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(unknown_features)]
1211
#![cfg_attr(rustc, feature(rustc_private))]
1312
#![cfg_attr(rustdoc, feature(rustdoc))]
1413

src/liballoc/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@
6666
html_root_url = "http://doc.rust-lang.org/nightly/")]
6767

6868
#![no_std]
69-
#![allow(unknown_features)]
7069
#![feature(lang_items, unsafe_destructor)]
7170
#![feature(box_syntax)]
7271
#![feature(optin_builtin_traits)]
73-
#![allow(unknown_features)] #![feature(int_uint)]
72+
#![feature(int_uint)]
7473
#![feature(core)]
7574
#![feature(hash)]
7675
#![feature(libc)]

src/libarena/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,21 @@
2121
2222
#![crate_name = "arena"]
2323
#![unstable(feature = "rustc_private")]
24-
#![feature(staged_api)]
2524
#![staged_api]
2625
#![crate_type = "rlib"]
2726
#![crate_type = "dylib"]
2827
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
2928
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
3029
html_root_url = "http://doc.rust-lang.org/nightly/")]
3130

32-
#![allow(unknown_features)]
33-
#![feature(unsafe_destructor)]
34-
#![feature(unboxed_closures)]
35-
#![feature(box_syntax)]
36-
#![allow(unknown_features)] #![feature(int_uint)]
37-
#![allow(missing_docs)]
3831
#![feature(alloc)]
32+
#![feature(box_syntax)]
3933
#![feature(core)]
34+
#![feature(int_uint)]
35+
#![feature(staged_api)]
36+
#![feature(unboxed_closures)]
37+
#![feature(unsafe_destructor)]
4038
#![cfg_attr(test, feature(test))]
41-
#![cfg_attr(test, feature(collections))]
4239

4340
extern crate alloc;
4441

src/libcollections/lib.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@
1515

1616
#![crate_name = "collections"]
1717
#![unstable(feature = "collections")]
18-
#![feature(staged_api)]
1918
#![staged_api]
2019
#![crate_type = "rlib"]
2120
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
2221
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
2322
html_root_url = "http://doc.rust-lang.org/nightly/",
2423
html_playground_url = "http://play.rust-lang.org/")]
2524

26-
#![allow(unknown_features)]
27-
#![feature(unsafe_destructor, slicing_syntax)]
25+
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
26+
27+
#![feature(alloc)]
2828
#![feature(box_syntax)]
29-
#![feature(unboxed_closures)]
30-
#![allow(unknown_features)] #![feature(int_uint)]
31-
#![no_std]
3229
#![feature(core)]
33-
#![feature(alloc)]
34-
#![feature(unicode)]
3530
#![feature(hash)]
31+
#![feature(int_uint)]
32+
#![feature(staged_api)]
33+
#![feature(unboxed_closures)]
34+
#![feature(unicode)]
35+
#![feature(unsafe_destructor, slicing_syntax)]
3636
#![cfg_attr(test, feature(test))]
37-
// NOTE(stage0): remove after a snapshot
38-
#![cfg_attr(not(stage0), allow(unused_mut))]
37+
38+
#![no_std]
3939

4040
#[macro_use]
4141
extern crate core;

src/libcollections/ring_buf.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,7 @@ mod tests {
22042204
d.push_back(i);
22052205
}
22062206

2207-
assert_eq!(d.drain().collect::<Vec<i32>>(), [0, 1, 2, 3, 4]);
2207+
assert_eq!(d.drain().collect::<Vec<_>>(), [0, 1, 2, 3, 4]);
22082208
assert!(d.is_empty());
22092209
}
22102210

@@ -2214,21 +2214,21 @@ mod tests {
22142214
for i in 0..5 {
22152215
d.push_back(i);
22162216
}
2217-
for i in 6i..9 {
2217+
for i in 6..9 {
22182218
d.push_front(i);
22192219
}
22202220

2221-
assert_eq!(d.drain().collect::<Vec<i32>>(), [8,7,6,0,1,2,3,4]);
2221+
assert_eq!(d.drain().collect::<Vec<_>>(), [8,7,6,0,1,2,3,4]);
22222222
assert!(d.is_empty());
22232223
}
22242224

22252225
// partially used
22262226
{
2227-
let mut d = RingBuf::new();
2227+
let mut d: RingBuf<i32> = RingBuf::new();
22282228
for i in 0..5 {
22292229
d.push_back(i);
22302230
}
2231-
for i in 6i..9 {
2231+
for i in 6..9 {
22322232
d.push_front(i);
22332233
}
22342234

@@ -2669,7 +2669,7 @@ mod tests {
26692669
#[test]
26702670
fn test_as_slices() {
26712671
let mut ring: RingBuf<i32> = RingBuf::with_capacity(127);
2672-
let cap = ring.capacity() as int;
2672+
let cap = ring.capacity() as i32;
26732673
let first = cap/2;
26742674
let last = cap - first;
26752675
for i in 0..first {
@@ -2690,14 +2690,14 @@ mod tests {
26902690
assert_eq!(right, expected_right);
26912691
}
26922692

2693-
assert_eq!(ring.len() as int, cap);
2694-
assert_eq!(ring.capacity() as int, cap);
2693+
assert_eq!(ring.len() as i32, cap);
2694+
assert_eq!(ring.capacity() as i32, cap);
26952695
}
26962696

26972697
#[test]
26982698
fn test_as_mut_slices() {
26992699
let mut ring: RingBuf<i32> = RingBuf::with_capacity(127);
2700-
let cap = ring.capacity() as int;
2700+
let cap = ring.capacity() as i32;
27012701
let first = cap/2;
27022702
let last = cap - first;
27032703
for i in 0..first {
@@ -2718,7 +2718,7 @@ mod tests {
27182718
assert_eq!(right, expected_right);
27192719
}
27202720

2721-
assert_eq!(ring.len() as int, cap);
2722-
assert_eq!(ring.capacity() as int, cap);
2721+
assert_eq!(ring.len() as i32, cap);
2722+
assert_eq!(ring.capacity() as i32, cap);
27232723
}
27242724
}

src/libcollections/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl<T> Vec<T> {
181181
/// # Examples
182182
///
183183
/// ```
184-
/// let mut vec: Vec<int> = Vec::with_capacity(10);
184+
/// let mut vec: Vec<_> = Vec::with_capacity(10);
185185
///
186186
/// // The vector contains no items, even though it has capacity for more
187187
/// assert_eq!(vec.len(), 0);

src/libcore/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949

5050
#![crate_name = "core"]
5151
#![unstable(feature = "core")]
52-
#![feature(staged_api)]
5352
#![staged_api]
5453
#![crate_type = "rlib"]
5554
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -58,15 +57,16 @@
5857
html_playground_url = "http://play.rust-lang.org/")]
5958

6059
#![no_std]
61-
#![allow(unknown_features, raw_pointer_derive)]
62-
#![allow(unknown_features)] #![feature(intrinsics, lang_items)]
60+
#![allow(raw_pointer_derive)]
61+
#![deny(missing_docs)]
62+
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
63+
64+
#![feature(int_uint)]
65+
#![feature(intrinsics, lang_items)]
66+
#![feature(on_unimplemented)]
6367
#![feature(simd, unsafe_destructor, slicing_syntax)]
68+
#![feature(staged_api)]
6469
#![feature(unboxed_closures)]
65-
#![allow(unknown_features)] #![feature(int_uint)]
66-
#![feature(on_unimplemented)]
67-
#![deny(missing_docs)]
68-
// NOTE(stage0) remove cfg_attr after a snapshot
69-
#![cfg_attr(not(stage0), allow(unused_mut))]
7070

7171
#[macro_use]
7272
mod macros;

src/libcore/num/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,11 +1728,11 @@ from_str_radix_int_impl! { u32 }
17281728
from_str_radix_int_impl! { u64 }
17291729

17301730
/// An error which can be returned when parsing an integer.
1731-
#[derive(Show, Clone, PartialEq)]
1731+
#[derive(Debug, Clone, PartialEq)]
17321732
#[stable(feature = "rust1", since = "1.0.0")]
17331733
pub struct ParseIntError { kind: IntErrorKind }
17341734

1735-
#[derive(Show, Clone, PartialEq)]
1735+
#[derive(Debug, Clone, PartialEq)]
17361736
enum IntErrorKind {
17371737
Empty,
17381738
InvalidDigit,
@@ -1760,11 +1760,11 @@ impl Error for ParseIntError {
17601760
}
17611761

17621762
/// An error which can be returned when parsing a float.
1763-
#[derive(Show, Clone, PartialEq)]
1763+
#[derive(Debug, Clone, PartialEq)]
17641764
#[stable(feature = "rust1", since = "1.0.0")]
17651765
pub struct ParseFloatError { kind: FloatErrorKind }
17661766

1767-
#[derive(Show, Clone, PartialEq)]
1767+
#[derive(Debug, Clone, PartialEq)]
17681768
enum FloatErrorKind {
17691769
Empty,
17701770
Invalid,

0 commit comments

Comments
 (0)