From a3ae48cb365f5d762265354e2dbdebfd757bd132 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 23 Oct 2013 22:22:59 -0400 Subject: [PATCH] mark some functions as returning ! Closes #10023 --- src/libstd/rt/borrowck.rs | 2 +- src/libstd/unstable/lang.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libstd/rt/borrowck.rs b/src/libstd/rt/borrowck.rs index 4426a3eafe1e8..9d13e79464a39 100644 --- a/src/libstd/rt/borrowck.rs +++ b/src/libstd/rt/borrowck.rs @@ -57,7 +57,7 @@ pub fn clear_task_borrow_list() { let _ = try_take_task_borrow_list(); } -unsafe fn fail_borrowed(box: *mut raw::Box<()>, file: *c_char, line: size_t) { +unsafe fn fail_borrowed(box: *mut raw::Box<()>, file: *c_char, line: size_t) -> ! { debug_borrow("fail_borrowed: ", box, 0, 0, file, line); match try_take_task_borrow_list() { diff --git a/src/libstd/unstable/lang.rs b/src/libstd/unstable/lang.rs index e30d0e7736798..6dfb319d592e0 100644 --- a/src/libstd/unstable/lang.rs +++ b/src/libstd/unstable/lang.rs @@ -22,8 +22,7 @@ pub fn fail_(expr: *c_char, file: *c_char, line: size_t) -> ! { } #[lang="fail_bounds_check"] -pub fn fail_bounds_check(file: *c_char, line: size_t, - index: size_t, len: size_t) { +pub fn fail_bounds_check(file: *c_char, line: size_t, index: size_t, len: size_t) -> ! { let msg = format!("index out of bounds: the len is {} but the index is {}", len as uint, index as uint); do msg.with_c_str |buf| {