mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
Test fixes and rebase conflicts
This commit is contained in:
@@ -489,15 +489,15 @@ fn append_arg(cmd: &mut String, arg: &str) {
|
||||
}
|
||||
let argvec: Vec<char> = arg.chars().collect();
|
||||
for i in range(0u, argvec.len()) {
|
||||
append_char_at(cmd, &argvec, i);
|
||||
append_char_at(cmd, argvec.as_slice(), i);
|
||||
}
|
||||
if quote {
|
||||
cmd.push('"');
|
||||
}
|
||||
}
|
||||
|
||||
fn append_char_at(cmd: &mut String, arg: &Vec<char>, i: uint) {
|
||||
match *arg.get(i) {
|
||||
fn append_char_at(cmd: &mut String, arg: &[char], i: uint) {
|
||||
match arg[i] {
|
||||
'"' => {
|
||||
// Escape quotes.
|
||||
cmd.push_str("\\\"");
|
||||
@@ -517,11 +517,11 @@ fn append_char_at(cmd: &mut String, arg: &Vec<char>, i: uint) {
|
||||
}
|
||||
}
|
||||
|
||||
fn backslash_run_ends_in_quote(s: &Vec<char>, mut i: uint) -> bool {
|
||||
while i < s.len() && *s.get(i) == '\\' {
|
||||
fn backslash_run_ends_in_quote(s: &[char], mut i: uint) -> bool {
|
||||
while i < s.len() && s[i] == '\\' {
|
||||
i += 1;
|
||||
}
|
||||
return i < s.len() && *s.get(i) == '"';
|
||||
return i < s.len() && s[i] == '"';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@ fn spawn_children() {
|
||||
#[test]
|
||||
fn spawn_inherits() {
|
||||
let (tx, rx) = channel();
|
||||
spawn(proc() {
|
||||
TaskBuilder::new().spawner(NativeSpawner).spawn(proc() {
|
||||
spawn(proc() {
|
||||
let mut task: Box<Task> = Local::take();
|
||||
match task.maybe_take_runtime::<Ops>() {
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
|
||||
fn main() {
|
||||
let v: Vec<int> = vec!(1, 2, 3);
|
||||
v[1] = 4; //~ ERROR cannot assign
|
||||
v[1] = 4; //~ ERROR cannot borrow immutable local variable `v` as mutable
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use std::task;
|
||||
use std::sync::atomics::{AtomicUint, INIT_ATOMIC_UINT, Relaxed};
|
||||
use std::sync::atomic::{AtomicUint, INIT_ATOMIC_UINT, Relaxed};
|
||||
use std::rand::{task_rng, Rng, Rand};
|
||||
|
||||
const REPEATS: uint = 5;
|
||||
|
||||
Reference in New Issue
Block a user