change unreachable{} to @unreachable()

instead of a container init expression, it's a builtin
function call.
This commit is contained in:
Andrew Kelley
2016-09-13 16:46:27 -04:00
parent ea2f6594ce
commit 06f2f4d64b
13 changed files with 89 additions and 81 deletions

View File

@@ -55,7 +55,7 @@ pub struct SmallHashMap(K: type, V: type, hash: fn(key: K)->u32, eql: fn(a: K, b
return entry;
}
}
unreachable{} // no next item
@unreachable() // no next item
}
}
@@ -137,9 +137,9 @@ pub struct SmallHashMap(K: type, V: type, hash: fn(key: K)->u32, eql: fn(a: K, b
entry.distance_from_start_index -= 1;
entry = next_entry;
}
unreachable{} // shifting everything in the table
@unreachable() // shifting everything in the table
}}
unreachable{} // key not found
@unreachable() // key not found
}
pub fn entryIterator(hm: &Self) -> Iterator {
@@ -210,7 +210,7 @@ pub struct SmallHashMap(K: type, V: type, hash: fn(key: K)->u32, eql: fn(a: K, b
};
return;
}
unreachable{} // put into a full map
@unreachable() // put into a full map
}
fn internalGet(hm: &Self, key: K) -> ?&Entry {