From 83e19d2eada77ded543cd6edf5a4b6351a79a0f9 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 4 Sep 2013 04:39:14 +0200 Subject: [PATCH] Added explicit pub to several conditions. Enables completion of #6009. --- src/librustpkg/conditions.rs | 16 ++++++++-------- src/librustpkg/package_source.rs | 1 + src/libstd/c_str.rs | 6 +++--- src/libstd/rt/io/mod.rs | 8 +++----- src/libstd/str.rs | 2 +- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/librustpkg/conditions.rs b/src/librustpkg/conditions.rs index 16ee9c1afb44..4cb103deba79 100644 --- a/src/librustpkg/conditions.rs +++ b/src/librustpkg/conditions.rs @@ -14,33 +14,33 @@ pub use std::path::Path; pub use package_id::PkgId; condition! { - bad_path: (Path, ~str) -> Path; + pub bad_path: (Path, ~str) -> Path; } condition! { - nonexistent_package: (PkgId, ~str) -> Path; + pub nonexistent_package: (PkgId, ~str) -> Path; } condition! { - copy_failed: (Path, Path) -> (); + pub copy_failed: (Path, Path) -> (); } condition! { - missing_pkg_files: (PkgId) -> (); + pub missing_pkg_files: (PkgId) -> (); } condition! { - bad_pkg_id: (Path, ~str) -> PkgId; + pub bad_pkg_id: (Path, ~str) -> PkgId; } condition! { - no_rust_path: (~str) -> Path; + pub no_rust_path: (~str) -> Path; } condition! { - not_a_workspace: (~str) -> Path; + pub not_a_workspace: (~str) -> Path; } condition! { - failed_to_create_temp_dir: (~str) -> Path; + pub failed_to_create_temp_dir: (~str) -> Path; } diff --git a/src/librustpkg/package_source.rs b/src/librustpkg/package_source.rs index ae2083f1b22c..8f2d8877cf94 100644 --- a/src/librustpkg/package_source.rs +++ b/src/librustpkg/package_source.rs @@ -34,6 +34,7 @@ pub struct PkgSrc { } condition! { + // #6009: should this be pub or not, when #8215 is fixed? build_err: (~str) -> (); } diff --git a/src/libstd/c_str.rs b/src/libstd/c_str.rs index 8e7129578ee6..6f12e219c3ca 100644 --- a/src/libstd/c_str.rs +++ b/src/libstd/c_str.rs @@ -28,10 +28,10 @@ pub enum NullByteResolution { } condition! { - // this should be &[u8] but there's a lifetime issue + // This should be &[u8] but there's a lifetime issue (#5370). // NOTE: this super::NullByteResolution should be NullByteResolution - // Change this next time the snapshot it updated. - null_byte: (~[u8]) -> super::NullByteResolution; + // Change this next time the snapshot is updated. + pub null_byte: (~[u8]) -> super::NullByteResolution; } /// The representation of a C String. diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs index 75af7ff84449..3b979cc22663 100644 --- a/src/libstd/rt/io/mod.rs +++ b/src/libstd/rt/io/mod.rs @@ -384,19 +384,17 @@ impl ToStr for IoErrorKind { // XXX: Can't put doc comments on macros // Raised by `I/O` operations on error. condition! { - // FIXME (#6009): uncomment `pub` after expansion support lands. // NOTE: this super::IoError should be IoError - // Change this next time the snapshot it updated. - /*pub*/ io_error: super::IoError -> (); + // Change this next time the snapshot is updated. + pub io_error: super::IoError -> (); } // XXX: Can't put doc comments on macros // Raised by `read` on error condition! { - // FIXME (#6009): uncomment `pub` after expansion support lands. // NOTE: this super::IoError should be IoError // Change this next time the snapshot it updated. - /*pub*/ read_error: super::IoError -> (); + pub read_error: super::IoError -> (); } pub trait Reader { diff --git a/src/libstd/str.rs b/src/libstd/str.rs index e4d1b324e736..471ac409cbba 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -42,7 +42,7 @@ Section: Conditions */ condition! { - not_utf8: (~str) -> ~str; + pub not_utf8: (~str) -> ~str; } /*