Skip to content

Commit e397908

Browse files
committed
---
yaml --- r: 52443 b: refs/heads/dist-snap c: dfa97c2 h: refs/heads/master i: 52441: 9d6840a 52439: 245cf21 v: v3
1 parent f632e32 commit e397908

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 3ed39ce26ff6dbe3d3a8f4196b9226550cc6a979
10+
refs/heads/dist-snap: dfa97c21a57f10ff1f904a81a13ad8406e8224cb
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/middle/const_eval.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,7 @@ fn eval_const_expr_partial(tcx: middle::ty::ctxt, e: @expr)
295295
add => Ok(const_int(a + b)),
296296
subtract => Ok(const_int(a - b)),
297297
mul => Ok(const_int(a * b)),
298-
div if b == 0 => Err(~"divide by zero"),
299298
div => Ok(const_int(a / b)),
300-
rem if b == 0 => Err(~"modulo zero"),
301299
rem => Ok(const_int(a % b)),
302300
and | bitand => Ok(const_int(a & b)),
303301
or | bitor => Ok(const_int(a | b)),
@@ -317,9 +315,7 @@ fn eval_const_expr_partial(tcx: middle::ty::ctxt, e: @expr)
317315
add => Ok(const_uint(a + b)),
318316
subtract => Ok(const_uint(a - b)),
319317
mul => Ok(const_uint(a * b)),
320-
div if b == 0 => Err(~"divide by zero"),
321318
div => Ok(const_uint(a / b)),
322-
rem if b == 0 => Err(~"modulo zero"),
323319
rem => Ok(const_uint(a % b)),
324320
and | bitand => Ok(const_uint(a & b)),
325321
or | bitor => Ok(const_uint(a | b)),

branches/dist-snap/src/libstd/treemap.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ impl <K: Ord, V> TreeMap<K, V> {
120120
/// Create an empty TreeMap
121121
static pure fn new() -> TreeMap<K, V> { TreeMap{root: None, length: 0} }
122122

123-
/// Return true if the map contains some elements
124-
pure fn is_not_empty(&self) -> bool { self.root.is_some() }
125123

126124
/// Visit all key-value pairs in reverse order
127125
pure fn each_reverse(&self, f: fn(&K, &V) -> bool) {
@@ -176,7 +174,7 @@ impl <K: Ord, V> TreeMapIterator<K, V> {
176174
/// tuple with a reference to the key and value. If there are no
177175
/// more nodes, return `None`.
178176
fn next(&mut self) -> Option<(&self/K, &self/V)> {
179-
while self.stack.is_not_empty() || self.node.is_some() {
177+
while !self.stack.is_empty() || self.node.is_some() {
180178
match *self.node {
181179
Some(ref x) => {
182180
self.stack.push(x);
@@ -240,9 +238,6 @@ impl <T: Ord> TreeSet<T> {
240238
/// Create an empty TreeSet
241239
static pure fn new() -> TreeSet<T> { TreeSet{map: TreeMap::new()} }
242240

243-
/// Return true if the set contains some elements
244-
pure fn is_not_empty(&self) -> bool { self.map.is_not_empty() }
245-
246241
/// Visit all values in reverse order
247242
pure fn each_reverse(&self, f: fn(&T) -> bool) {
248243
self.map.each_key_reverse(f)
@@ -675,7 +670,6 @@ mod test_treemap {
675670

676671
fn check_equal<K: Eq Ord, V: Eq>(ctrl: &[(K, V)], map: &TreeMap<K, V>) {
677672
assert ctrl.is_empty() == map.is_empty();
678-
assert ctrl.is_not_empty() == map.is_not_empty();
679673
for ctrl.each |x| {
680674
let &(k, v) = x;
681675
assert map.find(&k).unwrap() == &v

branches/dist-snap/src/test/compile-fail/eval-enum.rs

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

0 commit comments

Comments
 (0)