Make conditions public. #6009
This commit is contained in:
parent
6644a034f0
commit
fe13b86519
2 changed files with 22 additions and 1 deletions
|
@ -192,4 +192,25 @@ mod test {
|
|||
|
||||
assert!(trapped);
|
||||
}
|
||||
|
||||
// Issue #6009
|
||||
mod m {
|
||||
condition! {
|
||||
sadness: int -> int;
|
||||
}
|
||||
|
||||
mod n {
|
||||
use super::sadness;
|
||||
|
||||
#[test]
|
||||
fn test_conditions_are_public() {
|
||||
let mut trapped = false;
|
||||
do sadness::cond.trap(|_| {
|
||||
0
|
||||
}).in {
|
||||
sadness::cond.raise(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -475,7 +475,7 @@ pub fn core_macros() -> ~str {
|
|||
|
||||
{ $c:ident: $in:ty -> $out:ty; } => {
|
||||
|
||||
mod $c {
|
||||
pub mod $c {
|
||||
fn key(_x: @::core::condition::Handler<$in,$out>) { }
|
||||
|
||||
pub static cond :
|
||||
|
|
Loading…
Reference in a new issue