Skip to content

Commit 319cf6e

Browse files
committed
Merge remote-tracking branch 'brson/io'
Conflicts: src/libstd/rt/comm.rs src/libstd/rt/mod.rs src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/rt/tube.rs src/libstd/rt/uv/uvio.rs src/libstd/rt/uvio.rs src/libstd/task/spawn.rs
2 parents b9119ed + 3208fc3 commit 319cf6e

27 files changed

+2892
-797
lines changed

src/libstd/macros.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,19 @@ macro_rules! rtassert (
3838
} )
3939
)
4040

41+
42+
// The do_abort function was originally inside the abort macro, but
43+
// this was ICEing the compiler so it has been moved outside. Now this
44+
// seems to work?
45+
#[allow(missing_doc)]
46+
pub fn do_abort() -> ! {
47+
unsafe { ::libc::abort(); }
48+
}
49+
4150
macro_rules! abort(
4251
($( $msg:expr),+) => ( {
4352
rtdebug!($($msg),+);
44-
45-
do_abort();
46-
47-
// NB: This is in a fn to avoid putting the `unsafe` block in a macro,
48-
// which causes spurious 'unnecessary unsafe block' warnings.
49-
fn do_abort() -> ! {
50-
unsafe { ::libc::abort(); }
51-
}
53+
::macros::do_abort();
5254
} )
5355
)
56+

0 commit comments

Comments
 (0)