Skip to content

Commit c112ce8

Browse files
committed
---
yaml --- r: 149499 b: refs/heads/try2 c: eb33955 h: refs/heads/master i: 149497: b973aa7 149495: ec3f84a v: v3
1 parent 6466401 commit c112ce8

File tree

267 files changed

+2399
-1932
lines changed

Some content is hidden

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

267 files changed

+2399
-1932
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: 623e475146670f64d1cfec0e5924d82d46729724
8+
refs/heads/try2: eb3395574129cd3e5d49db77ade300d1b8d0b350
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.travis.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Use something that's not 'ruby' so we don't set up things like
2+
# RVM/bundler/ruby and whatnot. Right now 'rust' isn't a language on travis and
3+
# it treats unknown languages as ruby-like I believe.
4+
language: c
5+
6+
# Before we start doing anything, install the latest stock LLVM. These are
7+
# maintained by LLVM, and more information can be found at llvm.org/apt.
8+
#
9+
# Right now, the highest version is 3.5, and our SVN version is roughly aligned
10+
# with the 3.5 API (hurray!)
11+
install:
12+
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main' >> /etc/apt/sources.list"
13+
- sudo sh -c "echo 'deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise main' >> /etc/apt/sources.list"
14+
- sudo sh -c "echo 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main' >> /etc/apt/sources.list"
15+
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
16+
- sudo apt-get update -qq
17+
- sudo apt-get install -y --force-yes -qq llvm-3.5 llvm-3.5-dev clang-3.5 lldb-3.5
18+
19+
# All of the llvm tools are suffixed with "-3.5" which we don't want, so symlink
20+
# them all into a local directory and just use that
21+
#
22+
# FIXME: this shouldn't update the src/llvm sub-repo, that takes about a minute
23+
# it's gotta download so much stuff.
24+
before_script:
25+
- mkdir -p local-llvm/bin
26+
- ln -nsf /usr/bin/llvm-config-3.5 local-llvm/bin/llvm-config
27+
- ln -nsf /usr/bin/llvm-mc-3.5 local-llvm/bin/llvm-mc
28+
- ln -nsf /usr/bin/llvm-as-3.5 local-llvm/bin/llvm-as
29+
- ln -nsf /usr/bin/llvm-dis-3.5 local-llvm/bin/llvm-dis
30+
- ln -nsf /usr/bin/llc-3.5 local-llvm/bin/llc
31+
- ln -nsf /usr/include/llvm-3.5 local-llvm/include
32+
- ./configure --disable-optimize-tests --llvm-root=`pwd`/local-llvm --enable-fast-make --enable-clang
33+
34+
# Tidy everything up first, then build a few things, and then run a few tests.
35+
# Note that this is meant to run in a "fairly small" amount of time, so this
36+
# isn't exhaustive at all.
37+
#
38+
# The "-lffi and -lncurses" are required for LLVM. The LLVM that rust builds
39+
# manually disables bringing in these two libraries, but the stock LLVM was
40+
# apparently built with these options. We provide these options when building so
41+
# the `rustc` binary can successfully link.
42+
script:
43+
- make tidy
44+
- RUSTFLAGS="-C link-args='-lffi -lncurses'" make -j4 rustc-stage1
45+
- make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail
46+
47+
env:
48+
- NO_BENCH=1
49+
50+
# We track this ourselves, and in theory we don't have to update the LLVM repo
51+
# (but sadly we do right now anyway).
52+
git:
53+
submodules: false

branches/try2/AUTHORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ 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]>
1011
Alex Rønne Petersen <[email protected]>
1112
Alexander Stavonin <[email protected]>
1213
Alexandros Tasos <[email protected]>

branches/try2/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-4]svn|3.[2-4])
607+
(3.[2-5]svn|3.[2-5])
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* )
629+
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* | 3.5* )
630630
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
631631
CFG_C_COMPILER="clang"
632632
;;

branches/try2/mk/crates.mk

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

5252
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
53-
uuid serialize sync getopts collections num test
53+
uuid serialize sync getopts collections num test time
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
59+
DEPS_extra := std term sync serialize getopts collections time
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 extra
65+
collections time extra
6666
DEPS_rustdoc := rustc native:sundown serialize sync getopts collections \
67-
test
67+
test time
6868
DEPS_flate := std native:miniz
6969
DEPS_arena := std collections
7070
DEPS_glob := std
7171
DEPS_serialize := std
72-
DEPS_term := std
72+
DEPS_term := std collections
7373
DEPS_semver := std
7474
DEPS_uuid := std serialize
7575
DEPS_sync := std
@@ -78,6 +78,7 @@ 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
8182

8283
TOOL_DEPS_compiletest := test green rustuv getopts
8384
TOOL_DEPS_rustdoc := rustdoc green rustuv

branches/try2/mk/main.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,12 @@ 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),)
221222
CFG_LLVM_BUILD_DIR_$(1):=$$(CFG_LLVM_BUILD_DIR_$(subst -,_,$(1)))
222223
CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_INST_DIR_$(subst -,_,$(1)))
224+
else
225+
CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_ROOT)
226+
endif
223227

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

branches/try2/mk/prepare.mk

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
# It requires the following variables to be set:
1818
#
19-
# PREPARE_HOST - the host triple
19+
# PREPARE_HOST - the host triple
2020
# PREPARE_TARGETS - the target triples, space separated
2121
# PREPARE_DEST_DIR - the directory to put the image
2222

@@ -172,7 +172,10 @@ prepare-target-$(2)-host-$(3)-$(1): \
172172
$$(if $$(findstring $(2),$$(CFG_HOST)), \
173173
$$(foreach crate,$$(HOST_CRATES), \
174174
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)),)
175-
# Only install if this host and target combo is being prepared
175+
# Only install if this host and target combo is being prepared. Also be sure to
176+
# *not* install the rlibs for host crates because there's no need to statically
177+
# link against most of them. They just produce a large amount of extra size
178+
# bloat.
176179
$$(if $$(findstring $(1), $$(PREPARE_STAGE)),\
177180
$$(if $$(findstring $(2), $$(PREPARE_TARGETS)),\
178181
$$(if $$(findstring $(3), $$(PREPARE_HOST)),\
@@ -182,8 +185,7 @@ prepare-target-$(2)-host-$(3)-$(1): \
182185
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate))))\
183186
$$(if $$(findstring $(2),$$(CFG_HOST)),\
184187
$$(foreach crate,$$(HOST_CRATES),\
185-
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))\
186-
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate)))),)\
188+
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))),)\
187189
$$(call PREPARE_LIB,libmorestack.a) \
188190
$$(call PREPARE_LIB,libcompiler-rt.a),),),)
189191
endef

branches/try2/src/doc/complement-cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Description C signature Equivalent
211211
---------------------- ---------------------------------------------- ------------------------------------------
212212
no parameters `void foo(void);` `fn foo();`
213213
return value `int foo(void);` `fn foo() -> c_int;`
214-
function parameters `void foo(int x, int y);` `fn foo(x: int, y: int);`
214+
function parameters `void foo(int x, int y);` `fn foo(x: c_int, y: c_int);`
215215
in-out pointers `void foo(const int* in_ptr, int* out_ptr);` `fn foo(in_ptr: *c_int, out_ptr: *mut c_int);`
216216
217217
Note: The Rust signatures should be wrapped in an `extern "ABI" { ... }` block.

branches/try2/src/doc/guide-container.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ order.
3838
Each `HashMap` instance has a random 128-bit key to use with a keyed hash,
3939
making the order of a set of keys in a given hash table randomized. Rust
4040
provides a [SipHash](https://131002.net/siphash/) implementation for any type
41-
implementing the `IterBytes` trait.
41+
implementing the `Hash` trait.
4242

4343
## Double-ended queues
4444

@@ -186,12 +186,12 @@ let mut calls = 0;
186186
let it = xs.iter().scan((), |_, x| {
187187
calls += 1;
188188
if *x < 3 { Some(x) } else { None }});
189-
189+
190190
// the iterator will only yield 1 and 2 before returning None
191191
// If we were to call it 5 times, calls would end up as 5, despite
192192
// only 2 values being yielded (and therefore 3 unique calls being
193193
// made). The fuse() adaptor can fix this.
194-
194+
195195
let mut it = it.fuse();
196196
it.next();
197197
it.next();

branches/try2/src/doc/po/ja/tutorial.md.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4421,15 +4421,15 @@ msgstr ""
44214421
#, fuzzy
44224422
#| msgid ""
44234423
#| "The full list of derivable traits is `Eq`, `TotalEq`, `Ord`, `TotalOrd`, "
4424-
#| "`Encodable` `Decodable`, `Clone`, `DeepClone`, `IterBytes`, `Rand`, "
4424+
#| "`Encodable` `Decodable`, `Clone`, `DeepClone`, `Hash`, `Rand`, "
44254425
#| "`Zero`, and `ToStr`."
44264426
msgid ""
44274427
"The full list of derivable traits is `Eq`, `TotalEq`, `Ord`, `TotalOrd`, "
4428-
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `IterBytes`, `Rand`, "
4428+
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `Hash`, `Rand`, "
44294429
"`Default`, `Zero`, and `ToStr`."
44304430
msgstr ""
44314431
"実装を自動的に導出可能なトレイトは、 `Eq`, `TotalEq`, `Ord`, `TotalOrd`, "
4432-
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `IterBytes`, `Rand`, `Zero`, "
4432+
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `Hash`, `Rand`, `Zero`, "
44334433
"および `ToStr` です。."
44344434

44354435
#. type: Plain text

branches/try2/src/doc/rust.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ expression context, the final namespace qualifier is omitted.
467467
Two examples of paths with type arguments:
468468

469469
~~~~
470-
# use std::hashmap::HashMap;
470+
# struct HashMap<K, V>;
471471
# fn f() {
472472
# fn id<T>(t: T) -> T { t }
473473
type T = HashMap<int,~str>; // Type arguments used in a type expression
@@ -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; // good: foo is at the root of the crate
878+
use foo::extra::json; // 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::time; // good: foo is at crate root
885-
// use extra::*; // bad: extra is not at the crate root
884+
use foo::extra::json; // good: foo is at crate root
885+
// use extra::json::*; // 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
@@ -2035,7 +2035,7 @@ Supported traits for `deriving` are:
20352035
* Comparison traits: `Eq`, `TotalEq`, `Ord`, `TotalOrd`.
20362036
* Serialization: `Encodable`, `Decodable`. These require `serialize`.
20372037
* `Clone` and `DeepClone`, to perform (deep) copies.
2038-
* `IterBytes`, to iterate over the bytes in a data type.
2038+
* `Hash`, to iterate over the bytes in a data type.
20392039
* `Rand`, to create a random instance of a data type.
20402040
* `Default`, to create an empty instance of a data type.
20412041
* `Zero`, to create an zero instance of a numeric data type.

branches/try2/src/doc/tutorial.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ type was invalid because the size was infinite!
10261026

10271027
An *owned box* (`~`) uses a dynamic memory allocation to provide the invariant
10281028
of always being the size of a pointer, regardless of the contained type. This
1029-
can be leverage to create a valid `List` definition:
1029+
can be leveraged to create a valid `List` definition:
10301030

10311031
~~~
10321032
enum List {
@@ -1977,8 +1977,8 @@ illegal to copy and pass by value.
19771977
Generic `type`, `struct`, and `enum` declarations follow the same pattern:
19781978
19791979
~~~~
1980-
use std::hashmap::HashMap;
1981-
type Set<T> = HashMap<T, ()>;
1980+
extern crate collections;
1981+
type Set<T> = collections::HashMap<T, ()>;
19821982
19831983
struct Stack<T> {
19841984
elements: ~[T]
@@ -1988,6 +1988,7 @@ enum Option<T> {
19881988
Some(T),
19891989
None
19901990
}
1991+
# fn main() {}
19911992
~~~~
19921993
19931994
These declarations can be instantiated to valid types like `Set<int>`,
@@ -2524,7 +2525,7 @@ enum ABC { A, B, C }
25242525

25252526
The full list of derivable traits is `Eq`, `TotalEq`, `Ord`,
25262527
`TotalOrd`, `Encodable` `Decodable`, `Clone`, `DeepClone`,
2527-
`IterBytes`, `Rand`, `Default`, `Zero`, `FromPrimitive` and `Show`.
2528+
`Hash`, `Rand`, `Default`, `Zero`, `FromPrimitive` and `Show`.
25282529

25292530
# Crates and the module system
25302531

branches/try2/src/etc/combine-tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def scrub(b):
5555
#[crate_id=\"run_pass_stage2#0.1\"];
5656
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
5757
#[allow(warnings)];
58+
extern crate collections;
59+
extern crate extra;
5860
"""
5961
)
6062
for t in stage2_tests:

branches/try2/src/etc/generate-deriving-span-tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def write_file(name, string):
119119
('Clone', [], 1), ('DeepClone', ['Clone'], 1),
120120
('Eq', [], 2), ('Ord', [], 8),
121121
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1),
122-
('Show', [], 1)]:
122+
('Show', [], 1),
123+
('Hash', [], 1)]:
123124
traits[trait] = (ALL, supers, errs)
124125

125126
for (trait, (types, super_traits, error_count)) in traits.items():

branches/try2/src/etc/vim/syntax/rust.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ syn keyword rustTrait GenericPath Path PosixPath WindowsPath
9393
syn keyword rustTrait RawPtr
9494
syn keyword rustTrait Buffer Writer Reader Seek
9595
syn keyword rustTrait Str StrVector StrSlice OwnedStr IntoMaybeOwned
96-
syn keyword rustTrait IterBytes
9796
syn keyword rustTrait ToStr IntoStr
9897
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
9998
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8

0 commit comments

Comments
 (0)