Skip to content

Commit b161e09

Browse files
committed
auto merge of #8977 : pnkfelix/rust/fsk-followup-on-6009-rebased, r=alexcrichton
Fix #6009. Rebased version of #8970. Inherits review from alexcrichton.
2 parents 6c13b0f + c326ff0 commit b161e09

File tree

7 files changed

+19
-20
lines changed

7 files changed

+19
-20
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: (Path, ~str) -> Path;
17+
pub bad_path: (Path, ~str) -> Path;
1818
}
1919

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

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

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

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

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

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

4444
condition! {
45-
failed_to_create_temp_dir: (~str) -> Path;
45+
pub failed_to_create_temp_dir: (~str) -> 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

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

3030
condition! {
31-
// this should be &[u8] but there's a lifetime issue
31+
// This should be &[u8] but there's a lifetime issue (#5370).
3232
// NOTE: this super::NullByteResolution should be NullByteResolution
33-
// Change this next time the snapshot it updated.
34-
null_byte: (~[u8]) -> super::NullByteResolution;
33+
// Change this next time the snapshot is updated.
34+
pub null_byte: (~[u8]) -> super::NullByteResolution;
3535
}
3636

3737
/// The representation of a C String.

src/libstd/condition.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ mod test {
193193
// Issue #6009
194194
mod m {
195195
condition! {
196-
sadness: int -> int;
196+
// #6009, #8215: should this truly need a `pub` for access from n?
197+
pub sadness: int -> int;
197198
}
198199

199200
mod n {

src/libstd/rt/io/mod.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -384,19 +384,17 @@ 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.
388387
// NOTE: this super::IoError should be IoError
389-
// Change this next time the snapshot it updated.
390-
/*pub*/ io_error: super::IoError -> ();
388+
// Change this next time the snapshot is updated.
389+
pub io_error: super::IoError -> ();
391390
}
392391

393392
// XXX: Can't put doc comments on macros
394393
// Raised by `read` on error
395394
condition! {
396-
// FIXME (#6009): uncomment `pub` after expansion support lands.
397395
// NOTE: this super::IoError should be IoError
398396
// Change this next time the snapshot it updated.
399-
/*pub*/ read_error: super::IoError -> ();
397+
pub read_error: super::IoError -> ();
400398
}
401399

402400
pub trait Reader {

src/libstd/str.rs

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

4545
condition! {
46-
not_utf8: (~str) -> ~str;
46+
pub not_utf8: (~str) -> ~str;
4747
}
4848

4949
/*

src/libsyntax/ext/expand.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -909,8 +909,7 @@ pub fn std_macros() -> @str {
909909

910910
{ $c:ident: $input:ty -> $out:ty; } => {
911911

912-
// FIXME (#6009): remove mod's `pub` below once variant above lands.
913-
pub mod $c {
912+
mod $c {
914913
#[allow(unused_imports)];
915914
#[allow(non_uppercase_statics)];
916915

0 commit comments

Comments
 (0)