Skip to content

Commit a880777

Browse files
committed
Purge borrowck from libstd
This hasn't been in use since `@mut` was removed
1 parent 57f8073 commit a880777

File tree

4 files changed

+0
-271
lines changed

4 files changed

+0
-271
lines changed

src/libstd/rt/borrowck.rs

Lines changed: 0 additions & 220 deletions
This file was deleted.

src/libstd/rt/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ mod util;
127127
// Global command line argument storage
128128
pub mod args;
129129

130-
// Support for dynamic borrowck
131-
pub mod borrowck;
132-
133130
/// The default error code of the rust runtime if the main task fails instead
134131
/// of exiting cleanly.
135132
pub static DEFAULT_ERROR_CODE: int = 101;

src/libstd/rt/task.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ use option::{Option, Some, None};
2727
use prelude::drop;
2828
use result::{Result, Ok, Err};
2929
use rt::Runtime;
30-
use rt::borrowck::BorrowRecord;
31-
use rt::borrowck;
3230
use rt::local::Local;
3331
use rt::local_heap::LocalHeap;
3432
use rt::rtio::LocalIo;
@@ -52,8 +50,6 @@ pub struct Task {
5250
death: Death,
5351
destroyed: bool,
5452
name: Option<SendStr>,
55-
// Dynamic borrowck debugging info
56-
borrow_list: Option<~[BorrowRecord]>,
5753

5854
logger: Option<~Logger>,
5955
stdout: Option<~Writer>,
@@ -93,7 +89,6 @@ impl Task {
9389
death: Death::new(),
9490
destroyed: false,
9591
name: None,
96-
borrow_list: None,
9792
logger: None,
9893
stdout: None,
9994
stderr: None,
@@ -182,9 +177,6 @@ impl Task {
182177

183178
unsafe { (*handle).unwinder.try(try_block); }
184179

185-
// Cleanup the dynamic borrowck debugging info
186-
borrowck::clear_task_borrow_list();
187-
188180
// Here we must unsafely borrow the task in order to not remove it from
189181
// TLS. When collecting failure, we may attempt to send on a channel (or
190182
// just run aribitrary code), so we must be sure to still have a local

src/libstd/unstable/lang.rs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
1313
use c_str::ToCStr;
1414
use libc::{c_char, size_t, uintptr_t};
15-
use rt::borrowck;
1615

1716
#[cold]
1817
#[lang="fail_"]
@@ -42,42 +41,3 @@ pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
4241
pub unsafe fn local_free(ptr: *c_char) {
4342
::rt::local_heap::local_free(ptr);
4443
}
45-
46-
#[lang="borrow_as_imm"]
47-
#[inline]
48-
pub unsafe fn borrow_as_imm(a: *u8, file: *c_char, line: size_t) -> uint {
49-
borrowck::borrow_as_imm(a, file, line)
50-
}
51-
52-
#[lang="borrow_as_mut"]
53-
#[inline]
54-
pub unsafe fn borrow_as_mut(a: *u8, file: *c_char, line: size_t) -> uint {
55-
borrowck::borrow_as_mut(a, file, line)
56-
}
57-
58-
#[lang="record_borrow"]
59-
pub unsafe fn record_borrow(a: *u8, old_ref_count: uint,
60-
file: *c_char, line: size_t) {
61-
borrowck::record_borrow(a, old_ref_count, file, line)
62-
}
63-
64-
#[lang="unrecord_borrow"]
65-
pub unsafe fn unrecord_borrow(a: *u8, old_ref_count: uint,
66-
file: *c_char, line: size_t) {
67-
borrowck::unrecord_borrow(a, old_ref_count, file, line)
68-
}
69-
70-
#[lang="return_to_mut"]
71-
#[inline]
72-
pub unsafe fn return_to_mut(a: *u8, orig_ref_count: uint,
73-
file: *c_char, line: size_t) {
74-
borrowck::return_to_mut(a, orig_ref_count, file, line)
75-
}
76-
77-
#[lang="check_not_borrowed"]
78-
#[inline]
79-
pub unsafe fn check_not_borrowed(a: *u8,
80-
file: *c_char,
81-
line: size_t) {
82-
borrowck::check_not_borrowed(a, file, line)
83-
}

0 commit comments

Comments
 (0)