From 0d5bcb14adb71900a99f06b92485de7e019734c2 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Sun, 15 Feb 2015 09:52:21 +0100 Subject: Switched to Box::new in many places. Many of the modifications putting in `Box::new` calls also include a pointer to Issue 22405, which tracks going back to `box ` if possible in the future. (Still tried to use `Box<_>` where it sufficed; thus some tests still have `box_syntax` enabled, as they use a mix of `box` and `Box::new`.) Precursor for overloaded-`box` and placement-`in`; see Issue 22181. --- src/libstd/rt/unwind.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/rt') diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index 4dda3ea8c99..ebb2a2e4827 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -166,7 +166,7 @@ fn rust_panic(cause: Box) -> ! { rtdebug!("begin_unwind()"); unsafe { - let exception = box Exception { + let exception: Box<_> = box Exception { uwe: uw::_Unwind_Exception { exception_class: rust_exception_class(), exception_cleanup: exception_cleanup, @@ -506,7 +506,7 @@ pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, uint)) - let mut s = String::new(); let _ = write!(&mut s, "{}", msg); - begin_unwind_inner(box s, file_line) + begin_unwind_inner(Box::new(s), file_line) } /// This is the entry point of unwinding for panic!() and assert!(). @@ -521,7 +521,7 @@ pub fn begin_unwind(msg: M, file_line: &(&'static str, uint)) -> // panicking. // see below for why we do the `Any` coercion here. - begin_unwind_inner(box msg, file_line) + begin_unwind_inner(Box::new(msg), file_line) } /// The core of the unwinding. -- cgit 1.4.1-3-g733a5