1
Fork 0

remove issue #3148 workarounds (no longer needed)

This commit is contained in:
Daniel Micay 2013-02-06 00:03:12 -05:00
parent b34f871dda
commit b91a51daca
3 changed files with 2 additions and 14 deletions

View file

@ -49,9 +49,8 @@ pub mod linear {
buckets: ~[Option<Bucket<K, V>>], buckets: ~[Option<Bucket<K, V>>],
} }
// FIXME(#3148) -- we could rewrite FoundEntry // We could rewrite FoundEntry to have type Option<&Bucket<K, V>>
// to have type Option<&Bucket<K, V>> which would be nifty // which would be nifty
// However, that won't work until #3148 is fixed
enum SearchResult { enum SearchResult {
FoundEntry(uint), FoundHole(uint), TableFull FoundEntry(uint), FoundHole(uint), TableFull
} }
@ -296,8 +295,6 @@ pub mod linear {
FoundEntry(idx) => { FoundEntry(idx) => {
match self.buckets[idx] { match self.buckets[idx] {
Some(ref bkt) => { Some(ref bkt) => {
// FIXME(#3148)---should be inferred
let bkt: &self/Bucket<K, V> = bkt;
Some(&bkt.value) Some(&bkt.value)
} }
None => { None => {

View file

@ -856,9 +856,6 @@ pub impl Decoder: serialize::Decoder {
debug!("read_vec_elt(idx=%u)", idx); debug!("read_vec_elt(idx=%u)", idx);
match *self.peek() { match *self.peek() {
List(ref list) => { List(ref list) => {
// FIXME(#3148)---should be inferred
let list: &self/~[Json] = list;
self.stack.push(&list[idx]); self.stack.push(&list[idx]);
f() f()
} }
@ -885,9 +882,6 @@ pub impl Decoder: serialize::Decoder {
let top = self.peek(); let top = self.peek();
match *top { match *top {
Object(ref obj) => { Object(ref obj) => {
// FIXME(#3148) This hint should not be necessary.
let obj: &self/~Object = obj;
match obj.find(&name.to_owned()) { match obj.find(&name.to_owned()) {
None => die!(fmt!("no such field: %s", name)), None => die!(fmt!("no such field: %s", name)),
Some(json) => { Some(json) => {
@ -917,8 +911,6 @@ pub impl Decoder: serialize::Decoder {
debug!("read_tup_elt(idx=%u)", idx); debug!("read_tup_elt(idx=%u)", idx);
match *self.peek() { match *self.peek() {
List(ref list) => { List(ref list) => {
// FIXME(#3148)---should be inferred
let list: &self/~[Json] = list;
self.stack.push(&list[idx]); self.stack.push(&list[idx]);
f() f()
} }

View file

@ -142,7 +142,6 @@ impl <K: Ord, V> TreeMap<K, V>: Map<K, V> {
loop { loop {
match *current { match *current {
Some(ref r) => { Some(ref r) => {
let r: &self/~TreeNode<K, V> = r; // FIXME: #3148
if *key < r.key { if *key < r.key {
current = &r.left; current = &r.left;
} else if r.key < *key { } else if r.key < *key {