pub struct Unwinder {
unwinding: bool,
- cause: Option<Box<Any:Send>>
+ cause: Option<Box<Any + Send>>
}
struct Exception {
uwe: uw::_Unwind_Exception,
- cause: Option<Box<Any:Send>>,
+ cause: Option<Box<Any + Send>>,
}
-pub type Callback = fn(msg: &Any:Send, file: &'static str, line: uint);
+pub type Callback = fn(msg: &Any + Send, file: &'static str, line: uint);
// Variables used for invoking callbacks when a task starts to unwind.
//
/// guaranteed that a rust task is in place when invoking this function.
/// Unwinding twice can lead to resource leaks where some destructors are not
/// run.
-pub unsafe fn try(f: ||) -> ::core::result::Result<(), Box<Any:Send>> {
+pub unsafe fn try(f: ||) -> ::core::result::Result<(), Box<Any + Send>> {
let closure: Closure = mem::transmute(f);
let ep = rust_try(try_fn, closure.code as *c_void,
closure.env as *c_void);
// An uninlined, unmangled function upon which to slap yer breakpoints
#[inline(never)]
#[no_mangle]
-fn rust_fail(cause: Box<Any:Send>) -> ! {
+fn rust_fail(cause: Box<Any + Send>) -> ! {
rtdebug!("begin_unwind()");
unsafe {
/// Do this split took the LLVM IR line counts of `fn main() { fail!()
/// }` from ~1900/3700 (-O/no opts) to 180/590.
#[inline(never)] #[cold] // this is the slow path, please never inline this
-fn begin_unwind_inner(msg: Box<Any:Send>,
+fn begin_unwind_inner(msg: Box<Any + Send>,
file: &'static str,
line: uint) -> ! {
// First, invoke call the user-defined callbacks triggered on task failure.