Skip to content

Commit 595b05f

Browse files
committed
---
yaml --- r: 186223 b: refs/heads/try c: ac134f7 h: refs/heads/master i: 186221: c1c3eb3 186219: 918187f 186215: 1d9a0a0 186207: a2c64e1 v: v3
1 parent f17b0fa commit 595b05f

File tree

149 files changed

+6272
-742
lines changed

Some content is hidden

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

149 files changed

+6272
-742
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: d244f099116ce7628ed00f74bc2466de72268cf6
5+
refs/heads/try: ac134f7ca435551964996ee88319241cd3c7c110
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/compiletest/header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
300300
.collect();
301301

302302
match strs.len() {
303-
1u => (strs.pop().unwrap(), "".to_string()),
304-
2u => {
303+
1 => (strs.pop().unwrap(), "".to_string()),
304+
2 => {
305305
let end = strs.pop().unwrap();
306306
(strs.pop().unwrap(), end)
307307
}

branches/try/src/compiletest/runtest.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
230230
let s = File::open(&filepath).read_to_end().unwrap();
231231
String::from_utf8(s).unwrap()
232232
}
233-
None => { srcs[srcs.len() - 2u].clone() }
233+
None => { srcs[srcs.len() - 2].clone() }
234234
};
235-
let mut actual = srcs[srcs.len() - 1u].clone();
235+
let mut actual = srcs[srcs.len() - 1].clone();
236236

237237
if props.pp_exact.is_some() {
238238
// Now we have to care about line endings
@@ -842,7 +842,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
842842
}).collect();
843843
// check if each line in props.check_lines appears in the
844844
// output (in order)
845-
let mut i = 0u;
845+
let mut i = 0;
846846
for line in debugger_run_result.stdout.lines() {
847847
let mut rest = line.trim();
848848
let mut first = true;
@@ -869,7 +869,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
869869
first = false;
870870
}
871871
if !failed && rest.len() == 0 {
872-
i += 1u;
872+
i += 1;
873873
}
874874
if i == num_check_lines {
875875
// all lines checked
@@ -892,13 +892,13 @@ fn check_error_patterns(props: &TestProps,
892892
fatal(format!("no error pattern specified in {:?}",
893893
testfile.display()).as_slice());
894894
}
895-
let mut next_err_idx = 0u;
895+
let mut next_err_idx = 0;
896896
let mut next_err_pat = &props.error_patterns[next_err_idx];
897897
let mut done = false;
898898
for line in output_to_check.lines() {
899899
if line.contains(next_err_pat.as_slice()) {
900900
debug!("found error pattern {}", next_err_pat);
901-
next_err_idx += 1u;
901+
next_err_idx += 1;
902902
if next_err_idx == props.error_patterns.len() {
903903
debug!("found all error patterns");
904904
done = true;
@@ -910,7 +910,7 @@ fn check_error_patterns(props: &TestProps,
910910
if done { return; }
911911

912912
let missing_patterns = &props.error_patterns[next_err_idx..];
913-
if missing_patterns.len() == 1u {
913+
if missing_patterns.len() == 1 {
914914
fatal_proc_rec(format!("error pattern '{}' not found!",
915915
missing_patterns[0]).as_slice(),
916916
proc_res);
@@ -1025,7 +1025,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
10251025
}
10261026

10271027
fn is_compiler_error_or_warning(line: &str) -> bool {
1028-
let mut i = 0u;
1028+
let mut i = 0;
10291029
return
10301030
scan_until_char(line, ':', &mut i) &&
10311031
scan_char(line, ':', &mut i) &&
@@ -1084,7 +1084,7 @@ fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
10841084

10851085
fn scan_string(haystack: &str, needle: &str, idx: &mut uint) -> bool {
10861086
let mut haystack_i = *idx;
1087-
let mut needle_i = 0u;
1087+
let mut needle_i = 0;
10881088
while needle_i < needle.len() {
10891089
if haystack_i >= haystack.len() {
10901090
return false;

branches/try/src/doc/reference.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,6 +2432,8 @@ The currently implemented features of the reference compiler are:
24322432
* `simd` - Allows use of the `#[simd]` attribute, which is overly simple and
24332433
not the SIMD interface we want to expose in the long term.
24342434

2435+
* `staged_api` - Allows usage of stability markers and `#![staged_api]` in a crate
2436+
24352437
* `struct_inherit` - Allows using struct inheritance, which is barely
24362438
implemented and will probably be removed. Don't use this.
24372439

@@ -2459,6 +2461,11 @@ The currently implemented features of the reference compiler are:
24592461
which is considered wildly unsafe and will be
24602462
obsoleted by language improvements.
24612463

2464+
* `unmarked_api` - Allows use of items within a `#![staged_api]` crate
2465+
which have not been marked with a stability marker.
2466+
Such items should not be allowed by the compiler to exist,
2467+
so if you need this there probably is a compiler bug.
2468+
24622469
* `associated_types` - Allows type aliases in traits. Experimental.
24632470

24642471
If a feature is promoted to a language feature, then all existing programs will

branches/try/src/etc/generate-deriving-span-tests.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ def write_file(name, string):
114114
'Encodable': (0, [], 0), # FIXME: quoting gives horrible spans
115115
}
116116

117-
for (trait, supers, errs) in [('Rand', [], 1),
118-
('Clone', [], 1),
117+
for (trait, supers, errs) in [('Clone', [], 1),
119118
('PartialEq', [], 2),
120119
('PartialOrd', ['PartialEq'], 8),
121120
('Eq', ['PartialEq'], 1),

branches/try/src/liballoc/boxed.rs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,18 @@
4545
4646
#![stable(feature = "rust1", since = "1.0.0")]
4747

48+
use core::prelude::*;
49+
4850
use core::any::Any;
49-
use core::clone::Clone;
50-
use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
51+
use core::cmp::Ordering;
5152
use core::default::Default;
5253
use core::error::{Error, FromError};
5354
use core::fmt;
5455
use core::hash::{self, Hash};
55-
use core::iter::Iterator;
56-
use core::marker::Sized;
5756
use core::mem;
5857
use core::ops::{Deref, DerefMut};
59-
use core::option::Option;
6058
use core::ptr::Unique;
6159
use core::raw::TraitObject;
62-
use core::result::Result::{Ok, Err};
63-
use core::result::Result;
6460

6561
/// A value that represents the heap. This is the default place that the `box` keyword allocates
6662
/// into when no place is supplied.
@@ -296,18 +292,20 @@ impl<T: ?Sized> DerefMut for Box<T> {
296292
fn deref_mut(&mut self) -> &mut T { &mut **self }
297293
}
298294

299-
impl<'a, T> Iterator for Box<Iterator<Item=T> + 'a> {
300-
type Item = T;
301-
302-
fn next(&mut self) -> Option<T> {
303-
(**self).next()
304-
}
305-
306-
fn size_hint(&self) -> (usize, Option<usize>) {
307-
(**self).size_hint()
308-
}
295+
#[stable(feature = "rust1", since = "1.0.0")]
296+
impl<I: Iterator + ?Sized> Iterator for Box<I> {
297+
type Item = I::Item;
298+
fn next(&mut self) -> Option<I::Item> { (**self).next() }
299+
fn size_hint(&self) -> (usize, Option<usize>) { (**self).size_hint() }
300+
}
301+
#[stable(feature = "rust1", since = "1.0.0")]
302+
impl<I: DoubleEndedIterator + ?Sized> DoubleEndedIterator for Box<I> {
303+
fn next_back(&mut self) -> Option<I::Item> { (**self).next_back() }
309304
}
305+
#[stable(feature = "rust1", since = "1.0.0")]
306+
impl<I: ExactSizeIterator + ?Sized> ExactSizeIterator for Box<I> {}
310307

308+
#[stable(feature = "rust1", since = "1.0.0")]
311309
impl<'a, E: Error + 'a> FromError<E> for Box<Error + 'a> {
312310
fn from_error(err: E) -> Box<Error + 'a> {
313311
Box::new(err)

branches/try/src/libarena/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub struct Arena {
101101
impl Arena {
102102
/// Allocates a new Arena with 32 bytes preallocated.
103103
pub fn new() -> Arena {
104-
Arena::new_with_size(32u)
104+
Arena::new_with_size(32)
105105
}
106106

107107
/// Allocates a new Arena with `initial_size` bytes preallocated.
@@ -117,7 +117,7 @@ impl Arena {
117117
fn chunk(size: uint, is_copy: bool) -> Chunk {
118118
Chunk {
119119
data: Rc::new(RefCell::new(Vec::with_capacity(size))),
120-
fill: Cell::new(0u),
120+
fill: Cell::new(0),
121121
is_copy: Cell::new(is_copy),
122122
}
123123
}
@@ -193,7 +193,7 @@ impl Arena {
193193
self.chunks.borrow_mut().push(self.copy_head.borrow().clone());
194194

195195
*self.copy_head.borrow_mut() =
196-
chunk((new_min_chunk_size + 1u).next_power_of_two(), true);
196+
chunk((new_min_chunk_size + 1).next_power_of_two(), true);
197197

198198
return self.alloc_copy_inner(n_bytes, align);
199199
}
@@ -234,7 +234,7 @@ impl Arena {
234234
self.chunks.borrow_mut().push(self.head.borrow().clone());
235235

236236
*self.head.borrow_mut() =
237-
chunk((new_min_chunk_size + 1u).next_power_of_two(), false);
237+
chunk((new_min_chunk_size + 1).next_power_of_two(), false);
238238

239239
return self.alloc_noncopy_inner(n_bytes, align);
240240
}
@@ -308,7 +308,7 @@ impl Arena {
308308
#[test]
309309
fn test_arena_destructors() {
310310
let arena = Arena::new();
311-
for i in 0u..10 {
311+
for i in 0..10 {
312312
// Arena allocate something with drop glue to make sure it
313313
// doesn't leak.
314314
arena.alloc(|| Rc::new(i));
@@ -337,7 +337,7 @@ fn test_arena_alloc_nested() {
337337
fn test_arena_destructors_fail() {
338338
let arena = Arena::new();
339339
// Put some stuff in the arena.
340-
for i in 0u..10 {
340+
for i in 0..10 {
341341
// Arena allocate something with drop glue to make sure it
342342
// doesn't leak.
343343
arena.alloc(|| { Rc::new(i) });
@@ -527,7 +527,7 @@ mod tests {
527527
#[test]
528528
pub fn test_copy() {
529529
let arena = TypedArena::new();
530-
for _ in 0u..100000 {
530+
for _ in 0..100000 {
531531
arena.alloc(Point {
532532
x: 1,
533533
y: 2,
@@ -582,7 +582,7 @@ mod tests {
582582
#[test]
583583
pub fn test_noncopy() {
584584
let arena = TypedArena::new();
585-
for _ in 0u..100000 {
585+
for _ in 0..100000 {
586586
arena.alloc(Noncopy {
587587
string: "hello world".to_string(),
588588
array: vec!( 1, 2, 3, 4, 5 ),

branches/try/src/libcollections/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#![feature(unicode)]
3333
#![feature(unsafe_destructor, slicing_syntax)]
3434
#![cfg_attr(test, feature(test))]
35+
#![cfg_attr(test, allow(deprecated))] // rand
3536

3637
#![no_std]
3738

0 commit comments

Comments
 (0)