Skip to content

Commit 932fc24

Browse files
committed
---
yaml --- r: 57962 b: refs/heads/incoming c: ee26c7c h: refs/heads/master v: v3
1 parent 34b5623 commit 932fc24

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+686
-663
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: bf67eb2362b7d0f37012f2d6dac604c3bbacd2c6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: db2451477b4d830b2fa7b19761eb4009089205a0
9+
refs/heads/incoming: ee26c7c433dbb8d41a2b65dbc89eb84acfc2d311
1010
refs/heads/dist-snap: 00dbbd01c2aee72982b3e0f9511ae1d4428c3ba9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,8 +1467,8 @@ A complete list of the built-in language items follows:
14671467
: Elements can be subtracted.
14681468
`mul`
14691469
: Elements can be multiplied.
1470-
`quot`
1471-
: Elements have a quotient operation.
1470+
`div`
1471+
: Elements have a division operation.
14721472
`rem`
14731473
: Elements have a remainder operation.
14741474
`neg`
@@ -1857,7 +1857,7 @@ The default meaning of the operators on standard types is given here.
18571857
Calls the `mul` method on the `core::ops::Mul` trait.
18581858
`/`
18591859
: Quotient.
1860-
Calls the `quot` method on the `core::ops::Quot` trait.
1860+
Calls the `div` method on the `core::ops::Div` trait.
18611861
`%`
18621862
: Remainder.
18631863
Calls the `rem` method on the `core::ops::Rem` trait.

branches/incoming/src/libcore/char.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
//! Utilities for manipulating the char type
1212
13-
#[cfg(notest)]
1413
use cmp::Ord;
1514
use option::{None, Option, Some};
1615
use str;

branches/incoming/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub use ops::{Drop};
7878
#[cfg(stage0)]
7979
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not};
8080
#[cfg(not(stage0))]
81-
pub use ops::{Add, Sub, Mul, Quot, Rem, Neg, Not};
81+
pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not};
8282
pub use ops::{BitAnd, BitOr, BitXor};
8383
pub use ops::{Shl, Shr, Index};
8484

branches/incoming/src/libcore/iter.rs

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ much easier to implement.
4141
4242
*/
4343

44-
use cmp::Ord;
45-
use option::{Option, Some, None};
46-
4744
pub trait Times {
4845
fn times(&self, it: &fn() -> bool);
4946
}
@@ -107,78 +104,6 @@ pub fn all<T>(predicate: &fn(T) -> bool, iter: &fn(f: &fn(T) -> bool)) -> bool {
107104
true
108105
}
109106

110-
/**
111-
* Return the first element where `predicate` returns `true`. Return `None` if no element is found.
112-
*
113-
* # Example:
114-
*
115-
* ~~~~
116-
* let xs = ~[1u, 2, 3, 4, 5, 6];
117-
* assert_eq!(*find(|& &x: & &uint| x > 3, |f| xs.each(f)).unwrap(), 4);
118-
* ~~~~
119-
*/
120-
#[inline(always)]
121-
pub fn find<T>(predicate: &fn(&T) -> bool, iter: &fn(f: &fn(T) -> bool)) -> Option<T> {
122-
for iter |x| {
123-
if predicate(&x) {
124-
return Some(x);
125-
}
126-
}
127-
None
128-
}
129-
130-
/**
131-
* Return the largest item yielded by an iterator. Return `None` if the iterator is empty.
132-
*
133-
* # Example:
134-
*
135-
* ~~~~
136-
* let xs = ~[8, 2, 3, 1, -5, 9, 11, 15];
137-
* assert_eq!(max(|f| xs.each(f)).unwrap(), &15);
138-
* ~~~~
139-
*/
140-
#[inline]
141-
pub fn max<T: Ord>(iter: &fn(f: &fn(T) -> bool)) -> Option<T> {
142-
let mut result = None;
143-
for iter |x| {
144-
match result {
145-
Some(ref mut y) => {
146-
if x > *y {
147-
*y = x;
148-
}
149-
}
150-
None => result = Some(x)
151-
}
152-
}
153-
result
154-
}
155-
156-
/**
157-
* Return the smallest item yielded by an iterator. Return `None` if the iterator is empty.
158-
*
159-
* # Example:
160-
*
161-
* ~~~~
162-
* let xs = ~[8, 2, 3, 1, -5, 9, 11, 15];
163-
* assert_eq!(max(|f| xs.each(f)).unwrap(), &-5);
164-
* ~~~~
165-
*/
166-
#[inline]
167-
pub fn min<T: Ord>(iter: &fn(f: &fn(T) -> bool)) -> Option<T> {
168-
let mut result = None;
169-
for iter |x| {
170-
match result {
171-
Some(ref mut y) => {
172-
if x < *y {
173-
*y = x;
174-
}
175-
}
176-
None => result = Some(x)
177-
}
178-
}
179-
result
180-
}
181-
182107
#[cfg(test)]
183108
mod tests {
184109
use super::*;
@@ -203,22 +128,4 @@ mod tests {
203128
assert!(all(|x: uint| x < 6, |f| uint::range(1, 6, f)));
204129
assert!(!all(|x: uint| x < 5, |f| uint::range(1, 6, f)));
205130
}
206-
207-
#[test]
208-
fn test_find() {
209-
let xs = ~[1u, 2, 3, 4, 5, 6];
210-
assert_eq!(*find(|& &x: & &uint| x > 3, |f| xs.each(f)).unwrap(), 4);
211-
}
212-
213-
#[test]
214-
fn test_max() {
215-
let xs = ~[8, 2, 3, 1, -5, 9, 11, 15];
216-
assert_eq!(max(|f| xs.each(f)).unwrap(), &15);
217-
}
218-
219-
#[test]
220-
fn test_min() {
221-
let xs = ~[8, 2, 3, 1, -5, 9, 11, 15];
222-
assert_eq!(min(|f| xs.each(f)).unwrap(), &-5);
223-
}
224131
}

branches/incoming/src/libcore/num/f32.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub fn sub(x: f32, y: f32) -> f32 { return x - y; }
123123
pub fn mul(x: f32, y: f32) -> f32 { return x * y; }
124124

125125
#[inline(always)]
126-
pub fn quot(x: f32, y: f32) -> f32 { return x / y; }
126+
pub fn div(x: f32, y: f32) -> f32 { return x / y; }
127127

128128
#[inline(always)]
129129
pub fn rem(x: f32, y: f32) -> f32 { return x % y; }
@@ -279,16 +279,11 @@ impl Mul<f32,f32> for f32 {
279279
fn mul(&self, other: &f32) -> f32 { *self * *other }
280280
}
281281

282-
#[cfg(stage0,notest)]
282+
#[cfg(notest)]
283283
impl Div<f32,f32> for f32 {
284284
#[inline(always)]
285285
fn div(&self, other: &f32) -> f32 { *self / *other }
286286
}
287-
#[cfg(not(stage0),notest)]
288-
impl Quot<f32,f32> for f32 {
289-
#[inline(always)]
290-
fn quot(&self, other: &f32) -> f32 { *self / *other }
291-
}
292287

293288
#[cfg(stage0,notest)]
294289
impl Modulo<f32,f32> for f32 {

branches/incoming/src/libcore/num/f64.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn sub(x: f64, y: f64) -> f64 { return x - y; }
149149
pub fn mul(x: f64, y: f64) -> f64 { return x * y; }
150150

151151
#[inline(always)]
152-
pub fn quot(x: f64, y: f64) -> f64 { return x / y; }
152+
pub fn div(x: f64, y: f64) -> f64 { return x / y; }
153153

154154
#[inline(always)]
155155
pub fn rem(x: f64, y: f64) -> f64 { return x % y; }
@@ -296,15 +296,10 @@ impl Sub<f64,f64> for f64 {
296296
impl Mul<f64,f64> for f64 {
297297
fn mul(&self, other: &f64) -> f64 { *self * *other }
298298
}
299-
#[cfg(stage0,notest)]
299+
#[cfg(notest)]
300300
impl Div<f64,f64> for f64 {
301301
fn div(&self, other: &f64) -> f64 { *self / *other }
302302
}
303-
#[cfg(not(stage0),notest)]
304-
impl Quot<f64,f64> for f64 {
305-
#[inline(always)]
306-
fn quot(&self, other: &f64) -> f64 { *self / *other }
307-
}
308303
#[cfg(stage0,notest)]
309304
impl Modulo<f64,f64> for f64 {
310305
fn modulo(&self, other: &f64) -> f64 { *self % *other }

branches/incoming/src/libcore/num/float.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use libc::c_int;
2525
use num::{Zero, One, strconv};
2626
use prelude::*;
2727

28-
pub use f64::{add, sub, mul, quot, rem, lt, le, eq, ne, ge, gt};
28+
pub use f64::{add, sub, mul, div, rem, lt, le, eq, ne, ge, gt};
2929
pub use f64::logarithm;
3030
pub use f64::{acos, asin, atan2, cbrt, ceil, copysign, cosh, floor};
3131
pub use f64::{erf, erfc, exp, expm1, exp2, abs_sub};
@@ -692,16 +692,12 @@ impl Mul<float,float> for float {
692692
fn mul(&self, other: &float) -> float { *self * *other }
693693
}
694694
695-
#[cfg(stage0,notest)]
695+
#[cfg(notest)]
696696
impl Div<float,float> for float {
697697
#[inline(always)]
698698
fn div(&self, other: &float) -> float { *self / *other }
699699
}
700-
#[cfg(not(stage0),notest)]
701-
impl Quot<float,float> for float {
702-
#[inline(always)]
703-
fn quot(&self, other: &float) -> float { *self / *other }
704-
}
700+
705701
#[cfg(stage0,notest)]
706702
impl Modulo<float,float> for float {
707703
#[inline(always)]

0 commit comments

Comments
 (0)