Added liveness analysis for protocols, and removed warnings about empty states.

This commit is contained in:
Eric Holk
2012-07-17 17:03:27 -07:00
parent c858eb0654
commit 7b8171ef2d
10 changed files with 130 additions and 19 deletions

View File

@@ -81,7 +81,7 @@ fn from_port<A:send>(-port: future_pipe::client::waiting<A>) -> future<A> {
port_ <-> *port;
let port = option::unwrap(port_);
alt recv(port) {
future_pipe::completed(data, _next) { #move(data) }
future_pipe::completed(data) { #move(data) }
}
}
}
@@ -135,10 +135,8 @@ fn with<A,B>(future: future<A>, blk: fn(A) -> B) -> B {
proto! future_pipe {
waiting:recv<T:send> {
completed(T) -> terminated
completed(T) -> !
}
terminated:send { }
}
#[test]