// 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 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub mod stream { pub enum Stream { send(T, ::stream::server::Stream), } pub mod server { use core::option; use core::pipes; impl Stream { pub fn recv() -> extern fn(+v: Stream) -> ::stream::Stream { // resolve really should report just one error here. // Change the test case when it changes. pub fn recv(+pipe: Stream) -> ::stream::Stream { //~ 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 option::unwrap(pipes::recv(pipe)) } recv } } pub type Stream = pipes::RecvPacket<::stream::Stream>; } } fn main() {}