Skip to content

Commit 7075eb3

Browse files
committed
auto merge of #10042 : thestinger/rust/fail, r=sanxiyn
Closes #10023
2 parents f27dfa0 + a3ae48c commit 7075eb3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/libstd/rt/borrowck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub fn clear_task_borrow_list() {
5757
let _ = try_take_task_borrow_list();
5858
}
5959

60-
unsafe fn fail_borrowed(box: *mut raw::Box<()>, file: *c_char, line: size_t) {
60+
unsafe fn fail_borrowed(box: *mut raw::Box<()>, file: *c_char, line: size_t) -> ! {
6161
debug_borrow("fail_borrowed: ", box, 0, 0, file, line);
6262

6363
match try_take_task_borrow_list() {

src/libstd/unstable/lang.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ pub fn fail_(expr: *c_char, file: *c_char, line: size_t) -> ! {
2222
}
2323

2424
#[lang="fail_bounds_check"]
25-
pub fn fail_bounds_check(file: *c_char, line: size_t,
26-
index: size_t, len: size_t) {
25+
pub fn fail_bounds_check(file: *c_char, line: size_t, index: size_t, len: size_t) -> ! {
2726
let msg = format!("index out of bounds: the len is {} but the index is {}",
2827
len as uint, index as uint);
2928
do msg.with_c_str |buf| {

0 commit comments

Comments
 (0)