Skip to content

Commit 38119fa

Browse files
committed
---
yaml --- r: 56611 b: refs/heads/auto c: 5d79f94 h: refs/heads/master i: 56609: 0c5519c 56607: a3d83e3 v: v3
1 parent c07935c commit 38119fa

34 files changed

+264
-358
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: f67239fac3cc521fedaf14faf5357beab78caea8
17+
refs/heads/auto: 5d79f94a2f74a0502f665c5eb432aa7231666392
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/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-
`div`
1471-
: Elements have a division operation.
1470+
`quot`
1471+
: Elements have a quotient 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 `div` method on the `core::ops::Div` trait.
1860+
Calls the `quot` method on the `core::ops::Quot` trait.
18611861
`%`
18621862
: Remainder.
18631863
Calls the `rem` method on the `core::ops::Rem` trait.

branches/auto/mk/clean.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ clean-misc:
4848
$(Q)rm -f $(RUSTLLVM_LIB_OBJS) $(RUSTLLVM_OBJS_OBJS) $(RUSTLLVM_DEF)
4949
$(Q)rm -Rf $(DOCS)
5050
$(Q)rm -Rf $(GENERATED)
51-
$(Q)rm -f tmp/*
51+
$(Q)rm -f tmp/*.log tmp/*.rc tmp/*.rs tmp/*.ok
5252
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz dist
5353
$(Q)rm -Rf $(foreach ext, \
5454
html aux cp fn ky log pdf pg toc tp vr cps, \

branches/auto/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/auto/src/libcore/core.rc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ they contained the following prologue:
6363
#[warn(vecs_implicitly_copyable)];
6464
#[deny(non_camel_case_types)];
6565
#[allow(deprecated_mutable_fields)];
66-
#[allow(deprecated_drop)];
6766

6867
// Make core testable by not duplicating lang items. See #2912
6968
#[cfg(test)] extern mod realcore(name = "core", vers = "0.7-pre");
@@ -78,7 +77,7 @@ pub use ops::{Drop};
7877
#[cfg(stage0)]
7978
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not};
8079
#[cfg(not(stage0))]
81-
pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not};
80+
pub use ops::{Add, Sub, Mul, Quot, Rem, Neg, Not};
8281
pub use ops::{BitAnd, BitOr, BitXor};
8382
pub use ops::{Shl, Shr, Index};
8483

branches/auto/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/auto/src/libcore/num/f32.rs

Lines changed: 7 additions & 2 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 div(x: f32, y: f32) -> f32 { return x / y; }
126+
pub fn quot(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,11 +279,16 @@ impl Mul<f32,f32> for f32 {
279279
fn mul(&self, other: &f32) -> f32 { *self * *other }
280280
}
281281

282-
#[cfg(notest)]
282+
#[cfg(stage0,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+
}
287292

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

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

Lines changed: 7 additions & 2 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 div(x: f64, y: f64) -> f64 { return x / y; }
152+
pub fn quot(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,10 +296,15 @@ 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(notest)]
299+
#[cfg(stage0,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+
}
303308
#[cfg(stage0,notest)]
304309
impl Modulo<f64,f64> for f64 {
305310
fn modulo(&self, other: &f64) -> f64 { *self % *other }

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

Lines changed: 7 additions & 3 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, div, rem, lt, le, eq, ne, ge, gt};
28+
pub use f64::{add, sub, mul, quot, 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,12 +692,16 @@ impl Mul<float,float> for float {
692692
fn mul(&self, other: &float) -> float { *self * *other }
693693
}
694694
695-
#[cfg(notest)]
695+
#[cfg(stage0,notest)]
696696
impl Div<float,float> for float {
697697
#[inline(always)]
698698
fn div(&self, other: &float) -> float { *self / *other }
699699
}
700-
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+
}
701705
#[cfg(stage0,notest)]
702706
impl Modulo<float,float> for float {
703707
#[inline(always)]

0 commit comments

Comments
 (0)