Skip to content

Commit 9935c38

Browse files
committed
---
yaml --- r: 108539 b: refs/heads/dist-snap c: 351d0ff h: refs/heads/master i: 108537: d23c86e 108535: bf57ba5 v: v3
1 parent 95e77e4 commit 9935c38

Some content is hidden

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

77 files changed

+961
-1561
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: eb5ba4d2690f29c8ced9092fe4af719e27991bbc
9+
refs/heads/dist-snap: 351d0ffaa1027a3173c1a95e006c2efcc3d2ac02
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.travis.yml

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

branches/dist-snap/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Adrien Tétar <[email protected]>
77
Alan Andrade <[email protected]>
88
Aleksander Balicki <[email protected]>
99
Alex Crichton <[email protected]>
10-
Alex Lyon <[email protected]>
1110
Alex Rønne Petersen <[email protected]>
1211
Alexander Stavonin <[email protected]>
1312
Alexandros Tasos <[email protected]>

branches/dist-snap/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ then
604604
LLVM_VERSION=$($LLVM_CONFIG --version)
605605

606606
case $LLVM_VERSION in
607-
(3.[2-5]svn|3.[2-5])
607+
(3.[2-4]svn|3.[2-4])
608608
msg "found ok version of LLVM: $LLVM_VERSION"
609609
;;
610610
(*)
@@ -626,7 +626,7 @@ then
626626
| cut -d ' ' -f 2)
627627

628628
case $CFG_CLANG_VERSION in
629-
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* | 3.5* )
629+
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* )
630630
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
631631
CFG_C_COMPILER="clang"
632632
;;

branches/dist-snap/mk/crates.mk

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@
5050
################################################################################
5151

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

5858
DEPS_std := native:rustrt native:compiler-rt
59-
DEPS_extra := std term sync serialize getopts collections time
59+
DEPS_extra := std term sync serialize getopts collections
6060
DEPS_green := std native:context_switch
6161
DEPS_rustuv := std native:uv native:uv_support
6262
DEPS_native := std
6363
DEPS_syntax := std term serialize collections
6464
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
65-
collections time extra
65+
collections extra
6666
DEPS_rustdoc := rustc native:sundown serialize sync getopts collections \
67-
test time
67+
test
6868
DEPS_flate := std native:miniz
6969
DEPS_arena := std collections
7070
DEPS_glob := std
@@ -78,7 +78,6 @@ DEPS_collections := std serialize
7878
DEPS_fourcc := syntax std
7979
DEPS_num := std extra
8080
DEPS_test := std extra collections getopts serialize term
81-
DEPS_time := std serialize
8281

8382
TOOL_DEPS_compiletest := test green rustuv getopts
8483
TOOL_DEPS_rustdoc := rustdoc green rustuv

branches/dist-snap/mk/main.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,8 @@ LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt llvm-extract
218218
define DEF_LLVM_VARS
219219
# The configure script defines these variables with the target triples
220220
# separated by Z. This defines new ones with the expected format.
221-
ifeq ($$(CFG_LLVM_ROOT),)
222221
CFG_LLVM_BUILD_DIR_$(1):=$$(CFG_LLVM_BUILD_DIR_$(subst -,_,$(1)))
223222
CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_INST_DIR_$(subst -,_,$(1)))
224-
else
225-
CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_ROOT)
226-
endif
227223

228224
# Any rules that depend on LLVM should depend on LLVM_CONFIG
229225
LLVM_CONFIG_$(1):=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-config$$(X_$(1))

branches/dist-snap/src/doc/complement-cheatsheet.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ let y: int = x.unwrap();
2222

2323
**Int to string, in non-base-10**
2424

25-
Use the `format!` syntax extension.
25+
Use [`ToStrRadix`](http://static.rust-lang.org/doc/master/std/num/trait.ToStrRadix.html).
2626

2727
~~~
28+
use std::num::ToStrRadix;
29+
2830
let x: int = 42;
29-
let y: ~str = format!("{:t}", x); // binary
30-
let y: ~str = format!("{:o}", x); // octal
31-
let y: ~str = format!("{:x}", x); // lowercase hexadecimal
32-
let y: ~str = format!("{:X}", x); // uppercase hexidecimal
31+
let y: ~str = x.to_str_radix(16);
3332
~~~
3433

3534
**String to int, in non-base-10**

branches/dist-snap/src/doc/rust.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -752,35 +752,35 @@ mod task {
752752
#### View items
753753

754754
~~~~ {.ebnf .gram}
755-
view_item : extern_crate_decl | use_decl ;
755+
view_item : extern_mod_decl | use_decl ;
756756
~~~~
757757

758758
A view item manages the namespace of a module.
759759
View items do not define new items, but rather, simply change other items' visibility.
760760
There are several kinds of view item:
761761

762-
* [`extern crate` declarations](#extern-crate-declarations)
762+
* [`extern crate` declarations](#extern-mod-declarations)
763763
* [`use` declarations](#use-declarations)
764764

765-
##### Extern crate declarations
765+
##### Extern mod declarations
766766

767767
~~~~ {.ebnf .gram}
768-
extern_crate_decl : "extern" "crate" ident [ '(' link_attrs ')' ] ? [ '=' string_lit ] ? ;
768+
extern_mod_decl : "extern" "mod" ident [ '(' link_attrs ')' ] ? [ '=' string_lit ] ? ;
769769
link_attrs : link_attr [ ',' link_attrs ] + ;
770770
link_attr : ident '=' literal ;
771771
~~~~
772772

773773
An _`extern crate` declaration_ specifies a dependency on an external crate.
774-
The external crate is then bound into the declaring scope as the `ident` provided
775-
in the `extern_crate_decl`.
774+
The external crate is then bound into the declaring scope
775+
as the `ident` provided in the `extern_mod_decl`.
776776

777777
The external crate is resolved to a specific `soname` at compile time, and a
778778
runtime linkage requirement to that `soname` is passed to the linker for
779779
loading at runtime. The `soname` is resolved at compile time by scanning the
780780
compiler's library path and matching the optional `crateid` provided as a string literal
781781
against the `crateid` attributes that were declared on the external crate when
782782
it was compiled. If no `crateid` is provided, a default `name` attribute is
783-
assumed, equal to the `ident` given in the `extern_crate_decl`.
783+
assumed, equal to the `ident` given in the `extern_mod_decl`.
784784

785785
Four examples of `extern crate` declarations:
786786

@@ -813,7 +813,7 @@ module item. These declarations may appear at the top of [modules](#modules) and
813813

814814
*Note*: Unlike in many languages,
815815
`use` declarations in Rust do *not* declare linkage dependency with external crates.
816-
Rather, [`extern crate` declarations](#extern-crate-declarations) declare linkage dependencies.
816+
Rather, [`extern crate` declarations](#extern-mod-declarations) declare linkage dependencies.
817817

818818
Use declarations support a number of convenient shortcuts:
819819

@@ -875,14 +875,14 @@ An example of what will and will not work for `use` items:
875875

876876
~~~~
877877
# #[allow(unused_imports)];
878-
use foo::extra::json; // good: foo is at the root of the crate
878+
use foo::extra; // good: foo is at the root of the crate
879879
use foo::baz::foobaz; // good: foo is at the root of the crate
880880
881881
mod foo {
882882
extern crate extra;
883883
884-
use foo::extra::json; // good: foo is at crate root
885-
// use extra::json::*; // bad: extra is not at the crate root
884+
use foo::extra::time; // good: foo is at crate root
885+
// use extra::*; // bad: extra is not at the crate root
886886
use self::baz::foobaz; // good: self refers to module 'foo'
887887
use foo::bar::foobar; // good: foo is at crate root
888888

branches/dist-snap/src/doc/tutorial.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,8 @@ reject the previous example if the arm with the wildcard pattern was
495495
omitted.
496496

497497
A powerful application of pattern matching is *destructuring*:
498-
matching in order to bind names to the contents of data types.
498+
matching in order to bind names to the contents of data
499+
types.
499500

500501
> ***Note:*** The following code makes use of tuples (`(f64, f64)`) which
501502
> are explained in section 5.3. For now you can think of tuples as a list of
@@ -2725,8 +2726,7 @@ pub mod barn {
27252726

27262727
In short, `mod foo;` is just syntactic sugar for `mod foo { /* content of <...>/foo.rs or <...>/foo/mod.rs */ }`.
27272728

2728-
This also means that having two or more identical `mod foo;` declarations
2729-
somewhere in your crate hierarchy is generally a bad idea,
2729+
This also means that having two or more identical `mod foo;` declarations somewhere in your crate hierarchy is generally a bad idea,
27302730
just like copy-and-paste-ing a module into multiple places is a bad idea.
27312731
Both will result in duplicate and mutually incompatible definitions.
27322732

@@ -3074,6 +3074,11 @@ fn main() {
30743074
It's a bit weird, but it's the result of shadowing rules that have been set that way because
30753075
they model most closely what people expect to shadow.
30763076

3077+
## Package ids
3078+
3079+
If you use `extern crate`, per default `rustc` will look for libraries in the library search path (which you can
3080+
extend with the `-L` switch).
3081+
30773082
## Crate metadata and settings
30783083

30793084
For every crate you can define a number of metadata items, such as link name, version or author.
@@ -3091,13 +3096,14 @@ Therefore, if you plan to compile your crate as a library, you should annotate i
30913096
// `lib.rs`
30923097
30933098
# #[crate_type = "lib"];
3099+
// Package ID
30943100
#[crate_id = "farm#2.5"];
30953101
30963102
// ...
30973103
# fn farm() {}
30983104
~~~~
30993105

3100-
You can also specify crate id information in a `extern crate` statement. For
3106+
You can also specify package ID information in a `extern crate` statement. For
31013107
example, these `extern crate` statements would both accept and select the
31023108
crate define above:
31033109

@@ -3155,7 +3161,7 @@ Now compile and run like this (adjust to your platform if necessary):
31553161
Notice that the library produced contains the version in the file name
31563162
as well as an inscrutable string of alphanumerics. As explained in the previous paragraph,
31573163
these are both part of Rust's library versioning scheme. The alphanumerics are
3158-
a hash representing the crates id.
3164+
a hash representing the crates package ID.
31593165

31603166
## The standard library and the prelude
31613167

@@ -3225,7 +3231,8 @@ library. You can link to a library such as `extra` with an `extern crate extra;
32253231
[extra library]: extra/index.html
32263232

32273233
Right now `extra` contains those definitions directly, but in the future it will likely just
3228-
re-export a bunch of 'officially blessed' crates that get managed with a package manager.
3234+
re-export a bunch of 'officially blessed' crates that get managed with a
3235+
package manager.
32293236

32303237
# What next?
32313238

branches/dist-snap/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ syn keyword rustTrait Iterator DoubleEndedIterator RandomAccessIterator Cloneabl
8585
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
8686

8787
syn keyword rustTrait Algebraic Trigonometric Exponential Hyperbolic
88-
syn keyword rustTrait Bitwise Bounded Fractional
88+
syn keyword rustTrait Bitwise Bounded Integer
8989
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul CheckedDiv
9090
syn keyword rustTrait Orderable Signed Unsigned Round
9191
syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive

branches/dist-snap/src/libextra/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ Rust extras are part of the standard Rust distribution.
3737
extern crate sync;
3838
extern crate serialize;
3939
extern crate collections;
40-
extern crate time;
4140

4241
// Utility modules
4342
pub mod c_vec;
4443
pub mod url;
4544
pub mod json;
4645
pub mod tempfile;
46+
pub mod time;
4747
pub mod workcache;
4848
pub mod stats;
4949

branches/dist-snap/src/libtime/lib.rs renamed to branches/dist-snap/src/libextra/time.rs

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

11-
#[crate_id = "time#0.10-pre"];
12-
#[crate_type = "rlib"];
13-
#[crate_type = "dylib"];
14-
#[license = "MIT/ASL2"];
15-
1611
#[allow(missing_doc)];
1712

18-
extern crate serialize;
19-
2013
use std::io::BufReader;
2114
use std::libc;
2215
use std::num;
@@ -1042,8 +1035,7 @@ pub fn strftime(format: &str, tm: &Tm) -> ~str {
10421035
10431036
#[cfg(test)]
10441037
mod tests {
1045-
use super::{Timespec, get_time, precise_time_ns, precise_time_s, tzset,
1046-
at_utc, at, strptime};
1038+
use super::*;
10471039
10481040
use std::f64;
10491041
use std::result::{Err, Ok};

branches/dist-snap/src/libnum/bigint.rs

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

19-
use Integer;
20-
2119
use std::cmp;
2220
use std::cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
2321
use std::num::{Zero, One, ToStrRadix, FromStrRadix};
@@ -463,7 +461,7 @@ impl Integer for BigUint {
463461

464462
/// Returns `true` if the number can be divided by `other` without leaving a remainder
465463
#[inline]
466-
fn divides(&self, other: &BigUint) -> bool { (*self % *other).is_zero() }
464+
fn is_multiple_of(&self, other: &BigUint) -> bool { (*self % *other).is_zero() }
467465

468466
/// Returns `true` if the number is divisible by `2`
469467
#[inline]
@@ -1120,7 +1118,7 @@ impl Integer for BigInt {
11201118

11211119
/// Returns `true` if the number can be divided by `other` without leaving a remainder
11221120
#[inline]
1123-
fn divides(&self, other: &BigInt) -> bool { self.data.divides(&other.data) }
1121+
fn is_multiple_of(&self, other: &BigInt) -> bool { self.data.is_multiple_of(&other.data) }
11241122

11251123
/// Returns `true` if the number is divisible by `2`
11261124
#[inline]
@@ -1390,7 +1388,6 @@ impl BigInt {
13901388
13911389
#[cfg(test)]
13921390
mod biguint_tests {
1393-
use Integer;
13941391
use super::{BigDigit, BigUint, ToBigUint};
13951392
use super::{Plus, BigInt, RandBigInt, ToBigInt};
13961393
@@ -2048,7 +2045,6 @@ mod biguint_tests {
20482045

20492046
#[cfg(test)]
20502047
mod bigint_tests {
2051-
use Integer;
20522048
use super::{BigDigit, BigUint, ToBigUint};
20532049
use super::{Sign, Minus, Zero, Plus, BigInt, RandBigInt, ToBigInt};
20542050

0 commit comments

Comments
 (0)