test: Fix failing tests. r=rustbot

This commit is contained in:
Patrick Walton 2012-10-18 12:08:52 -07:00
parent 141ef23aa7
commit fa38c12901
4 changed files with 8 additions and 8 deletions

View File

@ -1,13 +1,13 @@
mod stream {
#[legacy_exports];
enum stream<T: Send> { send(T, server::stream<T>), }
enum Stream<T: Send> { send(T, server::Stream<T>), }
mod server {
#[legacy_exports];
impl<T: Send> stream<T> {
fn recv() -> extern fn(+v: stream<T>) -> stream::stream<T> {
impl<T: Send> Stream<T> {
fn recv() -> extern fn(+v: Stream<T>) -> stream::Stream<T> {
// resolve really should report just one error here.
// Change the test case when it changes.
fn recv(+pipe: stream<T>) -> stream::stream<T> { //~ ERROR attempt to use a type argument out of scope
fn recv(+pipe: Stream<T>) -> stream::Stream<T> { //~ ERROR attempt to use a type argument out of scope
//~^ ERROR use of undeclared type name
//~^^ ERROR attempt to use a type argument out of scope
//~^^^ ERROR use of undeclared type name
@ -16,7 +16,7 @@ mod stream {
recv
}
}
type stream<T: Send> = pipes::RecvPacket<stream::stream<T>>;
type Stream<T: Send> = pipes::RecvPacket<stream::Stream<T>>;
}
}

View File

@ -1,5 +1,5 @@
enum a { b, c }
enum a { d, e } //~ ERROR Duplicate definition of type a
enum a { d, e } //~ ERROR duplicate definition of type a
fn main() {}

View File

@ -2,6 +2,6 @@
mod a {}
#[legacy_exports]
mod a {} //~ ERROR Duplicate definition of module a
mod a {} //~ ERROR duplicate definition of type a
fn main() {}

View File

@ -2,7 +2,7 @@ fn a(x: ~str) -> ~str {
fmt!("First function with %s", x)
}
fn a(x: ~str, y: ~str) -> ~str { //~ ERROR Duplicate definition of value a
fn a(x: ~str, y: ~str) -> ~str { //~ ERROR duplicate definition of value a
fmt!("Second function with %s and %s", x, y)
}