Skip to content

Commit 14fc45d

Browse files
Aatchdotdash
authored andcommitted
---
yaml --- r: 272124 b: refs/heads/master c: 4815f7e h: refs/heads/master
1 parent 9bfa55b commit 14fc45d

File tree

507 files changed

+4668
-4969
lines changed

Some content is hidden

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

507 files changed

+4668
-4969
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6e360e521ff3f4ae05856b9303fa465aa481b093
2+
refs/heads/master: 4815f7e668640ae968418307909f41a7eaabf050
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/configure

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,18 @@ if [ -n "$CFG_ENABLE_DEBUG_JEMALLOC" ]; then putvar CFG_ENABLE_DEBUG_JEMALLOC; f
717717

718718
if [ -n "$CFG_ENABLE_ORBIT" ]; then putvar CFG_ENABLE_ORBIT; fi
719719

720+
# A magic value that allows the compiler to use unstable features
721+
# during the bootstrap even when doing so would normally be an error
722+
# because of feature staging or because the build turns on
723+
# warnings-as-errors and unstable features default to warnings. The
724+
# build has to match this key in an env var. Meant to be a mild
725+
# deterrent from users just turning on unstable features on the stable
726+
# channel.
727+
# Basing CFG_BOOTSTRAP_KEY on CFG_BOOTSTRAP_KEY lets it get picked up
728+
# during a Makefile reconfig.
729+
CFG_BOOTSTRAP_KEY="${CFG_BOOTSTRAP_KEY-`date +%H:%M:%S`}"
730+
putvar CFG_BOOTSTRAP_KEY
731+
720732
step_msg "looking for build programs"
721733

722734
probe_need CFG_CURLORWGET curl wget

trunk/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

trunk/mk/main.mk

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@ CFG_PRERELEASE_VERSION=.1
2424
# versions in the same place
2525
CFG_FILENAME_EXTRA=$(shell printf '%s' $(CFG_RELEASE)$(CFG_EXTRA_FILENAME) | $(CFG_HASH_COMMAND))
2626

27-
# A magic value that allows the compiler to use unstable features during the
28-
# bootstrap even when doing so would normally be an error because of feature
29-
# staging or because the build turns on warnings-as-errors and unstable features
30-
# default to warnings. The build has to match this key in an env var.
31-
#
32-
# This value is keyed off the release to ensure that all compilers for one
33-
# particular release have the same bootstrap key. Note that this is
34-
# intentionally not "secure" by any definition, this is largely just a deterrent
35-
# from users enabling unstable features on the stable compiler.
36-
CFG_BOOTSTRAP_KEY=$(CFG_FILENAME_EXTRA)
37-
3827
ifeq ($(CFG_RELEASE_CHANNEL),stable)
3928
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
4029
CFG_RELEASE=$(CFG_RELEASE_NUM)

trunk/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

trunk/src/build_helper/lib.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,10 @@ pub fn cc2ar(cc: &Path, target: &str) -> PathBuf {
4343
if target.contains("musl") || target.contains("msvc") {
4444
PathBuf::from("ar")
4545
} else {
46-
let parent = cc.parent().unwrap();
4746
let file = cc.file_name().unwrap().to_str().unwrap();
48-
for suffix in &["gcc", "cc", "clang"] {
49-
if let Some(idx) = file.rfind(suffix) {
50-
let mut file = file[..idx].to_owned();
51-
file.push_str("ar");
52-
return parent.join(&file);
53-
}
54-
}
55-
parent.join(file)
47+
cc.parent().unwrap().join(file.replace("gcc", "ar")
48+
.replace("cc", "ar")
49+
.replace("clang", "ar"))
5650
}
5751
}
5852

trunk/src/doc/book/closures.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,14 @@ assert_eq!(6, answer);
371371
This gives us these long, related errors:
372372

373373
```text
374-
error: the trait bound `core::ops::Fn(i32) -> i32 : core::marker::Sized` is not satisfied [E0277]
374+
error: the trait `core::marker::Sized` is not implemented for the type
375+
`core::ops::Fn(i32) -> i32` [E0277]
375376
fn factory() -> (Fn(i32) -> i32) {
376377
^~~~~~~~~~~~~~~~
377378
note: `core::ops::Fn(i32) -> i32` does not have a constant size known at compile-time
378379
fn factory() -> (Fn(i32) -> i32) {
379380
^~~~~~~~~~~~~~~~
380-
error: the trait bound `core::ops::Fn(i32) -> i32 : core::marker::Sized` is not satisfied [E0277]
381+
error: the trait `core::marker::Sized` is not implemented for the type `core::ops::Fn(i32) -> i32` [E0277]
381382
let f = factory();
382383
^
383384
note: `core::ops::Fn(i32) -> i32` does not have a constant size known at compile-time

trunk/src/doc/book/concurrency.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ 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.
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()`.
131133

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

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

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

198-
Note that this specific example will not cause a data race since different array
199-
indices are being accessed. But this can't be determined at compile time, and in
200-
a similar situation where `i` is a constant or is random, you would have a data
201-
race.
202-
203200
So, we need some type that lets us have more than one owning reference to a
204201
value. Usually, we'd use `Rc<T>` for this, which is a reference counted type
205202
that provides shared ownership. It has some runtime bookkeeping that keeps track
@@ -234,8 +231,8 @@ fn main() {
234231
This won't work, however, and will give us the error:
235232

236233
```text
237-
13:9: 13:22 error: the trait bound `alloc::rc::Rc<collections::vec::Vec<i32>> : core::marker::Send`
238-
is not satisfied
234+
13:9: 13:22 error: the trait `core::marker::Send` is not
235+
implemented for the type `alloc::rc::Rc<collections::vec::Vec<i32>>`
239236
...
240237
13:9: 13:22 note: `alloc::rc::Rc<collections::vec::Vec<i32>>`
241238
cannot be sent between threads safely

trunk/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

trunk/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

trunk/src/doc/book/traits.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ print_area(5);
154154
We get a compile-time error:
155155

156156
```text
157-
error: the trait bound `_ : HasArea` is not satisfied [E0277]
157+
error: the trait `HasArea` is not implemented for the type `_` [E0277]
158158
```
159159

160160
## Trait bounds on generic structs
@@ -496,7 +496,7 @@ impl FooBar for Baz {
496496
If we forget to implement `Foo`, Rust will tell us:
497497

498498
```text
499-
error: the trait bound `main::Baz : main::Foo` is not satisfied [E0277]
499+
error: the trait `main::Foo` is not implemented for the type `main::Baz` [E0277]
500500
```
501501

502502
# Deriving

trunk/src/doc/book/vectors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ v[j];
5656
Indexing with a non-`usize` type gives an error that looks like this:
5757

5858
```text
59-
error: the trait bound `collections::vec::Vec<_> : core::ops::Index<i32>`
60-
is not satisfied [E0277]
59+
error: the trait `core::ops::Index<i32>` is not implemented for the type
60+
`collections::vec::Vec<_>` [E0277]
6161
v[j];
6262
^~~~
6363
note: the type `collections::vec::Vec<_>` cannot be indexed by `i32`

trunk/src/doc/nomicon/coercions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn main() {
6464
```
6565

6666
```text
67-
<anon>:10:5: 10:8 error: the trait bound `&mut i32 : Trait` is not satisfied [E0277]
67+
<anon>:10:5: 10:8 error: the trait `Trait` is not implemented for the type `&mut i32` [E0277]
6868
<anon>:10 foo(t);
6969
^~~
7070
```

trunk/src/liballoc/arc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ impl<T: ?Sized> Arc<T> {
263263
loop {
264264
// check if the weak counter is currently "locked"; if so, spin.
265265
if cur == usize::MAX {
266-
cur = this.inner().weak.load(Relaxed);
267266
continue;
268267
}
269268

trunk/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") {

trunk/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
}

trunk/src/libcollections/borrow.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,6 @@ pub trait ToOwned {
4949
type Owned: Borrow<Self>;
5050

5151
/// Creates owned data from borrowed data, usually by cloning.
52-
///
53-
/// # Examples
54-
///
55-
/// Basic usage:
56-
///
57-
/// ```
58-
/// let s = "a"; // &str
59-
/// let ss = s.to_owned(); // String
60-
///
61-
/// let v = &[1, 2]; // slice
62-
/// let vv = v.to_owned(); // Vec
63-
/// ```
6452
#[stable(feature = "rust1", since = "1.0.0")]
6553
fn to_owned(&self) -> Self::Owned;
6654
}

0 commit comments

Comments
 (0)