about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-04-22 14:43:02 -0700
committerBrian Anderson <banderson@mozilla.com>2013-04-22 14:43:02 -0700
commitfe13b865192028645b50c17d2cb1a6d44481f338 (patch)
tree63c4b9f9035cac62a3ff5ac5f3361c2abef899d8
parent6644a034f0650c638eea8809a5f035ffaca0de88 (diff)
downloadrust-fe13b865192028645b50c17d2cb1a6d44481f338.tar.gz
rust-fe13b865192028645b50c17d2cb1a6d44481f338.zip
Make conditions public. #6009
-rw-r--r--src/libcore/condition.rs21
-rw-r--r--src/libsyntax/ext/expand.rs2
2 files changed, 22 insertions, 1 deletions
diff --git a/src/libcore/condition.rs b/src/libcore/condition.rs
index dc6c80228dd..c639239981c 100644
--- a/src/libcore/condition.rs
+++ b/src/libcore/condition.rs
@@ -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);
+                }
+            }
+        }
+    }
 }
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 430402a8982..5c5817d480d 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -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 :