Skip to content

Commit 73a24b8

Browse files
committed
Fixing coherence error in bitv
1 parent 7b8171e commit 73a24b8

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/libstd/bitv.rs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,29 @@ fn eq_vec(v0: bitv, v1: ~[uint]) -> bool {
235235
ret true;
236236
}
237237

238-
impl methods for bitv {
238+
trait methods {
239+
fn union(rhs: bitv) -> bool;
240+
fn intersect(rhs: bitv) -> bool;
241+
fn assign(rhs: bitv) -> bool;
242+
fn get(i: uint) -> bool;
243+
fn [](i: uint) -> bool;
244+
fn eq(rhs: bitv) -> bool;
245+
fn clear();
246+
fn set_all();
247+
fn invert();
248+
fn difference(rhs: bitv) -> bool;
249+
fn set(i: uint, x: bool);
250+
fn is_true() -> bool;
251+
fn is_false() -> bool;
252+
fn to_vec() -> ~[uint];
253+
fn each(f: fn(bool) -> bool);
254+
fn each_storage(f: fn(&uint) -> bool);
255+
fn eq_vec(v: ~[uint]) -> bool;
256+
257+
fn ones(f: fn(uint) -> bool);
258+
}
259+
260+
impl of methods for bitv {
239261
fn union(rhs: bitv) -> bool { union(self, rhs) }
240262
fn intersect(rhs: bitv) -> bool { intersect(self, rhs) }
241263
fn assign(rhs: bitv) -> bool { assign(self, rhs) }

0 commit comments

Comments
 (0)