Fix dvec-related fallout in tests

This commit is contained in:
Alex Crichton 2013-03-07 23:44:38 -05:00
parent 59de3853be
commit 62651df2b4
8 changed files with 17 additions and 53 deletions

View file

@ -11,7 +11,7 @@
fn foo() -> int { 22 }
pub fn main() {
let x: ~[@fn() -> int] = ~[];
let mut x: ~[@fn() -> int] = ~[];
x.push(foo);
fail_unless!((x[0])() == 22);
}

View file

@ -15,12 +15,11 @@ extern mod req;
extern mod std;
use req::*;
use std::oldmap::*;
use std::oldmap::HashMap;
pub fn main() {
let v = ~[@~"hi"];
let m: req::header_map = HashMap();
m.insert(~"METHOD", @mut ~[v]);
m.insert(~"METHOD", @mut v);
request::<int>(m);
}

Binary file not shown.

View file

@ -1,27 +0,0 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn foo(self: &A) -> int {
if true {
fail!()
} else {
*bar(self.bar)
}
}
pub fn main() {}
fn bar(_: &r/mut int) -> &r/int {
fail!()
}
struct A {
bar: @mut int,
}