Skip to content

Commit 687c25b

Browse files
committed
test: Fix tests.
1 parent 0f9a43d commit 687c25b

Some content is hidden

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

60 files changed

+102
-98
lines changed

src/test/auxiliary/cci_class_6.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub mod kitties {
2323
fn meow_count(&mut self) -> uint { self.meows }
2424
}
2525

26-
pub fn cat<U>(in_x : uint, in_y : int, +in_info: ~[U]) -> cat<U> {
26+
pub fn cat<U>(in_x : uint, in_y : int, in_info: ~[U]) -> cat<U> {
2727
cat {
2828
meows: in_x,
2929
how_hungry: in_y,

src/test/compile-fail/block-coerce-no.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
// other tycons.
1313

1414
fn coerce(b: &fn()) -> extern fn() {
15-
fn lol(+f: extern fn(+v: &fn()) -> extern fn(),
16-
+g: &fn()) -> extern fn() { return f(g); }
17-
fn fn_id(+f: extern fn()) -> extern fn() { return f }
15+
fn lol(f: extern fn(+v: &fn()) -> extern fn(),
16+
g: &fn()) -> extern fn() { return f(g); }
17+
fn fn_id(f: extern fn()) -> extern fn() { return f }
1818
return lol(fn_id, b);
1919
//~^ ERROR mismatched types
2020
}

src/test/compile-fail/borrowck-pat-enum.rs

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

11-
fn match_ref(&&v: Option<int>) -> int {
11+
fn match_ref(v: Option<int>) -> int {
1212
match v {
1313
Some(ref i) => {
1414
*i
@@ -17,7 +17,7 @@ fn match_ref(&&v: Option<int>) -> int {
1717
}
1818
}
1919

20-
fn match_ref_unused(&&v: Option<int>) {
20+
fn match_ref_unused(v: Option<int>) {
2121
match v {
2222
Some(_) => {}
2323
None => {}

src/test/compile-fail/borrowck-unary-move.rs

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

11-
fn foo(+x: ~int) -> int {
11+
fn foo(x: ~int) -> int {
1212
let y = &*x;
1313
free(x); //~ ERROR cannot move out of `*x` because it is borrowed
1414
*y
1515
}
1616

17-
fn free(+_x: ~int) {
17+
fn free(_x: ~int) {
1818
}
1919

2020
fn main() {

src/test/compile-fail/disallowed-deconstructing-destructing-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl Drop for X {
1818
}
1919
}
2020

21-
fn unwrap(+x: X) -> ~str {
21+
fn unwrap(x: X) -> ~str {
2222
let X { x: y } = x; //~ ERROR deconstructing struct not allowed in pattern
2323
y
2424
}

src/test/compile-fail/issue-2766-a.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ pub mod stream {
1515
use core::pipes;
1616

1717
pub impl<T:Owned> Stream<T> {
18-
pub fn recv() -> extern fn(+v: Stream<T>) -> ::stream::Stream<T> {
18+
pub fn recv() -> extern fn(v: Stream<T>) -> ::stream::Stream<T> {
1919
// resolve really should report just one error here.
2020
// Change the test case when it changes.
21-
pub fn recv(+pipe: Stream<T>) -> ::stream::Stream<T> { //~ ERROR attempt to use a type argument out of scope
21+
pub fn recv(pipe: Stream<T>) -> ::stream::Stream<T> { //~ ERROR attempt to use a type argument out of scope
2222
//~^ ERROR use of undeclared type name
2323
//~^^ ERROR attempt to use a type argument out of scope
2424
//~^^^ ERROR use of undeclared type name

src/test/compile-fail/issue-3296.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct Foo {
1818
a: ()
1919
}
2020

21-
fn deserialize_foo<__D: std::serialization::deserializer>(&&__d: __D) {
21+
fn deserialize_foo<__D: std::serialization::deserializer>(__d: __D) {
2222
}
2323

2424
fn main() { let des = Deserializer(); let foo = deserialize_foo(des); }

src/test/compile-fail/liveness-use-after-send.rs

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

11-
fn send<T:Owned>(ch: _chan<T>, +data: T) {
11+
fn send<T:Owned>(ch: _chan<T>, data: T) {
1212
debug!(ch);
1313
debug!(data);
1414
fail!();

src/test/compile-fail/mutable-huh-ptr-assign.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
extern mod std;
1212

1313
fn main() {
14-
unsafe fn f(&&v: *const int) {
14+
unsafe fn f(v: *const int) {
1515
*v = 1 //~ ERROR cannot assign
1616
}
1717

0 commit comments

Comments
 (0)