Skip to content

Commit 26c11f7

Browse files
committed
Use must_have_lock instead of private functions. (Issue #2700)
I hereby declare that messages sent from the same source arrive in order (Issue #2605) Removing FIXME, owned is the correct type here. (Issue #2704) Remove outdated FIXME (Issue #2703) Updating test for spawning native functions (Issue #2602) Removing bogus FIXME (Issue #2599)
1 parent 1d6fb24 commit 26c11f7

File tree

6 files changed

+4
-21
lines changed

6 files changed

+4
-21
lines changed

src/libcore/vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ fn shift<T>(&v: [T]) -> T {
385385
let mut r <- *vv;
386386

387387
for uint::range(1u, ln) {|i|
388-
// FIXME (#2703): this isn't legal, per se...
389388
let r <- *ptr::offset(vv, i);
390389
push(v, r);
391390
}

src/rt/rust_builtin.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,7 @@ rust_unlock_cond_lock(rust_cond_lock *lock) {
891891
extern "C" void
892892
rust_wait_cond_lock(rust_cond_lock *lock) {
893893
rust_task *task = rust_get_current_task();
894-
#ifdef DEBUG_LOCKS
895-
assert(lock->lock.lock_held_by_current_thread());
896-
#endif
894+
lock->lock.must_have_lock();
897895
assert(NULL == lock->waiting);
898896
lock->waiting = task;
899897
task->block(lock, "waiting for signal");
@@ -905,9 +903,7 @@ rust_wait_cond_lock(rust_cond_lock *lock) {
905903

906904
extern "C" bool
907905
rust_signal_cond_lock(rust_cond_lock *lock) {
908-
#ifdef DEBUG_LOCKS
909-
assert(lock->lock.lock_held_by_current_thread());
910-
#endif
906+
lock->lock.must_have_lock();
911907
if(NULL == lock->waiting) {
912908
return false;
913909
}

src/rustc/middle/trans/base.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,6 @@ fn trans_assign_op(bcx: block, ex: @ast::expr, op: ast::binop,
17971797
arg_exprs([src]), save_in(target));
17981798

17991799
ret move_val(bcx, DROP_EXISTING, lhs_res.val,
1800-
// FIXME (#2704): should kind be owned?
18011800
{bcx: bcx, val: target, kind: owned},
18021801
dty);
18031802
}

src/test/bench/task-perf-word-count-generic.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ mod map_reduce {
7777

7878
type putter<K: send, V: send> = fn(K, V);
7979

80-
// FIXME: the first K1 parameter should probably be a - (#2599)
8180
type mapper<K1: send, K2: send, V: send> = fn~(K1, putter<K2, V>);
8281

8382
type getter<V: send> = fn() -> option<V>;

src/test/run-pass/issue-506.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
// xfail-test
2-
// FIXME: This test is no longer testing what it was intended to. It should
3-
// be testing spawning of a native function, but is actually testing
4-
// spawning some other function, then executing a native function.
5-
// #2602
6-
71
/*
82
A reduced test case for Issue #506, provided by Rob Arnold.
93
*/
@@ -13,9 +7,7 @@ import task;
137

148
#[abi = "cdecl"]
159
native mod rustrt {
16-
fn task_yield();
10+
fn rust_task_allow_kill();
1711
}
1812

19-
fn yield_wrap(&&_arg: ()) { rustrt::task_yield(); }
20-
21-
fn main() { task::spawn((), yield_wrap); }
13+
fn main() { task::spawn(rustrt::rust_task_allow_kill); }

src/test/run-pass/task-comm-16.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ fn test_tag() {
5252
send(ch, tag1);
5353
send(ch, tag2(10));
5454
send(ch, tag3(10, 11u8, 'A'));
55-
// FIXME: Do port semantics really guarantee these happen in order?
56-
// (#2605)
5755
let mut t1: t;
5856
t1 = recv(po);
5957
assert (t1 == tag1);

0 commit comments

Comments
 (0)