Skip to content

Commit

Permalink
auto merge of rust-lang#8977 : pnkfelix/rust/fsk-followup-on-6009-reb…
Browse files Browse the repository at this point in the history
…ased, r=alexcrichton

Fix rust-lang#6009.  Rebased version of rust-lang#8970.  Inherits review from alexcrichton.
  • Loading branch information
bors committed Sep 4, 2013
2 parents 6c13b0f + c326ff0 commit b161e09
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 20 deletions.
16 changes: 8 additions & 8 deletions src/librustpkg/conditions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions src/librustpkg/package_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub struct PkgSrc {
}

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

Expand Down
6 changes: 3 additions & 3 deletions src/libstd/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ mod test {
// Issue #6009
mod m {
condition! {
sadness: int -> int;
// #6009, #8215: should this truly need a `pub` for access from n?
pub sadness: int -> int;
}

mod n {
Expand Down
8 changes: 3 additions & 5 deletions src/libstd/rt/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Section: Conditions
*/

condition! {
not_utf8: (~str) -> ~str;
pub not_utf8: (~str) -> ~str;
}

/*
Expand Down
3 changes: 1 addition & 2 deletions src/libsyntax/ext/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,7 @@ pub fn std_macros() -> @str {

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

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

Expand Down

0 comments on commit b161e09

Please sign in to comment.