Skip to content

Commit 4ff283d

Browse files
committed
---
yaml --- r: 161526 b: refs/heads/snap-stage3 c: 74fb798 h: refs/heads/master v: v3
1 parent 434375d commit 4ff283d

File tree

214 files changed

+4935
-5106
lines changed

Some content is hidden

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

214 files changed

+4935
-5106
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 4eb72d268f337a8f117c86a2ac1b98336cab9e9d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ea8bb5d18d6bfff644631a1692eea1e429566298
4+
refs/heads/snap-stage3: 74fb798a200dc82cf5b4a18065e3ea565229adc3
55
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/mk/crates.mk

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test time rand \
5454
log regex graphviz core rbml alloc rustrt \
5555
unicode
56-
RUSTC_CRATES := rustc rustc_typeck rustc_driver rustc_trans rustc_back rustc_llvm
57-
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc regex_macros fmt_macros
56+
HOST_CRATES := syntax rustc rustc_trans rustdoc regex_macros fmt_macros \
57+
rustc_llvm rustc_back
5858
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
6060

@@ -67,16 +67,12 @@ DEPS_std := core libc rand alloc collections rustrt unicode \
6767
native:rust_builtin native:backtrace
6868
DEPS_graphviz := std
6969
DEPS_syntax := std term serialize log fmt_macros arena libc
70-
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back \
71-
rustc_typeck log syntax serialize rustc_llvm rustc_trans
72-
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
73-
log syntax serialize rustc_llvm
74-
DEPS_rustc_typeck := rustc syntax
70+
DEPS_rustc_trans := rustc rustc_back rustc_llvm libc
7571
DEPS_rustc := syntax flate arena serialize getopts rbml \
7672
time log graphviz rustc_llvm rustc_back
7773
DEPS_rustc_llvm := native:rustllvm libc std
7874
DEPS_rustc_back := std syntax rustc_llvm flate log libc
79-
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
75+
DEPS_rustdoc := rustc rustc_trans native:hoedown serialize getopts \
8076
test time
8177
DEPS_flate := std native:miniz
8278
DEPS_arena := std
@@ -98,7 +94,7 @@ DEPS_fmt_macros = std
9894

9995
TOOL_DEPS_compiletest := test getopts
10096
TOOL_DEPS_rustdoc := rustdoc
101-
TOOL_DEPS_rustc := rustc_driver
97+
TOOL_DEPS_rustc := rustc_trans
10298
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
10399
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
104100
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
@@ -114,12 +110,8 @@ ONLY_RLIB_unicode := 1
114110
# You should not need to edit below this line
115111
################################################################################
116112

117-
DOC_CRATES := $(filter-out rustc, \
118-
$(filter-out rustc_trans, \
119-
$(filter-out rustc_typeck, \
120-
$(filter-out rustc_driver, \
121-
$(filter-out syntax, $(CRATES))))))
122-
COMPILER_DOC_CRATES := rustc rustc_trans rustc_typeck rustc_driver syntax
113+
DOC_CRATES := $(filter-out rustc, $(filter-out rustc_trans, $(filter-out syntax, $(CRATES))))
114+
COMPILER_DOC_CRATES := rustc rustc_trans syntax
123115

124116
# This macro creates some simple definitions for each crate being built, just
125117
# some munging of all of the parameters above.

branches/snap-stage3/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $(eval $(call RUST_CRATE,coretest))
2121

2222
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
2323
TEST_DOC_CRATES = $(DOC_CRATES)
24-
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_trans,$(HOST_CRATES))
24+
TEST_HOST_CRATES = $(HOST_CRATES)
2525
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2626

2727
######################################################################

branches/snap-stage3/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ The two values of the boolean type are written `true` and `false`.
522522
### Symbols
523523

524524
```{.ebnf .gram}
525-
symbol : "::" | "->"
525+
symbol : "::" "->"
526526
| '#' | '[' | ']' | '(' | ')' | '{' | '}'
527527
| ',' | ';' ;
528528
```

branches/snap-stage3/src/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
extern crate "rustdoc" as this;
1313

1414
#[cfg(rustc)]
15-
extern crate "rustc_driver" as this;
15+
extern crate "rustc_trans" as this;
1616

1717
fn main() { this::main() }

branches/snap-stage3/src/etc/licenseck.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838
"rt/isaac/randport.cpp", # public domain
3939
"rt/isaac/rand.h", # public domain
4040
"rt/isaac/standard.h", # public domain
41-
"libstd/comm/mpsc_queue.rs", # BSD
42-
"libstd/comm/spsc_queue.rs", # BSD
41+
"libstd/sync/mpsc_queue.rs", # BSD
42+
"libstd/sync/spsc_queue.rs", # BSD
43+
"libstd/sync/mpmc_bounded_queue.rs", # BSD
4344
"test/bench/shootout-binarytrees.rs", # BSD
4445
"test/bench/shootout-chameneos-redux.rs", # BSD
4546
"test/bench/shootout-fannkuch-redux.rs", # BSD

branches/snap-stage3/src/etc/rustup.sh

100755100644
Lines changed: 65 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ flag() {
188188
fi
189189
}
190190

191-
validate_opt() {
191+
validate_opt () {
192192
for arg in $CFG_ARGS
193193
do
194194
isArgValid=0
@@ -230,7 +230,6 @@ validate_opt() {
230230
}
231231

232232
probe_need CFG_CURL curl
233-
probe_need CFG_TAR tar
234233

235234
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
236235
CFG_SELF="$0"
@@ -389,109 +388,89 @@ esac
389388

390389
msg "host triple: ${HOST_TRIPLE}"
391390

392-
CFG_INSTALL_FLAGS=""
393-
if [ -n "${CFG_UNINSTALL}" ]
394-
then
395-
CFG_INSTALL_FLAGS="${CFG_INSTALL_FLAGS} --uninstall"
396-
fi
397-
398-
if [ -n "${CFG_PREFIX}" ]
399-
then
400-
CFG_INSTALL_FLAGS="${CFG_INSTALL_FLAGS} --prefix=${CFG_PREFIX}"
401-
fi
402-
403-
CFG_TMP_DIR="./rustup-tmp-install"
391+
PACKAGE_NAME=rust-nightly
392+
PACKAGE_NAME_AND_TRIPLE="${PACKAGE_NAME}-${HOST_TRIPLE}"
393+
TARBALL_NAME="${PACKAGE_NAME_AND_TRIPLE}.tar.gz"
394+
REMOTE_TARBALL="https://static.rust-lang.org/dist/${TARBALL_NAME}"
395+
TMP_DIR="./rustup-tmp-install"
396+
LOCAL_TARBALL="${TMP_DIR}/${TARBALL_NAME}"
397+
LOCAL_INSTALL_DIR="${TMP_DIR}/${PACKAGE_NAME_AND_TRIPLE}"
398+
LOCAL_INSTALL_SCRIPT="${LOCAL_INSTALL_DIR}/install.sh"
404399

405-
RUST_URL="https://static.rust-lang.org/dist"
406-
RUST_PACKAGE_NAME=rust-nightly
407-
RUST_PACKAGE_NAME_AND_TRIPLE="${RUST_PACKAGE_NAME}-${HOST_TRIPLE}"
408-
RUST_TARBALL_NAME="${RUST_PACKAGE_NAME_AND_TRIPLE}.tar.gz"
409-
RUST_LOCAL_INSTALL_DIR="${CFG_TMP_DIR}/${RUST_PACKAGE_NAME_AND_TRIPLE}"
410-
RUST_LOCAL_INSTALL_SCRIPT="${RUST_LOCAL_INSTALL_DIR}/install.sh"
411-
412-
CARGO_URL="https://static.rust-lang.org/cargo-dist"
413400
CARGO_PACKAGE_NAME=cargo-nightly
414401
CARGO_PACKAGE_NAME_AND_TRIPLE="${CARGO_PACKAGE_NAME}-${HOST_TRIPLE}"
415402
CARGO_TARBALL_NAME="${CARGO_PACKAGE_NAME_AND_TRIPLE}.tar.gz"
416-
CARGO_LOCAL_INSTALL_DIR="${CFG_TMP_DIR}/${CARGO_PACKAGE_NAME_AND_TRIPLE}"
403+
CARGO_REMOTE_TARBALL="https://static.rust-lang.org/cargo-dist/${CARGO_TARBALL_NAME}"
404+
CARGO_LOCAL_TARBALL="${TMP_DIR}/${CARGO_TARBALL_NAME}"
405+
CARGO_LOCAL_INSTALL_DIR="${TMP_DIR}/${CARGO_PACKAGE_NAME_AND_TRIPLE}"
417406
CARGO_LOCAL_INSTALL_SCRIPT="${CARGO_LOCAL_INSTALL_DIR}/install.sh"
418407

419-
# Fetch the package.
420-
download_package() {
421-
remote_tarball="$1"
422-
local_tarball="$2"
408+
rm -Rf "${TMP_DIR}"
409+
need_ok "failed to remove temporary installation directory"
423410

424-
msg "Downloading ${remote_tarball} to ${local_tarball}"
411+
mkdir -p "${TMP_DIR}"
412+
need_ok "failed to create create temporary installation directory"
425413

426-
mkdir -p "${CFG_TMP_DIR}"
427-
need_ok "failed to create create download directory"
414+
msg "downloading rust installer"
415+
"${CFG_CURL}" "${REMOTE_TARBALL}" > "${LOCAL_TARBALL}"
416+
if [ $? -ne 0 ]
417+
then
418+
rm -Rf "${TMP_DIR}"
419+
err "failed to download installer"
420+
fi
428421

429-
"${CFG_CURL}" -f -o "${local_tarball}" "${remote_tarball}"
422+
if [ -z "${CFG_DISABLE_CARGO}" ]; then
423+
msg "downloading cargo installer"
424+
"${CFG_CURL}" "${CARGO_REMOTE_TARBALL}" > "${CARGO_LOCAL_TARBALL}"
430425
if [ $? -ne 0 ]
431426
then
432-
rm -Rf "${CFG_TMP_DIR}"
433-
err "failed to download installer"
427+
rm -Rf "${TMP_DIR}"
428+
err "failed to download cargo installer"
434429
fi
435-
}
430+
fi
436431

437-
# Wrap all the commands needed to install a package.
438-
install_package() {
439-
tarball_name="$1"
440-
install_script="$2"
441432

442-
msg "Extracting ${tarball_name}"
443-
(cd "${CFG_TMP_DIR}" && "${CFG_TAR}" -xvf "${tarball_name}")
444-
if [ $? -ne 0 ]; then
445-
rm -Rf "${CFG_TMP_DIR}"
433+
(cd "${TMP_DIR}" && tar xzf "${TARBALL_NAME}")
434+
if [ $? -ne 0 ]
435+
then
436+
rm -Rf "${TMP_DIR}"
446437
err "failed to unpack installer"
447-
fi
438+
fi
448439

449-
sh "${install_script}" "${CFG_INSTALL_FLAGS}"
450-
if [ $? -ne 0 ]
451-
then
452-
rm -Rf "${CFG_TMP_DIR}"
453-
err "failed to install Rust"
454-
fi
455-
}
440+
MAYBE_UNINSTALL=
441+
if [ -n "${CFG_UNINSTALL}" ]
442+
then
443+
MAYBE_UNINSTALL="--uninstall"
444+
fi
456445

457-
# It's possible that curl could be interrupted partway though downloading
458-
# `rustup.sh`, truncating the file. This could be especially bad if we were in
459-
# the middle of a line that would run "rm -rf ". To protect against this, we
460-
# wrap up the `rustup.sh` destructive functionality in this helper function,
461-
# which we call as the last thing we do. This means we will not do anything
462-
# unless we have the entire file downloaded.
463-
install_packages() {
464-
rm -Rf "${CFG_TMP_DIR}"
465-
need_ok "failed to remove temporary installation directory"
466-
467-
mkdir -p "${CFG_TMP_DIR}"
468-
need_ok "failed to create create temporary installation directory"
469-
470-
RUST_LOCAL_TARBALL="${CFG_TMP_DIR}/${RUST_TARBALL_NAME}"
471-
CARGO_LOCAL_TARBALL="${CFG_TMP_DIR}/${CARGO_TARBALL_NAME}"
472-
473-
download_package \
474-
"${RUST_URL}/${RUST_TARBALL_NAME}" \
475-
"${RUST_LOCAL_TARBALL}"
476-
477-
if [ -z "${CFG_DISABLE_CARGO}" ]; then
478-
download_package \
479-
"${CARGO_URL}/${CARGO_TARBALL_NAME}" \
480-
"${CARGO_LOCAL_TARBALL}"
481-
fi
446+
MAYBE_PREFIX=
447+
if [ -n "${CFG_PREFIX}" ]
448+
then
449+
MAYBE_PREFIX="--prefix=${CFG_PREFIX}"
450+
fi
482451

483-
install_package \
484-
"${RUST_TARBALL_NAME}" \
485-
"${RUST_LOCAL_INSTALL_SCRIPT}"
452+
sh "${LOCAL_INSTALL_SCRIPT}" "${MAYBE_UNINSTALL}" "${MAYBE_PREFIX}"
453+
if [ $? -ne 0 ]
454+
then
455+
rm -Rf "${TMP_DIR}"
456+
err "failed to install Rust"
457+
fi
486458

487-
if [ -z "${CFG_DISABLE_CARGO}" ]; then
488-
install_package \
489-
"${CARGO_TARBALL_NAME}" \
490-
"${CARGO_LOCAL_INSTALL_SCRIPT}"
459+
if [ -z "${CFG_DISABLE_CARGO}" ]; then
460+
(cd "${TMP_DIR}" && tar xzf "${CARGO_TARBALL_NAME}")
461+
if [ $? -ne 0 ]
462+
then
463+
rm -Rf "${TMP_DIR}"
464+
err "failed to unpack cargo installer"
491465
fi
492466

493-
rm -Rf "${CFG_TMP_DIR}"
494-
need_ok "couldn't rm temporary installation directory"
495-
}
467+
sh "${CARGO_LOCAL_INSTALL_SCRIPT}" "${MAYBE_UNINSTALL}" "${MAYBE_PREFIX}"
468+
if [ $? -ne 0 ]
469+
then
470+
rm -Rf "${TMP_DIR}"
471+
err "failed to install Cargo"
472+
fi
473+
fi
496474

497-
install_packages
475+
rm -Rf "${TMP_DIR}"
476+
need_ok "couldn't rm temporary installation directory"

branches/snap-stage3/src/libcollections/dlist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,15 +945,15 @@ mod tests {
945945
let mut m = list_from(v.as_slice());
946946
m.rotate_backward(); check_links(&m);
947947
m.rotate_forward(); check_links(&m);
948-
assert_eq!(v.iter().collect::<Vec<&int>>(), m.iter().collect::<Vec<_>>());
948+
assert_eq!(v.iter().collect::<Vec<&int>>(), m.iter().collect());
949949
m.rotate_forward(); check_links(&m);
950950
m.rotate_forward(); check_links(&m);
951951
m.pop_front(); check_links(&m);
952952
m.rotate_forward(); check_links(&m);
953953
m.rotate_backward(); check_links(&m);
954954
m.push_front(9); check_links(&m);
955955
m.rotate_forward(); check_links(&m);
956-
assert_eq!(vec![3i,9,5,1,2], m.into_iter().collect::<Vec<_>>());
956+
assert_eq!(vec![3i,9,5,1,2], m.into_iter().collect());
957957
}
958958

959959
#[test]

branches/snap-stage3/src/libcollections/enum_set.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -397,23 +397,23 @@ mod test {
397397
fn test_iterator() {
398398
let mut e1: EnumSet<Foo> = EnumSet::new();
399399

400-
let elems: ::vec::Vec<Foo> = e1.iter().collect();
400+
let elems: Vec<Foo> = e1.iter().collect();
401401
assert!(elems.is_empty())
402402

403403
e1.insert(A);
404-
let elems: ::vec::Vec<_> = e1.iter().collect();
404+
let elems = e1.iter().collect();
405405
assert_eq!(vec![A], elems)
406406

407407
e1.insert(C);
408-
let elems: ::vec::Vec<_> = e1.iter().collect();
408+
let elems = e1.iter().collect();
409409
assert_eq!(vec![A,C], elems)
410410

411411
e1.insert(C);
412-
let elems: ::vec::Vec<_> = e1.iter().collect();
412+
let elems = e1.iter().collect();
413413
assert_eq!(vec![A,C], elems)
414414

415415
e1.insert(B);
416-
let elems: ::vec::Vec<_> = e1.iter().collect();
416+
let elems = e1.iter().collect();
417417
assert_eq!(vec![A,B,C], elems)
418418
}
419419

@@ -431,35 +431,35 @@ mod test {
431431
e2.insert(C);
432432

433433
let e_union = e1 | e2;
434-
let elems: ::vec::Vec<_> = e_union.iter().collect();
434+
let elems = e_union.iter().collect();
435435
assert_eq!(vec![A,B,C], elems)
436436

437437
let e_intersection = e1 & e2;
438-
let elems: ::vec::Vec<_> = e_intersection.iter().collect();
438+
let elems = e_intersection.iter().collect();
439439
assert_eq!(vec![C], elems)
440440

441441
// Another way to express intersection
442442
let e_intersection = e1 - (e1 - e2);
443-
let elems: ::vec::Vec<_> = e_intersection.iter().collect();
443+
let elems = e_intersection.iter().collect();
444444
assert_eq!(vec![C], elems)
445445

446446
let e_subtract = e1 - e2;
447-
let elems: ::vec::Vec<_> = e_subtract.iter().collect();
447+
let elems = e_subtract.iter().collect();
448448
assert_eq!(vec![A], elems)
449449

450450
// Bitwise XOR of two sets, aka symmetric difference
451451
let e_symmetric_diff = e1 ^ e2;
452-
let elems: ::vec::Vec<_> = e_symmetric_diff.iter().collect();
452+
let elems = e_symmetric_diff.iter().collect();
453453
assert_eq!(vec![A,B], elems)
454454

455455
// Another way to express symmetric difference
456456
let e_symmetric_diff = (e1 - e2) | (e2 - e1);
457-
let elems: ::vec::Vec<_> = e_symmetric_diff.iter().collect();
457+
let elems = e_symmetric_diff.iter().collect();
458458
assert_eq!(vec![A,B], elems)
459459

460460
// Yet another way to express symmetric difference
461461
let e_symmetric_diff = (e1 | e2) - (e1 & e2);
462-
let elems: ::vec::Vec<_> = e_symmetric_diff.iter().collect();
462+
let elems = e_symmetric_diff.iter().collect();
463463
assert_eq!(vec![A,B], elems)
464464
}
465465

branches/snap-stage3/src/libcollections/str.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,6 @@ impl<'a> Ord for MaybeOwned<'a> {
563563
}
564564
}
565565

566-
#[allow(deprecated)]
567566
#[deprecated = "use std::str::CowString"]
568567
impl<'a, S: Str> Equiv<S> for MaybeOwned<'a> {
569568
#[inline]

0 commit comments

Comments
 (0)