Skip to content

Commit b3ddeb0

Browse files
committed
Added explicit pub to several conditions. Enables completion of rust-lang#6009.
1 parent b4ff0bc commit b3ddeb0

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

src/librustpkg/conditions.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,33 @@ pub use std::path::Path;
1414
pub use package_id::PkgId;
1515

1616
condition! {
17-
bad_path: (super::Path, ~str) -> super::Path;
17+
pub bad_path: (super::Path, ~str) -> super::Path;
1818
}
1919

2020
condition! {
21-
nonexistent_package: (super::PkgId, ~str) -> super::Path;
21+
pub nonexistent_package: (super::PkgId, ~str) -> super::Path;
2222
}
2323

2424
condition! {
25-
copy_failed: (super::Path, super::Path) -> ();
25+
pub copy_failed: (super::Path, super::Path) -> ();
2626
}
2727

2828
condition! {
29-
missing_pkg_files: (super::PkgId) -> ();
29+
pub missing_pkg_files: (super::PkgId) -> ();
3030
}
3131

3232
condition! {
33-
bad_pkg_id: (super::Path, ~str) -> super::PkgId;
33+
pub bad_pkg_id: (super::Path, ~str) -> super::PkgId;
3434
}
3535

3636
condition! {
37-
no_rust_path: (~str) -> super::Path;
37+
pub no_rust_path: (~str) -> super::Path;
3838
}
3939

4040
condition! {
41-
not_a_workspace: (~str) -> super::Path;
41+
pub not_a_workspace: (~str) -> super::Path;
4242
}
4343

4444
condition! {
45-
failed_to_create_temp_dir: (~str) -> super::Path;
45+
pub failed_to_create_temp_dir: (~str) -> super::Path;
4646
}

src/librustpkg/package_source.rs

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pub struct PkgSrc {
3434
}
3535

3636
condition! {
37+
// #6009: should this be pub or not, when #8215 is fixed?
3738
build_err: (~str) -> ();
3839
}
3940

src/libstd/c_str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ pub enum NullByteResolution {
2828
}
2929

3030
condition! {
31-
// this should be &[u8] but there's a lifetime issue
32-
null_byte: (~[u8]) -> super::NullByteResolution;
31+
// this should be &[u8] but there's a lifetime issue; (Issue #5370)
32+
pub null_byte: (~[u8]) -> super::NullByteResolution;
3333
}
3434

3535
/// The representation of a C String.

src/libstd/rt/io/mod.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -384,15 +384,13 @@ impl ToStr for IoErrorKind {
384384
// XXX: Can't put doc comments on macros
385385
// Raised by `I/O` operations on error.
386386
condition! {
387-
// FIXME (#6009): uncomment `pub` after expansion support lands.
388-
/*pub*/ io_error: super::IoError -> ();
387+
pub io_error: super::IoError -> ();
389388
}
390389

391390
// XXX: Can't put doc comments on macros
392391
// Raised by `read` on error
393392
condition! {
394-
// FIXME (#6009): uncomment `pub` after expansion support lands.
395-
/*pub*/ read_error: super::IoError -> ();
393+
pub read_error: super::IoError -> ();
396394
}
397395

398396
pub trait Reader {

src/libstd/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Section: Conditions
4242
*/
4343

4444
condition! {
45-
not_utf8: (~str) -> ~str;
45+
pub not_utf8: (~str) -> ~str;
4646
}
4747

4848
/*

0 commit comments

Comments
 (0)