Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 67d1388

Browse files
committedDec 31, 2014
rollup merge of #20061: aturon/stab-2-vec-slice
Conflicts: src/libcollections/slice.rs src/libcollections/vec.rs src/libstd/sys/windows/os.rs
2 parents dd0f29a + 6abfac0 commit 67d1388

Some content is hidden

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

80 files changed

+2627
-2626
lines changed
 

‎src/compiletest/runtest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ use std::io::process;
3232
use std::io::timer;
3333
use std::io;
3434
use std::os;
35+
use std::iter::repeat;
3536
use std::str;
3637
use std::string::String;
3738
use std::thread::Thread;
@@ -947,8 +948,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
947948
proc_res: &ProcRes) {
948949

949950
// true if we found the error in question
950-
let mut found_flags = Vec::from_elem(
951-
expected_errors.len(), false);
951+
let mut found_flags: Vec<_> = repeat(false).take(expected_errors.len()).collect();
952952

953953
if proc_res.status.success() {
954954
fatal("process did not return an error status");
@@ -1308,7 +1308,7 @@ fn make_run_args(config: &Config, props: &TestProps, testfile: &Path) ->
13081308
// Add the arguments in the run_flags directive
13091309
args.extend(split_maybe_args(&props.run_flags).into_iter());
13101310

1311-
let prog = args.remove(0).unwrap();
1311+
let prog = args.remove(0);
13121312
return ProcArgs {
13131313
prog: prog,
13141314
args: args,

‎src/liballoc/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ use heap::deallocate;
9696
/// use std::thread::Thread;
9797
///
9898
/// fn main() {
99-
/// let numbers = Vec::from_fn(100, |i| i as f32);
99+
/// let numbers: Vec<_> = range(0, 100u32).map(|i| i as f32).collect();
100100
/// let shared_numbers = Arc::new(numbers);
101101
///
102102
/// for _ in range(0u, 10) {

0 commit comments

Comments
 (0)
Please sign in to comment.