Skip to content

Commit 3abb141

Browse files
committed
---
yaml --- r: 276877 b: refs/heads/try c: a2f6d29 h: refs/heads/master i: 276875: cbaacff
1 parent 16b8fe6 commit 3abb141

File tree

350 files changed

+4882
-5294
lines changed

Some content is hidden

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

350 files changed

+4882
-5294
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: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 9ce61702b365cca4099739e5c310627366e73bb3
4+
refs/heads/try: a2f6d294202764e3d951054b42955c568e3a306b
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/configure

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,6 @@ opt inject-std-version 1 "inject the current compiler version of libstd into pro
608608
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
609609
opt rustbuild 0 "use the rust and cargo based build system"
610610
opt orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit"
611-
opt codegen-tests 1 "run the src/test/codegen tests"
612611

613612
# Optimization and debugging options. These may be overridden by the release channel, etc.
614613
opt_nosave optimize 1 "build optimized rust code"
@@ -1498,9 +1497,7 @@ do
14981497
LLVM_INST_DIR=$CFG_LLVM_ROOT
14991498
do_reconfigure=0
15001499
# Check that LLVm FileCheck is available. Needed for the tests
1501-
if [ -z "$CFG_DISABLE_CODEGEN_TESTS" ]; then
1502-
need_cmd $LLVM_INST_DIR/bin/FileCheck
1503-
fi
1500+
need_cmd $LLVM_INST_DIR/bin/FileCheck
15041501
fi
15051502

15061503
if [ ${do_reconfigure} -ne 0 ]

branches/try/mk/crates.mk

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ TARGET_CRATES := libc std term \
5656
alloc_system alloc_jemalloc
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
59-
rustc_data_structures rustc_platform_intrinsics \
59+
rustc_data_structures rustc_front rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
6161
rustc_const_eval rustc_const_math
6262
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
@@ -93,37 +93,38 @@ DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9393
DEPS_syntax_ext := syntax fmt_macros
9494

9595
DEPS_rustc_const_math := std syntax log serialize
96-
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize \
96+
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize rustc_front \
9797
rustc_back graphviz
9898

99-
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml \
99+
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
100100
log graphviz rustc_back rustc_data_structures\
101101
rustc_const_math
102-
DEPS_rustc_back := std syntax flate log libc
103-
DEPS_rustc_borrowck := rustc rustc_mir log graphviz syntax
102+
DEPS_rustc_back := std syntax rustc_front flate log libc
103+
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
104104
DEPS_rustc_data_structures := std log serialize
105105
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
106106
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
107-
rustc_trans rustc_privacy rustc_lint rustc_plugin \
107+
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
108108
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval
109+
DEPS_rustc_front := std syntax log serialize
109110
DEPS_rustc_lint := rustc log syntax rustc_const_eval
110111
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
111-
DEPS_rustc_metadata := rustc syntax rbml rustc_const_math
112-
DEPS_rustc_passes := syntax rustc core rustc_const_eval
113-
DEPS_rustc_mir := rustc syntax rustc_const_math rustc_const_eval
114-
DEPS_rustc_resolve := arena rustc log syntax
112+
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_math
113+
DEPS_rustc_passes := syntax rustc core rustc_front rustc_const_eval
114+
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_math rustc_const_eval
115+
DEPS_rustc_resolve := arena rustc rustc_front log syntax
115116
DEPS_rustc_platform_intrinsics := std
116117
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
117-
DEPS_rustc_privacy := rustc log syntax
118+
DEPS_rustc_privacy := rustc rustc_front log syntax
118119
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
119-
log syntax serialize rustc_llvm rustc_platform_intrinsics \
120+
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
120121
rustc_const_math rustc_const_eval
121-
DEPS_rustc_save_analysis := rustc log syntax
122-
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics rustc_const_math \
122+
DEPS_rustc_save_analysis := rustc log syntax rustc_front
123+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_math \
123124
rustc_const_eval
124125

125126
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
126-
test rustc_lint rustc_const_eval
127+
test rustc_lint rustc_front rustc_const_eval
127128

128129

129130
TOOL_DEPS_compiletest := test getopts log

branches/try/mk/rt.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ else ifeq ($(findstring android, $(OSTYPE_$(1))), android)
157157
# If the test suite passes, however, without symbol prefixes then we should be
158158
# good to go!
159159
JEMALLOC_ARGS_$(1) := --disable-tls --with-jemalloc-prefix=je_
160-
else ifeq ($(findstring dragonfly, $(OSTYPE_$(1))), dragonfly)
161-
JEMALLOC_ARGS_$(1) := --with-jemalloc-prefix=je_
162160
endif
163161

164162
ifdef CFG_ENABLE_DEBUG_JEMALLOC

branches/try/mk/tests.mk

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,11 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
305305
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
306306
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
307307
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
308+
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
309+
check-stage$(1)-T-$(2)-H-$(3)-codegen-units-exec \
308310
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
309311
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
310312

311-
ifndef CFG_DISABLE_CODEGEN_TESTS
312-
check-stage$(1)-T-$(2)-H-$(3)-exec: \
313-
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
314-
check-stage$(1)-T-$(2)-H-$(3)-codegen-units-exec
315-
endif
316-
317313
# Only test the compiler-dependent crates when the target is
318314
# able to build a compiler (when the target triple is in the set of host triples)
319315
ifneq ($$(findstring $(2),$$(CFG_HOST)),)

branches/try/src/bootstrap/build/mod.rs

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,7 @@ impl Build {
326326
if !target.contains("msvc") {
327327
cargo.env(format!("CC_{}", target), self.cc(target))
328328
.env(format!("AR_{}", target), self.ar(target))
329-
.env(format!("CFLAGS_{}", target), self.cflags(target).join(" "));
330-
}
331-
332-
// If we're building for OSX, inform the compiler and the linker that
333-
// we want to build a compiler runnable on 10.7
334-
if target.contains("apple-darwin") {
335-
cargo.env("MACOSX_DEPLOYMENT_TARGET", "10.7");
329+
.env(format!("CFLAGS_{}", target), self.cflags(target));
336330
}
337331

338332
// Environment variables *required* needed throughout the build
@@ -503,20 +497,11 @@ impl Build {
503497
self.cc[target].0.path()
504498
}
505499

506-
fn cflags(&self, target: &str) -> Vec<String> {
507-
let mut base = self.cc[target].0.args().iter()
508-
.map(|s| s.to_string_lossy().into_owned())
509-
.collect::<Vec<_>>();
510-
511-
// If we're compiling on OSX then we add a few unconditional flags
512-
// indicating that we want libc++ (more filled out than libstdc++) and
513-
// we want to compile for 10.7. This way we can ensure that
514-
// LLVM/jemalloc/etc are all properly compiled.
515-
if target.contains("apple-darwin") {
516-
base.push("-stdlib=libc++".into());
517-
base.push("-mmacosx-version-min=10.7".into());
518-
}
519-
return base
500+
fn cflags(&self, target: &str) -> String {
501+
self.cc[target].0.args().iter()
502+
.map(|s| s.to_string_lossy())
503+
.collect::<Vec<_>>()
504+
.join(" ")
520505
}
521506

522507
fn ar(&self, target: &str) -> &Path {

branches/try/src/bootstrap/build/native.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ pub fn llvm(build: &Build, target: &str) {
8686
.define("CMAKE_CXX_COMPILER", build.cxx(target));
8787
}
8888
cfg.build_arg("-j").build_arg(build.jobs().to_string());
89-
90-
cfg.define("CMAKE_C_FLAGS", build.cflags(target).join(" "));
91-
cfg.define("CMAKE_CXX_FLAGS", build.cflags(target).join(" "));
9289
}
9390

9491
// FIXME: we don't actually need to build all LLVM tools and all LLVM

branches/try/src/doc/book/concurrency.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ thread may outlive the scope of `x`, leading to a dangling pointer.
127127

128128
To fix this, we use a `move` closure as mentioned in the error message. `move`
129129
closures are explained in depth [here](closures.html#move-closures); basically
130-
they move variables from their environment into themselves. This means that `x`
131-
is now owned by the closure, and cannot be used in `main()` after the call to
132-
`spawn()`.
130+
they move variables from their environment into themselves.
133131

134132
```rust
135133
use std::thread;
@@ -164,7 +162,7 @@ The same [ownership system](ownership.html) that helps prevent using pointers
164162
incorrectly also helps rule out data races, one of the worst kinds of
165163
concurrency bugs.
166164

167-
As an example, here is a Rust program that could have a data race in many
165+
As an example, here is a Rust program that would have a data race in many
168166
languages. It will not compile:
169167

170168
```ignore
@@ -197,11 +195,6 @@ thread, and the thread takes ownership of the reference, we'd have three owners!
197195
`data` gets moved out of `main` in the first call to `spawn()`, so subsequent
198196
calls in the loop cannot use this variable.
199197

200-
Note that this specific example will not cause a data race since different array
201-
indices are being accessed. But this can't be determined at compile time, and in
202-
a similar situation where `i` is a constant or is random, you would have a data
203-
race.
204-
205198
So, we need some type that lets us have more than one owning reference to a
206199
value. Usually, we'd use `Rc<T>` for this, which is a reference counted type
207200
that provides shared ownership. It has some runtime bookkeeping that keeps track

branches/try/src/doc/book/crates-and-modules.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ build deps examples libphrases-a7448e02a0468eaa.rlib native
118118
`libphrases-hash.rlib` is the compiled crate. Before we see how to use this
119119
crate from another crate, let’s break it up into multiple files.
120120

121-
# Multiple File Crates
121+
# Multiple file crates
122122

123123
If each crate were just one file, these files would get very large. It’s often
124124
easier to split up crates into multiple files, and Rust supports this in two
@@ -190,19 +190,13 @@ mod farewells;
190190
```
191191

192192
Again, these declarations tell Rust to look for either
193-
`src/english/greetings.rs`, `src/english/farewells.rs`,
194-
`src/japanese/greetings.rs` and `src/japanese/farewells.rs` or
195-
`src/english/greetings/mod.rs`, `src/english/farewells/mod.rs`,
196-
`src/japanese/greetings/mod.rs` and
197-
`src/japanese/farewells/mod.rs`. Because these sub-modules don’t have
198-
their own sub-modules, we’ve chosen to make them
199-
`src/english/greetings.rs`, `src/english/farewells.rs`,
200-
`src/japanese/greetings.rs` and `src/japanese/farewells.rs`. Whew!
201-
202-
The contents of `src/english/greetings.rs`,
203-
`src/english/farewells.rs`, `src/japanese/greetings.rs` and
204-
`src/japanese/farewells.rs` are all empty at the moment. Let’s add
205-
some functions.
193+
`src/english/greetings.rs` and `src/japanese/greetings.rs` or
194+
`src/english/farewells/mod.rs` and `src/japanese/farewells/mod.rs`. Because
195+
these sub-modules don’t have their own sub-modules, we’ve chosen to make them
196+
`src/english/greetings.rs` and `src/japanese/farewells.rs`. Whew!
197+
198+
The contents of `src/english/greetings.rs` and `src/japanese/farewells.rs` are
199+
both empty at the moment. Let’s add some functions.
206200

207201
Put this in `src/english/greetings.rs`:
208202

branches/try/src/doc/book/lifetimes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ To fix this, we have to make sure that step four never happens after step
5656
three. The ownership system in Rust does this through a concept called
5757
lifetimes, which describe the scope that a reference is valid for.
5858

59-
When we have a function that takes an argument by reference, we can be
60-
implicit or explicit about the lifetime of the reference:
59+
When we have a function that takes a reference by argument, we can be implicit
60+
or explicit about the lifetime of the reference:
6161

6262
```rust
6363
// implicit

branches/try/src/liballoc_jemalloc/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ fn main() {
8686
// should be good to go!
8787
cmd.arg("--with-jemalloc-prefix=je_");
8888
cmd.arg("--disable-tls");
89-
} else if target.contains("dragonfly") {
90-
cmd.arg("--with-jemalloc-prefix=je_");
9189
}
9290

9391
if cfg!(feature = "debug-jemalloc") {

branches/try/src/liballoc_jemalloc/lib.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,22 @@ use libc::{c_int, c_void, size_t};
4242
extern {}
4343

4444
// Note that the symbols here are prefixed by default on OSX (we don't
45-
// explicitly request it), and on Android and DragonFly we explicitly request
46-
// it as unprefixing cause segfaults (mismatches in allocators).
45+
// explicitly request it), and on Android we explicitly request it as
46+
// unprefixing cause segfaults (mismatches in allocators).
4747
extern {
48-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
49-
target_os = "dragonfly"),
48+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5049
link_name = "je_mallocx")]
5150
fn mallocx(size: size_t, flags: c_int) -> *mut c_void;
52-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
53-
target_os = "dragonfly"),
51+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5452
link_name = "je_rallocx")]
5553
fn rallocx(ptr: *mut c_void, size: size_t, flags: c_int) -> *mut c_void;
56-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
57-
target_os = "dragonfly"),
54+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5855
link_name = "je_xallocx")]
5956
fn xallocx(ptr: *mut c_void, size: size_t, extra: size_t, flags: c_int) -> size_t;
60-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
61-
target_os = "dragonfly"),
57+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
6258
link_name = "je_sdallocx")]
6359
fn sdallocx(ptr: *mut c_void, size: size_t, flags: c_int);
64-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
65-
target_os = "dragonfly"),
60+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
6661
link_name = "je_nallocx")]
6762
fn nallocx(size: size_t, flags: c_int) -> size_t;
6863
}

branches/try/src/libcollections/btree/map.rs

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,6 @@ pub struct Values<'a, K: 'a, V: 'a> {
285285
inner: Iter<'a, K, V>,
286286
}
287287

288-
/// A mutable iterator over a BTreeMap's values.
289-
#[unstable(feature = "map_values_mut", reason = "recently added", issue = "32551")]
290-
pub struct ValuesMut<'a, K: 'a, V: 'a> {
291-
inner: IterMut<'a, K, V>,
292-
}
293-
294288
/// An iterator over a sub-range of BTreeMap's entries.
295289
pub struct Range<'a, K: 'a, V: 'a> {
296290
front: Handle<NodeRef<marker::Immut<'a>, K, V, marker::Leaf>, marker::Edge>,
@@ -1012,33 +1006,6 @@ impl<'a, K, V> Iterator for Range<'a, K, V> {
10121006
}
10131007
}
10141008

1015-
#[unstable(feature = "map_values_mut", reason = "recently added", issue = "32551")]
1016-
impl<'a, K, V> Iterator for ValuesMut<'a, K, V> {
1017-
type Item = &'a mut V;
1018-
1019-
fn next(&mut self) -> Option<&'a mut V> {
1020-
self.inner.next().map(|(_, v)| v)
1021-
}
1022-
1023-
fn size_hint(&self) -> (usize, Option<usize>) {
1024-
self.inner.size_hint()
1025-
}
1026-
}
1027-
1028-
#[unstable(feature = "map_values_mut", reason = "recently added", issue = "32551")]
1029-
impl<'a, K, V> DoubleEndedIterator for ValuesMut<'a, K, V> {
1030-
fn next_back(&mut self) -> Option<&'a mut V> {
1031-
self.inner.next_back().map(|(_, v)| v)
1032-
}
1033-
}
1034-
1035-
#[unstable(feature = "map_values_mut", reason = "recently added", issue = "32551")]
1036-
impl<'a, K, V> ExactSizeIterator for ValuesMut<'a, K, V> {
1037-
fn len(&self) -> usize {
1038-
self.inner.len()
1039-
}
1040-
}
1041-
10421009
impl<'a, K, V> Range<'a, K, V> {
10431010
unsafe fn next_unchecked(&mut self) -> (&'a K, &'a V) {
10441011
let handle = self.front;
@@ -1436,33 +1403,6 @@ impl<K, V> BTreeMap<K, V> {
14361403
Values { inner: self.iter() }
14371404
}
14381405

1439-
/// Gets a mutable iterator over the values of the map, in order by key.
1440-
///
1441-
/// # Examples
1442-
///
1443-
/// Basic usage:
1444-
///
1445-
/// ```
1446-
/// # #![feature(map_values_mut)]
1447-
/// use std::collections::BTreeMap;
1448-
///
1449-
/// let mut a = BTreeMap::new();
1450-
/// a.insert(1, String::from("hello"));
1451-
/// a.insert(2, String::from("goodbye"));
1452-
///
1453-
/// for value in a.values_mut() {
1454-
/// value.push_str("!");
1455-
/// }
1456-
///
1457-
/// let values: Vec<String> = a.values().cloned().collect();
1458-
/// assert_eq!(values, [String::from("hello!"),
1459-
/// String::from("goodbye!")]);
1460-
/// ```
1461-
#[unstable(feature = "map_values_mut", reason = "recently added", issue = "32551")]
1462-
pub fn values_mut<'a>(&'a mut self) -> ValuesMut<'a, K, V> {
1463-
ValuesMut { inner: self.iter_mut() }
1464-
}
1465-
14661406
/// Returns the number of elements in the map.
14671407
///
14681408
/// # Examples

branches/try/src/libcollectionstest/btree/map.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,21 +114,6 @@ fn test_iter_rev() {
114114
test(size, map.into_iter().rev());
115115
}
116116

117-
#[test]
118-
fn test_values_mut() {
119-
let mut a = BTreeMap::new();
120-
a.insert(1, String::from("hello"));
121-
a.insert(2, String::from("goodbye"));
122-
123-
for value in a.values_mut() {
124-
value.push_str("!");
125-
}
126-
127-
let values: Vec<String> = a.values().cloned().collect();
128-
assert_eq!(values, [String::from("hello!"),
129-
String::from("goodbye!")]);
130-
}
131-
132117
#[test]
133118
fn test_iter_mixed() {
134119
let size = 10000;

0 commit comments

Comments
 (0)