Skip to content

Commit c4667f6

Browse files
committed
---
yaml --- r: 149088 b: refs/heads/try2 c: 47ece1f h: refs/heads/master v: v3
1 parent 6602083 commit c4667f6

File tree

17 files changed

+49
-100
lines changed

17 files changed

+49
-100
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 9e133d113ba45e146d091c699f5235052f798012
8+
refs/heads/try2: 47ece1fa2ceec10f171fe87f789191999e914675
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ endif
140140
# snapshot will be generated with a statically linked rustc so we only have to
141141
# worry about the distribution of one file (with its native dynamic
142142
# dependencies)
143-
RUSTFLAGS_STAGE0 += -Z prefer-dynamic
143+
#
144+
# NOTE: after a snapshot (stage0), put this on stage0 as well
144145
RUSTFLAGS_STAGE1 += -C prefer-dynamic
145146

146147
# platform-specific auto-configuration

branches/try2/mk/crates.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
################################################################################
5151

5252
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
53-
uuid serialize sync getopts collections num
54-
HOST_CRATES := syntax rustc rustdoc fourcc
53+
uuid serialize sync getopts collections fourcc
54+
HOST_CRATES := syntax rustc rustdoc
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
5757

@@ -75,7 +75,6 @@ DEPS_sync := std
7575
DEPS_getopts := std
7676
DEPS_collections := std serialize
7777
DEPS_fourcc := syntax std
78-
DEPS_num := std extra
7978

8079
TOOL_DEPS_compiletest := extra green rustuv getopts
8180
TOOL_DEPS_rustdoc := rustdoc green rustuv

branches/try2/src/doc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ li {list-style-type: none; }
3838
* [The Rust compiler, `librustc`](rustc/index.html)
3939

4040
* [The `arena` allocation library](arena/index.html)
41-
* [The `num` arbitrary precision numerics library](num/index.html)
4241
* [The `collections` library](collections/index.html)
4342
* [The `flate` compression library](flate/index.html)
4443
* [The `fourcc` four-character code library](fourcc/index.html)

branches/try2/src/doc/tutorial.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3026,12 +3026,12 @@ In Rust terminology, we need a way to refer to other crates.
30263026
For that, Rust offers you the `extern mod` declaration:
30273027

30283028
~~~
3029-
extern mod num;
3030-
// `num` ships with Rust (much like `extra`; more details further down).
3029+
extern mod extra;
3030+
// extra ships with Rust, you'll find more details further down.
30313031
30323032
fn main() {
30333033
// The rational number '1/2':
3034-
let one_half = ::num::rational::Ratio::new(1, 2);
3034+
let one_half = ::extra::rational::Ratio::new(1, 2);
30353035
}
30363036
~~~
30373037

@@ -3056,10 +3056,10 @@ of both `use` and local declarations.
30563056
Which can result in something like this:
30573057

30583058
~~~
3059-
extern mod num;
3059+
extern mod extra;
30603060
30613061
use farm::dog;
3062-
use num::rational::Ratio;
3062+
use extra::rational::Ratio;
30633063
30643064
mod farm {
30653065
pub fn dog() { println!("woof"); }
@@ -3224,9 +3224,9 @@ See the [API documentation][stddoc] for details.
32243224

32253225
## The extra library
32263226

3227-
Rust ships with crates such as the [extra library], an accumulation of useful things,
3227+
Rust also ships with the [extra library], an accumulation of useful things,
32283228
that are however not important enough to deserve a place in the standard
3229-
library. You can link to a library such as `extra` with an `extern mod extra;`.
3229+
library. You can use them by linking to `extra` with an `extern mod extra;`.
32303230

32313231
[extra library]: extra/index.html
32323232

branches/try2/src/libextra/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ pub mod time;
6262
pub mod base64;
6363
pub mod workcache;
6464
pub mod enum_set;
65+
#[path="num/bigint.rs"]
66+
pub mod bigint;
67+
#[path="num/rational.rs"]
68+
pub mod rational;
69+
#[path="num/complex.rs"]
70+
pub mod complex;
6571
pub mod stats;
6672
pub mod hex;
6773

branches/try2/src/libnum/bigint.rs renamed to branches/try2/src/libextra/num/bigint.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ A `BigUint` is represented as an array of `BigDigit`s.
1616
A `BigInt` is a combination of `BigUint` and `Sign`.
1717
*/
1818

19+
#[allow(missing_doc)];
20+
#[allow(non_uppercase_statics)];
21+
1922
use std::cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
2023
use std::num;
2124
use std::num::{Zero, One, ToStrRadix, FromStrRadix, Orderable};
@@ -45,7 +48,7 @@ pub type BigDigit = u32;
4548
pub static ZERO_BIG_DIGIT: BigDigit = 0;
4649

4750
pub mod BigDigit {
48-
use super::BigDigit;
51+
use bigint::BigDigit;
4952

5053
#[cfg(target_word_size = "32")]
5154
pub static bits: uint = 16;
@@ -1430,8 +1433,8 @@ impl BigInt {
14301433
14311434
#[cfg(test)]
14321435
mod biguint_tests {
1433-
use super::{BigDigit, BigUint, ToBigUint};
1434-
use super::{Plus, BigInt, RandBigInt, ToBigInt};
1436+
use super::*;
1437+
use super::RandBigInt;
14351438
14361439
use std::cmp::{Less, Equal, Greater};
14371440
use std::i64;
@@ -2087,8 +2090,8 @@ mod biguint_tests {
20872090

20882091
#[cfg(test)]
20892092
mod bigint_tests {
2090-
use super::{BigDigit, BigUint, ToBigUint};
2091-
use super::{Sign, Minus, Zero, Plus, BigInt, RandBigInt, ToBigInt};
2093+
use super::*;
2094+
use super::RandBigInt;
20922095

20932096
use std::cmp::{Less, Equal, Greater};
20942097
use std::i64;
@@ -2588,7 +2591,7 @@ mod bigint_tests {
25882591

25892592
#[cfg(test)]
25902593
mod bench {
2591-
use super::{BigInt, BigUint};
2594+
use super::*;
25922595
use std::iter;
25932596
use std::mem::replace;
25942597
use std::num::{FromPrimitive, Zero, One};

branches/try2/src/libnum/complex.rs renamed to branches/try2/src/libextra/num/complex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl<T: ToStrRadix + Num + Ord> ToStrRadix for Cmplx<T> {
191191
mod test {
192192
#[allow(non_uppercase_statics)];
193193

194-
use super::{Complex64, Cmplx};
194+
use super::*;
195195
use std::num::{Zero,One,Real};
196196

197197
pub static _0_0i : Complex64 = Cmplx { re: 0.0, im: 0.0 };
@@ -285,7 +285,7 @@ mod test {
285285
}
286286

287287
mod arith {
288-
use super::{_0_0i, _1_0i, _1_1i, _0_1i, _neg1_1i, _05_05i, all_consts};
288+
use super::*;
289289
use std::num::Zero;
290290

291291
#[test]

branches/try2/src/libnum/rational.rs renamed to branches/try2/src/libextra/num/rational.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,10 +10,11 @@
1010

1111
//! Rational numbers
1212
13+
1314
use std::cmp;
1415
use std::from_str::FromStr;
1516
use std::num::{Zero,One,ToStrRadix,FromStrRadix,Round};
16-
use bigint::{BigInt, BigUint, Sign, Plus, Minus};
17+
use super::bigint::{BigInt, BigUint, Sign, Plus, Minus};
1718

1819
/// Represents the ratio between 2 numbers.
1920
#[deriving(Clone)]
@@ -348,7 +349,7 @@ impl<T: FromStrRadix + Clone + Integer + Ord>
348349
#[cfg(test)]
349350
mod test {
350351

351-
use super::{Ratio, Rational, BigRational};
352+
use super::*;
352353
use std::num::{Zero,One,FromStrRadix,FromPrimitive};
353354
use std::from_str::FromStr;
354355

@@ -448,8 +449,8 @@ mod test {
448449

449450

450451
mod arith {
451-
use super::{_0, _1, _2, _1_2, _3_2, _neg1_2, to_big};
452-
use super::super::{Ratio, Rational, BigRational};
452+
use super::*;
453+
use super::super::*;
453454

454455

455456
#[test]

branches/try2/src/libnum/lib.rs

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

branches/try2/src/librustc/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ pub fn build_output_filenames(input: &Input,
10851085
// We want to toss everything after the final '.'
10861086
let dirpath = match *odir {
10871087
Some(ref d) => d.clone(),
1088-
None => Path::new(".")
1088+
None => os::getcwd(),
10891089
};
10901090

10911091
let mut stem = match *input {

branches/try2/src/libsyntax/ext/expand.rs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -394,20 +394,15 @@ pub fn expand_item_mac(it: @ast::Item, fld: &mut MacroExpander)
394394
pub fn expand_view_item(vi: &ast::ViewItem,
395395
fld: &mut MacroExpander)
396396
-> ast::ViewItem {
397-
match vi.node {
398-
ast::ViewItemExternMod(..) => {
399-
let should_load = vi.attrs.iter().any(|attr| {
400-
attr.name().get() == "phase" &&
401-
attr.meta_item_list().map_or(false, |phases| {
402-
attr::contains_name(phases, "syntax")
403-
})
404-
});
397+
let should_load = vi.attrs.iter().any(|attr| {
398+
attr.name().get() == "phase" &&
399+
attr.meta_item_list().map_or(false, |phases| {
400+
attr::contains_name(phases, "syntax")
401+
})
402+
});
405403

406-
if should_load {
407-
load_extern_macros(vi, fld);
408-
}
409-
}
410-
ast::ViewItemUse(_) => {}
404+
if should_load {
405+
load_extern_macros(vi, fld);
411406
}
412407

413408
noop_fold_view_item(vi, fld)

branches/try2/src/libsyntax/parse/token.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,6 @@ declare_special_idents_and_keywords! {
492492
(53, Typeof, "typeof");
493493
(54, Unsized, "unsized");
494494
(55, Yield, "yield");
495-
(56, Do, "do");
496495
}
497496
}
498497

branches/try2/src/test/bench/shootout-pidigits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
extern mod num;
11+
extern mod extra;
1212

1313
use std::from_str::FromStr;
1414
use std::num::One;
1515
use std::num::Zero;
1616
use std::num::FromPrimitive;
17-
use num::bigint::BigInt;
17+
use extra::bigint::BigInt;
1818

1919
struct Context {
2020
numer: BigInt,

branches/try2/src/test/compile-fail/keyword-do-as-identifier.rs

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

branches/try2/src/test/run-pass/phase-use-ignored.rs

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

branches/try2/src/test/run-pass/temporary-lifetime-for-conditions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl Drop for Temporary {
2323
}
2424

2525
impl Temporary {
26-
fn do_stuff(&self) -> bool {true}
26+
fn do(&self) -> bool {true}
2727
}
2828

2929
fn borrow() -> ~Temporary { ~Temporary }
@@ -35,7 +35,7 @@ pub fn main() {
3535
// This loop's condition
3636
// should call `Temporary`'s
3737
// `drop` 6 times.
38-
while borrow().do_stuff() {
38+
while borrow().do() {
3939
i += 1;
4040
if i > 5 {
4141
break;
@@ -44,7 +44,7 @@ pub fn main() {
4444

4545
// This if condition should
4646
// call it 1 time
47-
if borrow().do_stuff() {
47+
if borrow().do() {
4848
unsafe { assert_eq!(DROPPED, 7) }
4949
}
5050
}

0 commit comments

Comments
 (0)