about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-12 17:07:11 +0000
committerbors <bors@rust-lang.org>2015-08-12 17:07:11 +0000
commit8b5948d5bf08f27bf443356549a25b39d40c159d (patch)
treef3d54534ff69927186d3b2a6e892544899b77716 /src
parent81c9ff24fe6d53eb51d9427302ec842da49b9edc (diff)
parent6b09eb8e17d1952a930e1411da85703c2c534dde (diff)
Auto merge of #27688 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src')
-rw-r--r--src/doc/favicon.inc2
-rw-r--r--src/doc/index.md3
-rw-r--r--src/doc/not_found.md8
-rw-r--r--src/doc/style/README.md2
-rw-r--r--src/doc/style/errors/ergonomics.md2
-rw-r--r--src/doc/style/errors/signaling.md2
-rw-r--r--src/doc/style/features/functions-and-methods/input.md28
-rw-r--r--src/doc/style/features/modules.md20
-rw-r--r--src/doc/style/ownership/builders.md2
-rw-r--r--src/doc/trpl/README.md2
-rw-r--r--src/doc/trpl/compiler-plugins.md4
-rw-r--r--src/doc/trpl/documentation.md8
-rw-r--r--src/doc/trpl/installing-rust.md8
-rw-r--r--src/doc/trpl/nightly-rust.md4
-rw-r--r--src/doc/version_info.html.template6
-rw-r--r--src/etc/maketest.py16
-rw-r--r--src/liballoc/arc.rs3
-rw-r--r--src/liballoc/boxed.rs3
-rw-r--r--src/liballoc/lib.rs7
-rw-r--r--src/liballoc/rc.rs3
-rw-r--r--src/libarena/lib.rs4
-rw-r--r--src/libcollections/binary_heap.rs3
-rw-r--r--src/libcollections/bit.rs3
-rw-r--r--src/libcollections/btree/map.rs5
-rw-r--r--src/libcollections/btree/node.rs3
-rw-r--r--src/libcollections/btree/set.rs3
-rw-r--r--src/libcollections/enum_set.rs3
-rw-r--r--src/libcollections/lib.rs9
-rw-r--r--src/libcollections/linked_list.rs3
-rw-r--r--src/libcollections/string.rs3
-rw-r--r--src/libcollections/vec.rs3
-rw-r--r--src/libcollections/vec_deque.rs3
-rw-r--r--src/libcollections/vec_map.rs3
-rw-r--r--src/libcore/lib.rs50
-rw-r--r--src/libflate/lib.rs4
-rw-r--r--src/libfmt_macros/lib.rs6
-rw-r--r--src/libgetopts/lib.rs6
-rw-r--r--src/libgraphviz/lib.rs4
-rw-r--r--src/liblibc/lib.rs8
-rw-r--r--src/liblog/lib.rs6
-rw-r--r--src/librand/chacha.rs3
-rw-r--r--src/librand/distributions/mod.rs3
-rw-r--r--src/librand/distributions/range.rs3
-rw-r--r--src/librand/isaac.rs3
-rw-r--r--src/librand/lib.rs12
-rw-r--r--src/librand/rand_impls.rs3
-rw-r--r--src/librand/reseeding.rs3
-rw-r--r--src/librbml/lib.rs6
-rw-r--r--src/librustc/README.md2
-rw-r--r--src/librustc/lib.rs17
-rw-r--r--src/librustc_back/lib.rs4
-rw-r--r--src/librustc_back/target/apple_ios_base.rs4
-rw-r--r--src/librustc_back/target/x86_64_pc_windows_msvc.rs1
-rw-r--r--src/librustc_borrowck/diagnostics.rs55
-rw-r--r--src/librustc_borrowck/lib.rs4
-rw-r--r--src/librustc_data_structures/lib.rs10
-rw-r--r--src/librustc_driver/lib.rs4
-rw-r--r--src/librustc_lint/lib.rs4
-rw-r--r--src/librustc_llvm/lib.rs8
-rw-r--r--src/librustc_privacy/lib.rs4
-rw-r--r--src/librustc_resolve/diagnostics.rs22
-rw-r--r--src/librustc_resolve/lib.rs4
-rw-r--r--src/librustc_trans/lib.rs4
-rw-r--r--src/librustc_trans/trans/base.rs21
-rw-r--r--src/librustc_trans/trans/cabi_x86_win64.rs8
-rw-r--r--src/librustc_trans/trans/common.rs4
-rw-r--r--src/librustc_trans/trans/intrinsic.rs2
-rw-r--r--src/librustc_typeck/diagnostics.rs26
-rw-r--r--src/librustc_typeck/lib.rs4
-rw-r--r--src/librustc_unicode/lib.rs9
-rw-r--r--src/librustc_unicode/u_str.rs2
-rw-r--r--src/librustdoc/html/markdown.rs2
-rw-r--r--src/librustdoc/lib.rs6
-rw-r--r--src/libserialize/lib.rs6
-rw-r--r--src/libstd/ffi/os_str.rs3
-rw-r--r--src/libstd/fs.rs3
-rw-r--r--src/libstd/io/cursor.rs3
-rw-r--r--src/libstd/io/impls.rs3
-rw-r--r--src/libstd/io/stdio.rs8
-rw-r--r--src/libstd/io/util.rs3
-rw-r--r--src/libstd/lib.rs9
-rw-r--r--src/libstd/net/udp.rs3
-rw-r--r--src/libstd/num/f32.rs3
-rw-r--r--src/libstd/num/f64.rs3
-rw-r--r--src/libstd/num/mod.rs2
-rw-r--r--src/libstd/path.rs10
-rw-r--r--src/libstd/rand/mod.rs3
-rw-r--r--src/libstd/rand/os.rs8
-rw-r--r--src/libstd/rand/reader.rs1
-rw-r--r--src/libstd/rt/args.rs4
-rw-r--r--src/libstd/rt/backtrace.rs3
-rw-r--r--src/libstd/rt/unwind/mod.rs10
-rw-r--r--src/libstd/sync/future.rs2
-rw-r--r--src/libstd/sync/mpsc/mod.rs3
-rw-r--r--src/libstd/sync/mpsc/mpsc_queue.rs3
-rw-r--r--src/libstd/sync/mpsc/oneshot.rs3
-rw-r--r--src/libstd/sync/mpsc/select.rs3
-rw-r--r--src/libstd/sync/mpsc/shared.rs3
-rw-r--r--src/libstd/sync/mpsc/spsc_queue.rs3
-rw-r--r--src/libstd/sync/mpsc/stream.rs3
-rw-r--r--src/libstd/sync/mpsc/sync.rs3
-rw-r--r--src/libstd/sync/once.rs3
-rw-r--r--src/libstd/sys/common/backtrace.rs2
-rw-r--r--src/libstd/sys/common/mod.rs7
-rw-r--r--src/libstd/sys/common/poison.rs3
-rw-r--r--src/libstd/sys/common/thread_info.rs3
-rw-r--r--src/libstd/sys/common/thread_local.rs3
-rw-r--r--src/libstd/sys/common/wtf8.rs3
-rw-r--r--src/libstd/sys/unix/backtrace.rs6
-rw-r--r--src/libstd/sys/unix/condvar.rs3
-rw-r--r--src/libstd/sys/unix/ext/fs.rs3
-rw-r--r--src/libstd/sys/unix/ext/process.rs2
-rw-r--r--src/libstd/sys/unix/fd.rs3
-rw-r--r--src/libstd/sys/unix/fs.rs2
-rw-r--r--src/libstd/sys/unix/mod.rs3
-rw-r--r--src/libstd/sys/unix/mutex.rs3
-rw-r--r--src/libstd/sys/unix/os_str.rs3
-rw-r--r--src/libstd/sys/unix/pipe.rs3
-rw-r--r--src/libstd/sys/unix/rwlock.rs3
-rw-r--r--src/libstd/sys/unix/stack_overflow.rs3
-rw-r--r--src/libstd/sys/unix/stdio.rs3
-rw-r--r--src/libstd/sys/unix/thread.rs3
-rw-r--r--src/libstd/sys/unix/thread_local.rs2
-rw-r--r--src/libstd/sys/windows/backtrace.rs2
-rw-r--r--src/libstd/sys/windows/condvar.rs3
-rw-r--r--src/libstd/sys/windows/ext/fs.rs3
-rw-r--r--src/libstd/sys/windows/fs.rs2
-rw-r--r--src/libstd/sys/windows/handle.rs3
-rw-r--r--src/libstd/sys/windows/net.rs3
-rw-r--r--src/libstd/sys/windows/pipe.rs3
-rw-r--r--src/libstd/sys/windows/rwlock.rs3
-rw-r--r--src/libstd/sys/windows/thread.rs3
-rw-r--r--src/libstd/thread/local.rs6
-rw-r--r--src/libstd/thread/scoped_tls.rs8
-rw-r--r--src/libstd/time/duration.rs3
-rw-r--r--src/libsyntax/ast.rs2
-rw-r--r--src/libsyntax/diagnostics/plugin.rs2
-rw-r--r--src/libsyntax/lib.rs4
-rw-r--r--src/libsyntax/parse/parser.rs4
-rw-r--r--src/libterm/lib.rs6
-rw-r--r--src/libtest/lib.rs4
-rw-r--r--src/rt/empty.c9
-rw-r--r--src/rustbook/build.rs2
-rw-r--r--src/snapshots.txt11
-rw-r--r--src/test/bench/shootout-fasta-redux.rs25
-rw-r--r--src/test/compile-fail/loops-reject-duplicate-labels-2.rs2
-rw-r--r--src/test/run-pass/backtrace-debuginfo.rs12
-rw-r--r--src/test/run-pass/cleanup-arm-conditional.rs10
-rw-r--r--src/test/run-pass/cleanup-shortcircuit.rs10
149 files changed, 333 insertions, 527 deletions
diff --git a/src/doc/favicon.inc b/src/doc/favicon.inc
index 51609a660d3..8f881657bdc 100644
--- a/src/doc/favicon.inc
+++ b/src/doc/favicon.inc
@@ -1 +1 @@
-<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
+<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">
diff --git a/src/doc/index.md b/src/doc/index.md
index c1f9ea6b3b0..8ca50667507 100644
--- a/src/doc/index.md
+++ b/src/doc/index.md
@@ -95,5 +95,4 @@ languages:
 - [Russian](https://github.com/kgv/rust_book_ru)
 - [Korean](https://github.com/rust-kr/doc.rust-kr.org)
 - [Chinese](https://github.com/KaiserY/rust-book-chinese)
-- [Spanish](https://github.com/goyox86/elpr)
-
+- [Spanish](https://goyox86.github.io/elpr)
diff --git a/src/doc/not_found.md b/src/doc/not_found.md
index 0efdf45c640..5d632ebc68f 100644
--- a/src/doc/not_found.md
+++ b/src/doc/not_found.md
@@ -21,12 +21,12 @@ Some things that might be helpful to you though:
 
 # Reference
 
-* [The Rust official site](http://rust-lang.org)
-* [The Rust reference](http://doc.rust-lang.org/reference.html)
+* [The Rust official site](https://www.rust-lang.org)
+* [The Rust reference](https://doc.rust-lang.org/reference.html)
 
 # Docs
 
-* [The standard library](http://doc.rust-lang.org/std/)
+* [The standard library](https://doc.rust-lang.org/std/)
 
 <script>
 function get_url_fragments() {
@@ -58,7 +58,7 @@ function populate_rust_search() {
     // #18540, use a single token
 
     var a = document.createElement("a");
-    a.href = "http://doc.rust-lang.org/core/?search=" + encodeURIComponent(lt);
+    a.href = "https://doc.rust-lang.org/core/?search=" + encodeURIComponent(lt);
     a.textContent = lt;
     var search = document.getElementById('core-search');
     search.innerHTML = "";
diff --git a/src/doc/style/README.md b/src/doc/style/README.md
index 9b328b5d393..5ab1a1d9c10 100644
--- a/src/doc/style/README.md
+++ b/src/doc/style/README.md
@@ -26,7 +26,7 @@ Every guideline has a status:
 
 One purpose of these guidelines is to reach decisions on a number of
 cross-cutting API and stylistic choices. Discussion and development of
-the guidelines will happen primarily on http://discuss.rust-lang.org/,
+the guidelines will happen primarily on https://internals.rust-lang.org/,
 using the Guidelines category. Discussion can also occur on the
 [guidelines issue tracker](https://github.com/rust-lang/rust-guidelines).
 
diff --git a/src/doc/style/errors/ergonomics.md b/src/doc/style/errors/ergonomics.md
index f2e23963e10..0985475f56a 100644
--- a/src/doc/style/errors/ergonomics.md
+++ b/src/doc/style/errors/ergonomics.md
@@ -57,7 +57,7 @@ fn write_info(info: &Info) -> Result<(), IoError> {
 ```
 
 See
-[the `result` module documentation](http://static.rust-lang.org/doc/master/std/result/index.html#the-try!-macro)
+[the `result` module documentation](https://doc.rust-lang.org/stable/std/result/index.html#the-try!-macro)
 for more details.
 
 ### The `Result`-`impl` pattern [FIXME]
diff --git a/src/doc/style/errors/signaling.md b/src/doc/style/errors/signaling.md
index 24cd5957f8a..4038ec10b9a 100644
--- a/src/doc/style/errors/signaling.md
+++ b/src/doc/style/errors/signaling.md
@@ -94,7 +94,7 @@ aspects of the input that are not covered by the contract.
 ### For obstructions, use `Result`
 
 The
-[`Result<T,E>` type](http://static.rust-lang.org/doc/master/std/result/index.html)
+[`Result<T,E>` type](https://doc.rust-lang.org/stable/std/result/index.html)
 represents either a success (yielding `T`) or failure (yielding `E`). By
 returning a `Result`, a function allows its clients to discover and react to
 obstructions in a fine-grained way.
diff --git a/src/doc/style/features/functions-and-methods/input.md b/src/doc/style/features/functions-and-methods/input.md
index 072021194c1..9ea1d218161 100644
--- a/src/doc/style/features/functions-and-methods/input.md
+++ b/src/doc/style/features/functions-and-methods/input.md
@@ -124,7 +124,7 @@ that the caller already owns, for example to re-use a buffer:
 fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize>
 ```
 
-(From the [Reader trait](http://static.rust-lang.org/doc/master/std/io/trait.Reader.html#tymethod.read).)
+(From the [Read trait](https://doc.rust-lang.org/stable/std/io/trait.Read.html#tymethod.read).)
 
 ### Consider validating arguments, statically or dynamically. [FIXME: needs RFC]
 
@@ -132,7 +132,7 @@ _Note: this material is closely related to
   [library-level guarantees](../../safety/lib-guarantees.md)._
 
 Rust APIs do _not_ generally follow the
-[robustness principle](http://en.wikipedia.org/wiki/Robustness_principle): "be
+[robustness principle](https://en.wikipedia.org/wiki/Robustness_principle): "be
 conservative in what you send; be liberal in what you accept".
 
 Instead, Rust code should _enforce_ the validity of input whenever practical.
@@ -147,24 +147,26 @@ Choose an argument type that rules out bad inputs.
 For example, prefer
 
 ```rust
-fn foo(a: ascii::Ascii) { ... }
+enum FooMode {
+    Mode1,
+    Mode2,
+    Mode3,
+}
+fn foo(mode: FooMode) { ... }
 ```
 
 over
 
 ```rust
-fn foo(a: u8) { ... }
+fn foo(mode2: bool, mode3: bool) {
+    assert!(!mode2 || !mode3);
+    ...
+}
 ```
 
-Note that
-[`ascii::Ascii`](http://static.rust-lang.org/doc/master/std/ascii/struct.Ascii.html)
-is a _wrapper_ around `u8` that guarantees the highest bit is zero; see
-[newtype patterns](../types/newtype.md) for more details on creating typesafe wrappers.
-
 Static enforcement usually comes at little run-time cost: it pushes the
-costs to the boundaries (e.g. when a `u8` is first converted into an
-`Ascii`). It also catches bugs early, during compilation, rather than through
-run-time failures.
+costs to the boundaries. It also catches bugs early, during compilation,
+rather than through run-time failures.
 
 On the other hand, some properties are difficult or impossible to
 express using types.
@@ -177,7 +179,7 @@ downsides:
 
 1. Runtime overhead (unless checking can be done as part of processing the input).
 2. Delayed detection of bugs.
-3. Introduces failure cases, either via `fail!` or `Result`/`Option` types (see
+3. Introduces failure cases, either via `panic!` or `Result`/`Option` types (see
    the [error handling guidelines](../../errors/README.md)), which must then be
    dealt with by client code.
 
diff --git a/src/doc/style/features/modules.md b/src/doc/style/features/modules.md
index 04aae226f72..23d8760f571 100644
--- a/src/doc/style/features/modules.md
+++ b/src/doc/style/features/modules.md
@@ -58,13 +58,13 @@ For modules that themselves have submodules, place the module in a separate
 directory (e.g., `bar/mod.rs` for a module `bar`) rather than the same directory.
 
 Note the structure of
-[`std::io`](http://doc.rust-lang.org/std/io/). Many of the submodules lack
+[`std::io`](https://doc.rust-lang.org/std/io/). Many of the submodules lack
 children, like
-[`io::fs`](http://doc.rust-lang.org/std/io/fs/)
+[`io::fs`](https://doc.rust-lang.org/std/io/fs/)
 and
-[`io::stdio`](http://doc.rust-lang.org/std/io/stdio/).
+[`io::stdio`](https://doc.rust-lang.org/std/io/stdio/).
 On the other hand,
-[`io::net`](http://doc.rust-lang.org/std/io/net/)
+[`io::net`](https://doc.rust-lang.org/std/io/net/)
 contains submodules, so it lives in a separate directory:
 
 ```
@@ -88,7 +88,7 @@ submodules of `io::net` easier to find.
 ### Consider top-level definitions or reexports. [FIXME: needs RFC]
 
 For modules with submodules,
-define or [reexport](http://doc.rust-lang.org/std/io/#reexports) commonly used
+define or [reexport](https://doc.rust-lang.org/std/io/#reexports) commonly used
 definitions at the top level:
 
 * Functionality relevant to the module itself or to many of its
@@ -98,10 +98,10 @@ definitions at the top level:
   common definitions.
 
 For example,
-[`IoError`](http://doc.rust-lang.org/std/io/struct.IoError.html)
+[`IoError`](https://doc.rust-lang.org/std/io/struct.IoError.html)
 is defined in `io/mod.rs`, since it pertains to the entirety of `io`,
 while
-[`TcpStream`](http://doc.rust-lang.org/std/io/net/tcp/struct.TcpStream.html)
+[`TcpStream`](https://doc.rust-lang.org/std/io/net/tcp/struct.TcpStream.html)
 is defined in `io/net/tcp.rs` and reexported in the `io` module.
 
 ### Use internal module hirearchies for organization. [FIXME: needs RFC]
@@ -113,11 +113,11 @@ is defined in `io/net/tcp.rs` and reexported in the `io` module.
 Internal module hirearchies (i.e., private submodules) may be used to
 hide implementation details that are not part of the module's API.
 
-For example, in [`std::io`](http://doc.rust-lang.org/std/io/), `mod mem`
+For example, in [`std::io`](https://doc.rust-lang.org/std/io/), `mod mem`
 provides implementations for
-[`BufReader`](http://doc.rust-lang.org/std/io/struct.BufReader.html)
+[`BufReader`](https://doc.rust-lang.org/std/io/struct.BufReader.html)
 and
-[`BufWriter`](http://doc.rust-lang.org/std/io/struct.BufWriter.html),
+[`BufWriter`](https://doc.rust-lang.org/std/io/struct.BufWriter.html),
 but these are re-exported in `io/mod.rs` at the top level of the module:
 
 ```rust
diff --git a/src/doc/style/ownership/builders.md b/src/doc/style/ownership/builders.md
index 348be516e37..9fc640890fe 100644
--- a/src/doc/style/ownership/builders.md
+++ b/src/doc/style/ownership/builders.md
@@ -32,7 +32,7 @@ treatment of ownership, as described below.
 
 In some cases, constructing the final `T` does not require the builder itself to
 be consumed. The follow variant on
-[`std::io::process::Command`](http://static.rust-lang.org/doc/master/std/io/process/struct.Command.html)
+[`std::process::Command`](https://doc.rust-lang.org/stable/std/process/struct.Command.html)
 is one example:
 
 ```rust
diff --git a/src/doc/trpl/README.md b/src/doc/trpl/README.md
index 12384b00b43..540dbe9ab9b 100644
--- a/src/doc/trpl/README.md
+++ b/src/doc/trpl/README.md
@@ -13,7 +13,7 @@ even though some of these abstractions feel like those of a high-level
 language. Even then, Rust still allows precise control like a low-level
 language would.
 
-[rust]: http://rust-lang.org
+[rust]: https://www.rust-lang.org
 
 “The Rust Programming Language” is split into eight sections. This introduction
 is the first. After this:
diff --git a/src/doc/trpl/compiler-plugins.md b/src/doc/trpl/compiler-plugins.md
index 12adb9050d5..ffa8be5ac08 100644
--- a/src/doc/trpl/compiler-plugins.md
+++ b/src/doc/trpl/compiler-plugins.md
@@ -115,7 +115,7 @@ In addition to procedural macros, you can define new
 extensions.  See
 [`Registry::register_syntax_extension`](../rustc/plugin/registry/struct.Registry.html#method.register_syntax_extension)
 and the [`SyntaxExtension`
-enum](http://doc.rust-lang.org/syntax/ext/base/enum.SyntaxExtension.html).  For
+enum](https://doc.rust-lang.org/syntax/ext/base/enum.SyntaxExtension.html).  For
 a more involved macro example, see
 [`regex_macros`](https://github.com/rust-lang/regex/blob/master/regex_macros/src/lib.rs).
 
@@ -156,7 +156,7 @@ so that the compiler can continue and find further errors.
 To print syntax fragments for debugging, you can use
 [`span_note`](../syntax/ext/base/struct.ExtCtxt.html#method.span_note) together
 with
-[`syntax::print::pprust::*_to_string`](http://doc.rust-lang.org/syntax/print/pprust/index.html#functions).
+[`syntax::print::pprust::*_to_string`](https://doc.rust-lang.org/syntax/print/pprust/index.html#functions).
 
 The example above produced an integer literal using
 [`AstBuilder::expr_usize`](../syntax/ext/build/trait.AstBuilder.html#tymethod.expr_usize).
diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md
index 01b53a6c49d..556af6625c0 100644
--- a/src/doc/trpl/documentation.md
+++ b/src/doc/trpl/documentation.md
@@ -76,7 +76,7 @@ This [unfortunate error](https://github.com/rust-lang/rust/issues/22547) is
 correct: documentation comments apply to the thing after them, and there's no
 thing after that last comment.
 
-[rc-new]: http://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
+[rc-new]: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
 
 ### Writing documentation comments
 
@@ -544,9 +544,9 @@ You can control a few aspects of the HTML that `rustdoc` generates through the
 `#![doc]` version of the attribute:
 
 ```rust
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
-       html_favicon_url = "http://www.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/")]
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+       html_favicon_url = "https://www.rust-lang.org/favicon.ico",
+       html_root_url = "https://doc.rust-lang.org/")]
 ```
 
 This sets a few different options, with a logo, favicon, and a root URL.
diff --git a/src/doc/trpl/installing-rust.md b/src/doc/trpl/installing-rust.md
index 83750ec3b01..f06005d55b9 100644
--- a/src/doc/trpl/installing-rust.md
+++ b/src/doc/trpl/installing-rust.md
@@ -32,7 +32,7 @@ install dialog and on the "Product Features" page ensure "Add to PATH" is
 installed on the local hard drive.
 
 
-[install-page]: http://www.rust-lang.org/install.html
+[install-page]: https://www.rust-lang.org/install.html
 
 ## Uninstalling
 
@@ -85,10 +85,10 @@ $ rustc --version
 ```
 
 You should see the version number, commit hash, and commit date. If you just
-installed version 1.0.0, you should see:
+installed version 1.2.0, you should see:
 
 ```bash
-rustc 1.0.0 (a59de37e9 2015-05-13)
+rustc 1.2.0 (082e47636 2015-08-03)
 ```
 
 If you did, Rust has been installed successfully! Congrats!
@@ -112,5 +112,5 @@ resources include [the user’s forum][users], and
 
 [irc]: irc://irc.mozilla.org/#rust
 [mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
-[users]: http://users.rust-lang.org/
+[users]: https://users.rust-lang.org/
 [stackoverflow]: http://stackoverflow.com/questions/tagged/rust
diff --git a/src/doc/trpl/nightly-rust.md b/src/doc/trpl/nightly-rust.md
index c5aae5afcf5..0578fbf8bdb 100644
--- a/src/doc/trpl/nightly-rust.md
+++ b/src/doc/trpl/nightly-rust.md
@@ -50,7 +50,7 @@ documentation on [building Rust from Source][from-source], or [the official
 binary downloads][install-page].
 
 [from-source]: https://github.com/rust-lang/rust#building-from-source
-[install-page]: http://www.rust-lang.org/install.html
+[install-page]: https://www.rust-lang.org/install.html
 
 Oh, we should also mention the officially supported platforms:
 
@@ -95,5 +95,5 @@ resources include [the user’s forum][users], and [Stack Overflow][stackoverflo
 
 [irc]: irc://irc.mozilla.org/#rust
 [mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
-[users]: http://users.rust-lang.org/ 
+[users]: https://users.rust-lang.org/
 [stackoverflow]: http://stackoverflow.com/questions/tagged/rust
diff --git a/src/doc/version_info.html.template b/src/doc/version_info.html.template
index 49f0b183e16..2fda57923cd 100644
--- a/src/doc/version_info.html.template
+++ b/src/doc/version_info.html.template
@@ -1,6 +1,6 @@
 <div id="versioninfo">
-  <img src="http://www.rust-lang.org/logos/rust-logo-32x32-blk.png" width="32" height="32" alt><br>
-  <span class="white-sticker"><a href="http://rust-lang.org">Rust</a> VERSION</span><br>
-  <a href="http://github.com/rust-lang/rust/commit/STAMP"
+  <img src="https://www.rust-lang.org/logos/rust-logo-32x32-blk.png" width="32" height="32" alt><br>
+  <span class="white-sticker"><a href="https://www.rust-lang.org">Rust</a> VERSION</span><br>
+  <a href="https://github.com/rust-lang/rust/commit/STAMP"
     class="hash white-sticker">SHORT_HASH</a>
 </div>
diff --git a/src/etc/maketest.py b/src/etc/maketest.py
index f500de5e15d..04bf81a96aa 100644
--- a/src/etc/maketest.py
+++ b/src/etc/maketest.py
@@ -41,14 +41,14 @@ def convert_path_spec(name, value):
 make = sys.argv[2]
 putenv('RUSTC', os.path.abspath(sys.argv[3]))
 putenv('TMPDIR', os.path.abspath(sys.argv[4]))
-putenv('CC', sys.argv[5])
-putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
-filt = sys.argv[7]
-putenv('LD_LIB_PATH_ENVVAR', sys.argv[8])
-putenv('HOST_RPATH_DIR', os.path.abspath(sys.argv[9]))
-putenv('TARGET_RPATH_DIR', os.path.abspath(sys.argv[10]))
-putenv('RUST_BUILD_STAGE', sys.argv[11])
-putenv('S', os.path.abspath(sys.argv[12]))
+putenv('CC', sys.argv[5] + ' ' + sys.argv[6])
+putenv('RUSTDOC', os.path.abspath(sys.argv[7]))
+filt = sys.argv[8]
+putenv('LD_LIB_PATH_ENVVAR', sys.argv[9])
+putenv('HOST_RPATH_DIR', os.path.abspath(sys.argv[10]))
+putenv('TARGET_RPATH_DIR', os.path.abspath(sys.argv[11]))
+putenv('RUST_BUILD_STAGE', sys.argv[12])
+putenv('S', os.path.abspath(sys.argv[13]))
 putenv('PYTHON', sys.executable)
 
 if filt not in sys.argv[1]:
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 56c7324090e..ccf8784e2a7 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -71,9 +71,6 @@
 
 use boxed::Box;
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::atomic;
 use core::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
 use core::fmt;
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index ab1a5ba9019..f31bb60ed97 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -53,9 +53,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use heap;
 use raw_vec::RawVec;
 
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 6d251cae41d..6551011e81d 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -64,9 +64,9 @@
 #![unstable(feature = "alloc",
             reason = "this library is unlikely to be stabilized in its current \
                       form or name")]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
+       html_root_url = "https://doc.rust-lang.org/nightly/",
        test(no_crate_inject))]
 #![no_std]
 
@@ -92,7 +92,6 @@
 #![feature(unsize)]
 #![feature(core_slice_ext)]
 #![feature(core_str_ext)]
-#![cfg_attr(stage0, feature(core, core_prelude))]
 
 #![cfg_attr(test, feature(test, alloc, rustc_private, box_raw))]
 #![cfg_attr(all(not(feature = "external_funcs"), not(feature = "external_crate")),
@@ -101,8 +100,6 @@
 #[cfg(all(not(feature = "external_funcs"), not(feature = "external_crate")))]
 extern crate libc;
 
-#[cfg(stage0)] #[macro_use] extern crate core;
-
 // Allow testing this library
 
 #[cfg(test)] #[macro_use] extern crate std;
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 05fd36e8e7f..620ceaa346b 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -150,9 +150,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 #[cfg(not(test))]
 use boxed::Box;
 #[cfg(test)]
diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs
index 54df3b35bdb..969500fc441 100644
--- a/src/libarena/lib.rs
+++ b/src/libarena/lib.rs
@@ -26,9 +26,9 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(alloc)]
 #![feature(box_syntax)]
diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs
index 65a252aea49..c46025b3335 100644
--- a/src/libcollections/binary_heap.rs
+++ b/src/libcollections/binary_heap.rs
@@ -151,9 +151,6 @@
 #![allow(missing_docs)]
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::iter::{FromIterator};
 use core::mem::swap;
 use core::ptr;
diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs
index af33181c5d0..e1ae4c51e3a 100644
--- a/src/libcollections/bit.rs
+++ b/src/libcollections/bit.rs
@@ -86,9 +86,6 @@
 //! println!("There are {} primes below {}", num_primes, max_prime);
 //! ```
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::cmp::Ordering;
 use core::cmp;
 use core::fmt;
diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs
index f5d1d44b404..a5c6ebaa5ae 100644
--- a/src/libcollections/btree/map.rs
+++ b/src/libcollections/btree/map.rs
@@ -17,9 +17,6 @@
 
 use self::Entry::*;
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::cmp::Ordering;
 use core::fmt::Debug;
 use core::hash::{Hash, Hasher};
@@ -531,8 +528,6 @@ enum Continuation<A, B> {
 /// to nodes. By using this module much better safety guarantees can be made, and more search
 /// boilerplate gets cut out.
 mod stack {
-    #[cfg(stage0)]
-    use core::prelude::v1::*;
     use core::marker;
     use core::mem;
     use core::ops::{Deref, DerefMut};
diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs
index e0018efe9e0..7b544078d5b 100644
--- a/src/libcollections/btree/node.rs
+++ b/src/libcollections/btree/node.rs
@@ -16,9 +16,6 @@ pub use self::SearchResult::*;
 pub use self::ForceResult::*;
 pub use self::TraversalItem::*;
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::cmp::Ordering::{Greater, Less, Equal};
 use core::intrinsics::arith_offset;
 use core::iter::Zip;
diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs
index e31147b7308..3f545e7b2a1 100644
--- a/src/libcollections/btree/set.rs
+++ b/src/libcollections/btree/set.rs
@@ -11,9 +11,6 @@
 // This is pretty much entirely stolen from TreeSet, since BTreeMap has an identical interface
 // to TreeMap
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::cmp::Ordering::{self, Less, Greater, Equal};
 use core::fmt::Debug;
 use core::fmt;
diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs
index e74726baf11..246c213a19b 100644
--- a/src/libcollections/enum_set.rs
+++ b/src/libcollections/enum_set.rs
@@ -17,9 +17,6 @@
             reason = "matches collection reform specification, \
                       waiting for dust to settle")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::marker;
 use core::fmt;
 use core::iter::{FromIterator};
diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs
index 3be5f32d6c2..740fba73c17 100644
--- a/src/libcollections/lib.rs
+++ b/src/libcollections/lib.rs
@@ -21,10 +21,10 @@
 #![unstable(feature = "collections",
             reason = "library is unlikely to be stabilized with the current \
                       layout and name, use std::collections instead")]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/",
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/",
        test(no_crate_inject))]
 
 #![allow(trivial_casts)]
@@ -59,13 +59,10 @@
 #![feature(utf8_error)]
 #![cfg_attr(test, feature(rand, test))]
 #![cfg_attr(not(test), feature(str_words))]
-#![cfg_attr(stage0, feature(core, core_prelude))]
 
 #![feature(no_std)]
 #![no_std]
 
-#[cfg(stage0)] #[macro_use] extern crate core;
-
 extern crate rustc_unicode;
 extern crate alloc;
 
diff --git a/src/libcollections/linked_list.rs b/src/libcollections/linked_list.rs
index 697cfea197c..50b5db758c1 100644
--- a/src/libcollections/linked_list.rs
+++ b/src/libcollections/linked_list.rs
@@ -21,9 +21,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use alloc::boxed::Box;
 use core::cmp::Ordering;
 use core::fmt;
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index 2bd5b315c4c..aa41c57b927 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -12,9 +12,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::fmt;
 use core::hash;
 use core::iter::FromIterator;
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 83786648ea0..45b0dea493f 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -58,9 +58,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use alloc::raw_vec::RawVec;
 use alloc::boxed::Box;
 use alloc::heap::EMPTY;
diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs
index b55436c7057..f189d7b80d9 100644
--- a/src/libcollections/vec_deque.rs
+++ b/src/libcollections/vec_deque.rs
@@ -18,9 +18,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::cmp::Ordering;
 use core::fmt;
 use core::iter::{self, repeat, FromIterator, RandomAccessIterator};
diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs
index 8be80a67ce7..93f8db23e56 100644
--- a/src/libcollections/vec_map.rs
+++ b/src/libcollections/vec_map.rs
@@ -20,9 +20,6 @@
 
 use self::Entry::*;
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::cmp::{max, Ordering};
 use core::fmt;
 use core::hash::{Hash, Hasher};
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 56fb4c71a6a..64a56549d0f 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -54,34 +54,32 @@
                       stabilization in terms of structure and naming")]
 #![staged_api]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 #![doc(test(no_crate_inject))]
 
-#![cfg_attr(stage0, feature(no_std))]
-#![cfg_attr(stage0, no_std)]
-#![cfg_attr(not(stage0), feature(no_core))]
-#![cfg_attr(not(stage0), no_core)]
+#![no_core]
 #![allow(raw_pointer_derive)]
 #![deny(missing_docs)]
 
+#![feature(allow_internal_unstable)]
 #![feature(associated_type_defaults)]
+#![feature(concat_idents)]
+#![feature(const_fn)]
+#![feature(custom_attribute)]
+#![feature(fundamental)]
 #![feature(intrinsics)]
 #![feature(lang_items)]
+#![feature(no_core)]
 #![feature(on_unimplemented)]
+#![feature(optin_builtin_traits)]
+#![feature(reflect)]
+#![feature(rustc_attrs)]
 #![feature(simd)]
 #![feature(staged_api)]
 #![feature(unboxed_closures)]
-#![feature(rustc_attrs)]
-#![feature(optin_builtin_traits)]
-#![feature(fundamental)]
-#![feature(concat_idents)]
-#![feature(reflect)]
-#![feature(custom_attribute)]
-#![feature(const_fn)]
-#![feature(allow_internal_unstable)]
 
 #[macro_use]
 mod macros;
@@ -159,25 +157,3 @@ pub mod fmt;
 
 // note: does not need to be public
 mod tuple;
-
-// A curious inner-module that's not exported that contains the bindings of core
-// so that compiler-expanded references to `core::$foo` can be resolved within
-// core itself.
-//
-// Note that no crate-defined macros require this module due to the existence of
-// the `$crate` meta variable, only those expansions defined in the compiler
-// require this. This is because the compiler doesn't currently know that it's
-// compiling the core library when it's compiling this library, so it expands
-// all references to `::core::$foo`
-#[doc(hidden)]
-#[cfg(stage0)]
-mod core {
-    pub use intrinsics;     // derive(PartialOrd)
-    pub use fmt;            // format_args!
-    pub use clone;          // derive(Clone)
-    pub use cmp;            // derive(Ord)
-    pub use hash;           // derive(Hash)
-    pub use marker;         // derive(Copy)
-    pub use option;         // iterator protocol
-    pub use iter;           // iterator protocol
-}
diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs
index 58cdf1133ec..64b9d7ac16b 100644
--- a/src/libflate/lib.rs
+++ b/src/libflate/lib.rs
@@ -21,9 +21,9 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(libc)]
 #![feature(staged_api)]
diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs
index 7ca89cfd0c9..469b04e7c8b 100644
--- a/src/libfmt_macros/lib.rs
+++ b/src/libfmt_macros/lib.rs
@@ -21,10 +21,10 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 
 #![feature(staged_api)]
 #![feature(unicode)]
diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs
index 8953375297d..c9bd3c04fa9 100644
--- a/src/libgetopts/lib.rs
+++ b/src/libgetopts/lib.rs
@@ -84,10 +84,10 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 
 #![deny(missing_docs)]
 #![feature(staged_api)]
diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs
index 69120b58181..f6f3438f467 100644
--- a/src/libgraphviz/lib.rs
+++ b/src/libgraphviz/lib.rs
@@ -281,9 +281,9 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(into_cow)]
 #![feature(str_escape)]
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs
index d895a3e62a3..2718694490c 100644
--- a/src/liblibc/lib.rs
+++ b/src/liblibc/lib.rs
@@ -15,13 +15,12 @@
 #![cfg_attr(not(feature = "cargo-build"), unstable(feature = "libc",
                                                    reason = "use `libc` from crates.io"))]
 #![cfg_attr(not(feature = "cargo-build"), feature(staged_api, no_std))]
-#![cfg_attr(all(not(feature = "cargo-build"), stage0), feature(core))]
 #![cfg_attr(not(feature = "cargo-build"), staged_api)]
 #![cfg_attr(not(feature = "cargo-build"), no_std)]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 #![cfg_attr(test, feature(test))]
 
 //! Bindings for the C standard library and other platform libraries
@@ -79,7 +78,6 @@
 #![allow(bad_style, raw_pointer_derive)]
 #![cfg_attr(target_os = "nacl", allow(unused_imports))]
 #[cfg(feature = "cargo-build")] extern crate std as core;
-#[cfg(all(stage0, not(feature = "cargo-build")))] extern crate core;
 
 #[cfg(test)] extern crate std;
 #[cfg(test)] extern crate test;
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs
index bec4f24a565..f4002c7aaae 100644
--- a/src/liblog/lib.rs
+++ b/src/liblog/lib.rs
@@ -163,10 +163,10 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 #![deny(missing_docs)]
 
 #![feature(box_raw)]
diff --git a/src/librand/chacha.rs b/src/librand/chacha.rs
index 51000ed166b..db81ff5c070 100644
--- a/src/librand/chacha.rs
+++ b/src/librand/chacha.rs
@@ -10,9 +10,6 @@
 
 //! The ChaCha random number generator.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use {Rng, SeedableRng, Rand};
 
 const KEY_WORDS    : usize =  8; // 8 words for the 256-bit key
diff --git a/src/librand/distributions/mod.rs b/src/librand/distributions/mod.rs
index 6f003b8b9ad..5defe174cf5 100644
--- a/src/librand/distributions/mod.rs
+++ b/src/librand/distributions/mod.rs
@@ -17,9 +17,6 @@
 //! internally. The `IndependentSample` trait is for generating values
 //! that do not need to record state.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::num::Float;
 use core::marker::PhantomData;
 
diff --git a/src/librand/distributions/range.rs b/src/librand/distributions/range.rs
index 52a5219a380..e196708368a 100644
--- a/src/librand/distributions/range.rs
+++ b/src/librand/distributions/range.rs
@@ -12,9 +12,6 @@
 
 // this is surprisingly complicated to be both generic & correct
 
-#[cfg(stage0)]
-use core::prelude::v1::PartialOrd;
-
 use Rng;
 use distributions::{Sample, IndependentSample};
 
diff --git a/src/librand/isaac.rs b/src/librand/isaac.rs
index 6827d9c6f13..f51483cc11f 100644
--- a/src/librand/isaac.rs
+++ b/src/librand/isaac.rs
@@ -12,9 +12,6 @@
 
 #![allow(non_camel_case_types)]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::slice;
 use core::iter::repeat;
 use core::num::Wrapping as w;
diff --git a/src/librand/lib.rs b/src/librand/lib.rs
index ace2c2fc21d..56104064a72 100644
--- a/src/librand/lib.rs
+++ b/src/librand/lib.rs
@@ -20,10 +20,10 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rand"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 #![no_std]
 #![staged_api]
 #![unstable(feature = "rand",
@@ -34,20 +34,14 @@
 #![feature(num_bits_bytes)]
 #![feature(staged_api)]
 #![feature(step_by)]
-#![cfg_attr(stage0, feature(core, core_prelude))]
 
 #![cfg_attr(test, feature(test, rand, rustc_private, iter_order))]
 
 #![allow(deprecated)]
 
-#[cfg(stage0)] #[macro_use] extern crate core;
-
 #[cfg(test)] #[macro_use] extern crate std;
 #[cfg(test)] #[macro_use] extern crate log;
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::marker::PhantomData;
 
 pub use isaac::{IsaacRng, Isaac64Rng};
diff --git a/src/librand/rand_impls.rs b/src/librand/rand_impls.rs
index 3db98cfe2f4..04093db4b6f 100644
--- a/src/librand/rand_impls.rs
+++ b/src/librand/rand_impls.rs
@@ -10,9 +10,6 @@
 
 //! The implementations of `Rand` for the built-in types.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::char;
 use core::isize;
 use core::usize;
diff --git a/src/librand/reseeding.rs b/src/librand/reseeding.rs
index 6fe7dd09854..99fe2bb5ab5 100644
--- a/src/librand/reseeding.rs
+++ b/src/librand/reseeding.rs
@@ -11,9 +11,6 @@
 //! A wrapper around another RNG that reseeds it after it
 //! generates a certain number of random bytes.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use {Rng, SeedableRng};
 
 /// How many bytes of entropy the underling RNG is allowed to generate
diff --git a/src/librbml/lib.rs b/src/librbml/lib.rs
index 18b1d39ea82..a65cfac56b3 100644
--- a/src/librbml/lib.rs
+++ b/src/librbml/lib.rs
@@ -118,10 +118,10 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 
 #![feature(rustc_private)]
 #![feature(staged_api)]
diff --git a/src/librustc/README.md b/src/librustc/README.md
index 2ef9dfd4da8..fd2e4e2fb77 100644
--- a/src/librustc/README.md
+++ b/src/librustc/README.md
@@ -4,7 +4,7 @@ An informal guide to reading and working on the rustc compiler.
 If you wish to expand on this document, or have a more experienced
 Rust contributor add anything else to it, please get in touch:
 
-* http://internals.rust-lang.org/
+* https://internals.rust-lang.org/
 * https://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
 
 or file a bug:
diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs
index bb44abc4f07..6b53f835be5 100644
--- a/src/librustc/lib.rs
+++ b/src/librustc/lib.rs
@@ -21,9 +21,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(append)]
 #![feature(associated_consts)]
@@ -179,5 +179,18 @@ mod rustc {
     pub use lint;
 }
 
+// FIXME(#27438): right now the unit tests of librustc don't refer to any actual
+//                functions generated in librustc_data_structures (all
+//                references are through generic functions), but statics are
+//                referenced from time to time. Due to this bug we won't
+//                actually correctly link in the statics unless we also
+//                reference a function, so be sure to reference a dummy
+//                function.
+#[test]
+fn noop() {
+    rustc_data_structures::__noop_fix_for_27438();
+}
+
+
 // Build the diagnostics array at the end so that the metadata includes error use sites.
 __build_diagnostic_array! { librustc, DIAGNOSTICS }
diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs
index ecba37c2315..b661f633388 100644
--- a/src/librustc_back/lib.rs
+++ b/src/librustc_back/lib.rs
@@ -28,9 +28,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(box_syntax)]
 #![feature(fs_canonicalize)]
diff --git a/src/librustc_back/target/apple_ios_base.rs b/src/librustc_back/target/apple_ios_base.rs
index 74c4183cfa3..77030f5d768 100644
--- a/src/librustc_back/target/apple_ios_base.rs
+++ b/src/librustc_back/target/apple_ios_base.rs
@@ -77,8 +77,8 @@ fn target_cpu(arch: Arch) -> String {
         Armv7 => "cortex-a8", // iOS7 is supported on iPhone 4 and higher
         Armv7s => "cortex-a9",
         Arm64 => "cyclone",
-        I386 => "generic",
-        X86_64 => "x86-64",
+        I386 => "yonah",
+        X86_64 => "core2",
     }.to_string()
 }
 
diff --git a/src/librustc_back/target/x86_64_pc_windows_msvc.rs b/src/librustc_back/target/x86_64_pc_windows_msvc.rs
index addaaeb1b63..85756db9606 100644
--- a/src/librustc_back/target/x86_64_pc_windows_msvc.rs
+++ b/src/librustc_back/target/x86_64_pc_windows_msvc.rs
@@ -13,6 +13,7 @@ use target::Target;
 pub fn target() -> Target {
     let mut base = super::windows_msvc_base::opts();
     base.cpu = "x86-64".to_string();
+    base.custom_unwind_resume = true;
 
     Target {
         llvm_target: "x86_64-pc-windows-msvc".to_string(),
diff --git a/src/librustc_borrowck/diagnostics.rs b/src/librustc_borrowck/diagnostics.rs
index 66865fcd97a..850701e7046 100644
--- a/src/librustc_borrowck/diagnostics.rs
+++ b/src/librustc_borrowck/diagnostics.rs
@@ -158,6 +158,60 @@ fn main(){
     x = 5;
 }
 ```
+"##,
+
+E0387: r##"
+This error occurs when an attempt is made to mutate or mutably reference data
+that a closure has captured immutably. Examples of this error are shown below:
+
+```
+// Accepts a function or a closure that captures its environment immutably.
+// Closures passed to foo will not be able to mutate their closed-over state.
+fn foo<F: Fn()>(f: F) { }
+
+// Attempts to mutate closed-over data.  Error message reads:
+// `cannot assign to data in a captured outer variable...`
+fn mutable() {
+    let mut x = 0u32;
+    foo(|| x = 2);
+}
+
+// Attempts to take a mutable reference to closed-over data.  Error message
+// reads: `cannot borrow data mutably in a captured outer variable...`
+fn mut_addr() {
+    let mut x = 0u32;
+    foo(|| { let y = &mut x; });
+}
+```
+
+The problem here is that foo is defined as accepting a parameter of type `Fn`.
+Closures passed into foo will thus be inferred to be of type `Fn`, meaning that
+they capture their context immutably.
+
+If the definition of `foo` is under your control, the simplest solution is to
+capture the data mutably. This can be done by defining `foo` to take FnMut
+rather than Fn:
+
+```
+fn foo<F: FnMut()>(f: F) { }
+```
+
+Alternatively, we can consider using the `Cell` and `RefCell` types to achieve
+interior mutability through a shared reference. Our example's `mutable` function
+could be redefined as below:
+
+```
+use std::cell::Cell;
+
+fn mutable() {
+    let x = Cell::new(0u32);
+    foo(|| x.set(2));
+}
+```
+
+You can read more about cell types in the API documentation:
+
+https://doc.rust-lang.org/std/cell/
 "##
 
 }
@@ -166,7 +220,6 @@ register_diagnostics! {
     E0383, // partial reinitialization of uninitialized structure
     E0385, // {} in an aliasable location
     E0386, // {} in an immutable container
-    E0387, // {} in a captured outer variable in an `Fn` closure
     E0388, // {} in a static location
     E0389  // {} in a `&` reference
 }
diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs
index a8457d3bf94..302e62d81dd 100644
--- a/src/librustc_borrowck/lib.rs
+++ b/src/librustc_borrowck/lib.rs
@@ -15,9 +15,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![allow(non_camel_case_types)]
 
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs
index 558d15610df..897a05952e6 100644
--- a/src/librustc_data_structures/lib.rs
+++ b/src/librustc_data_structures/lib.rs
@@ -23,9 +23,9 @@
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![staged_api]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
-      html_favicon_url = "http://www.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+      html_favicon_url = "https://www.rust-lang.org/favicon.ico",
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(rustc_private, staged_api)]
 #![cfg_attr(test, feature(test))]
@@ -38,3 +38,7 @@ pub mod graph;
 pub mod bitvec;
 pub mod ivar;
 pub mod unify;
+
+// See comments in src/librustc/lib.rs
+#[doc(hidden)]
+pub fn __noop_fix_for_27438() {}
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 13d7c7b41a0..230307f0b19 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -21,9 +21,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(box_syntax)]
 #![feature(libc)]
diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs
index 8d6dfb92987..13724760d7b 100644
--- a/src/librustc_lint/lib.rs
+++ b/src/librustc_lint/lib.rs
@@ -26,9 +26,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![cfg_attr(test, feature(test))]
 #![feature(box_patterns)]
diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs
index e0d585d6f5b..15661283aac 100644
--- a/src/librustc_llvm/lib.rs
+++ b/src/librustc_llvm/lib.rs
@@ -21,9 +21,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(associated_consts)]
 #![feature(box_syntax)]
@@ -31,7 +31,7 @@
 #![feature(link_args)]
 #![feature(staged_api)]
 #![feature(vec_push_all)]
-#![cfg_attr(not(stage0), feature(linked_from))]
+#![feature(linked_from)]
 
 extern crate libc;
 #[macro_use] #[no_link] extern crate rustc_bitflags;
@@ -599,7 +599,7 @@ pub mod debuginfo {
 // automatically updated whenever LLVM is updated to include an up-to-date
 // set of the libraries we need to link to LLVM for.
 #[link(name = "rustllvm", kind = "static")]
-#[cfg_attr(not(stage0), linked_from = "rustllvm")] // not quite true but good enough
+#[linked_from = "rustllvm"] // not quite true but good enough
 extern {
     /* Create and destroy contexts. */
     pub fn LLVMContextCreate() -> ContextRef;
diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs
index 6550a046cfa..4991904703a 100644
--- a/src/librustc_privacy/lib.rs
+++ b/src/librustc_privacy/lib.rs
@@ -15,9 +15,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(rustc_diagnostic_macros)]
 #![feature(rustc_private)]
diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs
index 5c55fc53e02..04144a50b67 100644
--- a/src/librustc_resolve/diagnostics.rs
+++ b/src/librustc_resolve/diagnostics.rs
@@ -46,7 +46,7 @@ fn f() {
 See the Declaration Statements section of the reference for more information
 about what constitutes an Item declaration and what does not:
 
-http://doc.rust-lang.org/reference.html#statements
+https://doc.rust-lang.org/reference.html#statements
 "##,
 
 E0251: r##"
@@ -201,7 +201,7 @@ struct abc;
 See the Declaration Statements section of the reference for more information
 about what constitutes an Item declaration and what does not:
 
-http://doc.rust-lang.org/reference.html#statements
+https://doc.rust-lang.org/reference.html#statements
 "##,
 
 E0317: r##"
@@ -212,7 +212,7 @@ name as an existing primitive type.
 See the Types section of the reference for more information about the primitive
 types:
 
-http://doc.rust-lang.org/reference.html#types
+https://doc.rust-lang.org/reference.html#types
 "##,
 
 E0364: r##"
@@ -241,7 +241,7 @@ pub use foo::X;
 See the 'Use Declarations' section of the reference for more information
 on this topic:
 
-http://doc.rust-lang.org/reference.html#use-declarations
+https://doc.rust-lang.org/reference.html#use-declarations
 "##,
 
 E0365: r##"
@@ -270,7 +270,7 @@ pub use foo as foo2;
 See the 'Use Declarations' section of the reference for more information
 on this topic:
 
-http://doc.rust-lang.org/reference.html#use-declarations
+https://doc.rust-lang.org/reference.html#use-declarations
 "##,
 
 E0403: r##"
@@ -627,21 +627,29 @@ trait Foo {
         Self; // error: unresolved name `Self`
     }
 }
+
+// or:
+let x = unknown_variable;  // error: unresolved name `unknown_variable`
 ```
 
-Please verify you didn't misspell the name or that you're not using an
-invalid object. Example:
+Please verify that the name wasn't misspelled and ensure that the
+identifier being referred to is valid for the given situation. Example:
 
 ```
 enum something_that_does_exist {
     foo
 }
+
 // or:
 mod something_that_does_exist {
     pub static foo : i32 = 0i32;
 }
 
 something_that_does_exist::foo; // ok!
+
+// or:
+let unknown_variable = 12u32;
+let x = unknown_variable; // ok!
 ```
 "##,
 
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index 50a8c588533..e63dbd2092a 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -15,9 +15,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(associated_consts)]
 #![feature(borrow_state)]
diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs
index af894b218ef..f4daa6e86e9 100644
--- a/src/librustc_trans/lib.rs
+++ b/src/librustc_trans/lib.rs
@@ -21,9 +21,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(box_patterns)]
 #![feature(box_syntax)]
diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs
index 716b1290817..947c902b2a9 100644
--- a/src/librustc_trans/trans/base.rs
+++ b/src/librustc_trans/trans/base.rs
@@ -745,13 +745,22 @@ pub fn invoke<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
     }
 }
 
+/// Returns whether this session's target will use SEH-based unwinding.
+///
+/// This is only true for MSVC targets, and even then the 64-bit MSVC target
+/// currently uses SEH-ish unwinding with DWARF info tables to the side (same as
+/// 64-bit MinGW) instead of "full SEH".
+pub fn wants_msvc_seh(sess: &Session) -> bool {
+    sess.target.target.options.is_like_msvc && sess.target.target.arch == "x86"
+}
+
 pub fn need_invoke(bcx: Block) -> bool {
-    // FIXME(#25869) currently unwinding is not implemented for MSVC and our
-    //               normal unwinding infrastructure ends up just causing linker
-    //               errors with the current LLVM implementation, so landing
-    //               pads are disabled entirely for MSVC targets
-    if bcx.sess().no_landing_pads() ||
-       bcx.sess().target.target.options.is_like_msvc {
+    // FIXME(#25869) currently SEH-based unwinding is pretty buggy in LLVM and
+    //               is being overhauled as this is being written. Until that
+    //               time such that upstream LLVM's implementation is more solid
+    //               and we start binding it we need to skip invokes for any
+    //               target which wants SEH-based unwinding.
+    if bcx.sess().no_landing_pads() || wants_msvc_seh(bcx.sess()) {
         return false;
     }
 
diff --git a/src/librustc_trans/trans/cabi_x86_win64.rs b/src/librustc_trans/trans/cabi_x86_win64.rs
index 262dcc47059..0a39150dbd3 100644
--- a/src/librustc_trans/trans/cabi_x86_win64.rs
+++ b/src/librustc_trans/trans/cabi_x86_win64.rs
@@ -42,10 +42,10 @@ pub fn compute_abi_info(ccx: &CrateContext,
         let ty = match t.kind() {
             Struct => {
                 match llsize_of_alloc(ccx, t) {
-                    1 => ArgType::direct(rty, Some(Type::i8(ccx)), None, None),
-                    2 => ArgType::direct(rty, Some(Type::i16(ccx)), None, None),
-                    4 => ArgType::direct(rty, Some(Type::i32(ccx)), None, None),
-                    8 => ArgType::direct(rty, Some(Type::i64(ccx)), None, None),
+                    1 => ArgType::direct(t, Some(Type::i8(ccx)), None, None),
+                    2 => ArgType::direct(t, Some(Type::i16(ccx)), None, None),
+                    4 => ArgType::direct(t, Some(Type::i32(ccx)), None, None),
+                    8 => ArgType::direct(t, Some(Type::i64(ccx)), None, None),
                     _ => ArgType::indirect(t, Some(Attribute::ByVal))
                 }
             }
diff --git a/src/librustc_trans/trans/common.rs b/src/librustc_trans/trans/common.rs
index f57612789b5..98301221f96 100644
--- a/src/librustc_trans/trans/common.rs
+++ b/src/librustc_trans/trans/common.rs
@@ -595,7 +595,7 @@ impl<'a, 'tcx> FunctionContext<'a, 'tcx> {
         // landing pads as "landing pads for SEH".
         let target = &self.ccx.sess().target.target;
         match self.ccx.tcx().lang_items.eh_personality() {
-            Some(def_id) if !target.options.is_like_msvc => {
+            Some(def_id) if !base::wants_msvc_seh(self.ccx.sess()) => {
                 callee::trans_fn_ref(self.ccx, def_id, ExprId(0),
                                      self.param_substs).val
             }
@@ -604,7 +604,7 @@ impl<'a, 'tcx> FunctionContext<'a, 'tcx> {
                 match *personality {
                     Some(llpersonality) => llpersonality,
                     None => {
-                        let name = if !target.options.is_like_msvc {
+                        let name = if !base::wants_msvc_seh(self.ccx.sess()) {
                             "rust_eh_personality"
                         } else if target.arch == "x86" {
                             "_except_handler3"
diff --git a/src/librustc_trans/trans/intrinsic.rs b/src/librustc_trans/trans/intrinsic.rs
index 0400771dff1..293a0a6a4ca 100644
--- a/src/librustc_trans/trans/intrinsic.rs
+++ b/src/librustc_trans/trans/intrinsic.rs
@@ -1037,7 +1037,7 @@ fn try_intrinsic<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
         Call(bcx, func, &[data], None, dloc);
         Store(bcx, C_null(Type::i8p(bcx.ccx())), dest);
         bcx
-    } else if bcx.sess().target.target.options.is_like_msvc {
+    } else if wants_msvc_seh(bcx.sess()) {
         trans_msvc_try(bcx, func, data, dest, dloc)
     } else {
         trans_gnu_try(bcx, func, data, dest, dloc)
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index bd4e4fc3110..fa258188eb8 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -190,7 +190,7 @@ trait_obj.method_two();
 You can read more about trait objects in the Trait Object section of the
 Reference:
 
-http://doc.rust-lang.org/reference.html#trait-objects
+https://doc.rust-lang.org/reference.html#trait-objects
 "##,
 
 E0034: r##"
@@ -642,6 +642,7 @@ item paths (ie, namespaced variables), dereferences, indexing expressions,
 and field references.
 
 Let's start with some bad examples:
+
 ```
 use std::collections::LinkedList;
 
@@ -653,8 +654,10 @@ LinkedList::new() += 1;
 fn some_func(i: &mut i32) {
     i += 12; // Error : '+=' operation cannot be applied on a reference !
 }
+```
 
 And now some good examples:
+
 ```
 let mut i : i32 = 0;
 
@@ -665,7 +668,6 @@ i += 12; // Good !
 fn some_func(i: &mut i32) {
     *i += 12; // Good !
 }
-
 ```
 "##,
 
@@ -694,6 +696,7 @@ More details can be found here:
 https://doc.rust-lang.org/reference.html#lvalues,-rvalues-and-temporaries
 
 Now, we can go further. Here are some bad examples:
+
 ```
 struct SomeStruct {
     x: i32,
@@ -1322,7 +1325,7 @@ fn bar(x: &str, y: &str) -> &str { ... }
 fn baz<'a>(x: &'a str, y: &str) -> &str { ... }
 ```
 
-[book-le]: http://doc.rust-lang.org/nightly/book/lifetimes.html#lifetime-elision
+[book-le]: https://doc.rust-lang.org/nightly/book/lifetimes.html#lifetime-elision
 "##,
 
 E0107: r##"
@@ -1840,6 +1843,22 @@ Since we know for certain that Wrapper<u32> implements Clone, there's no reason
 to also specify it in a `where` clause.
 "##,
 
+E0194: r##"
+A type parameter was declared which shadows an existing one. An example of this
+error:
+
+```
+trait Foo<T> {
+    fn do_something(&self) -> T;
+    fn do_something_else<T: Clone>(&self, bar: T);
+}
+```
+
+In this example, the trait `Foo` and the trait method `do_something_else` both
+define a type parameter `T`. This is not allowed: if the method wishes to
+define a type parameter, it must use a different name for it.
+"##,
+
 E0195: r##"
 Your method's lifetime parameters do not match the trait declaration.
 Erroneous code example:
@@ -2595,7 +2614,6 @@ register_diagnostics! {
     E0188, // can not cast a immutable reference to a mutable pointer
     E0189, // deprecated: can only cast a boxed pointer to a boxed object
     E0190, // deprecated: can only cast a &-pointer to an &-object
-    E0194,
     E0196, // cannot determine a type for this closure
     E0203, // type parameter has more than one relaxed default bound,
            // and only one is supported
diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs
index 9c0e121e156..5d7822a71bb 100644
--- a/src/librustc_typeck/lib.rs
+++ b/src/librustc_typeck/lib.rs
@@ -69,9 +69,9 @@ This API is completely unstable and subject to change.
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-      html_root_url = "http://doc.rust-lang.org/nightly/")]
+      html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![allow(non_camel_case_types)]
 
diff --git a/src/librustc_unicode/lib.rs b/src/librustc_unicode/lib.rs
index 6cd8b72cb5c..3ff40560264 100644
--- a/src/librustc_unicode/lib.rs
+++ b/src/librustc_unicode/lib.rs
@@ -26,10 +26,10 @@
 #![unstable(feature = "unicode")]
 #![staged_api]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/",
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/",
        test(no_crate_inject))]
 #![no_std]
 
@@ -41,9 +41,6 @@
 #![feature(lang_items)]
 #![feature(no_std)]
 #![feature(staged_api)]
-#![cfg_attr(stage0, feature(core, core_prelude))]
-
-#[cfg(stage0)] extern crate core;
 
 mod normalize;
 mod tables;
diff --git a/src/librustc_unicode/u_str.rs b/src/librustc_unicode/u_str.rs
index 37443cfa70c..a938312248f 100644
--- a/src/librustc_unicode/u_str.rs
+++ b/src/librustc_unicode/u_str.rs
@@ -14,8 +14,6 @@
 //! unicode parts of the CharExt trait.
 
 use self::GraphemeState::*;
-#[cfg(stage0)]
-use core::prelude::v1::*;
 
 use core::char;
 use core::cmp;
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index 4ec4ffb0c31..7388a066f22 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -598,7 +598,7 @@ mod tests {
             assert_eq!(output, expect);
         }
 
-        t("hello [Rust](http://rust-lang.org) :)", "hello Rust :)");
+        t("hello [Rust](https://www.rust-lang.org) :)", "hello Rust :)");
         t("code `let x = i32;` ...", "code `let x = i32;` ...");
         t("type `Type<'static>` ...", "type `Type<'static>` ...");
         t("# top header", "top header");
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index a19cd73fd6e..9ceb2195f03 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -15,10 +15,10 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
    html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-   html_root_url = "http://doc.rust-lang.org/nightly/",
-   html_playground_url = "http://play.rust-lang.org/")]
+   html_root_url = "https://doc.rust-lang.org/nightly/",
+   html_playground_url = "https://play.rust-lang.org/")]
 
 #![feature(box_patterns)]
 #![feature(box_syntax)]
diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs
index e7d9751cf4b..561cd8745f3 100644
--- a/src/libserialize/lib.rs
+++ b/src/libserialize/lib.rs
@@ -22,10 +22,10 @@ Core encoding and decoding interfaces.
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 
 #![feature(box_syntax)]
 #![feature(collections)]
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index 83d76481d49..8831830f799 100644
--- a/src/libstd/ffi/os_str.rs
+++ b/src/libstd/ffi/os_str.rs
@@ -32,9 +32,6 @@
 #![unstable(feature = "os_str",
             reason = "recently added as part of path/io reform")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use borrow::{Borrow, Cow, ToOwned};
 use ffi::CString;
 use fmt::{self, Debug};
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 6995ed07e99..ba32ffc49d4 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -17,9 +17,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use fmt;
 use ffi::OsString;
 use io::{self, SeekFrom, Seek, Read, Write};
diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs
index 8033d77ff6a..9590f0b7aa7 100644
--- a/src/libstd/io/cursor.rs
+++ b/src/libstd/io/cursor.rs
@@ -292,9 +292,6 @@ impl Write for Cursor<Vec<u8>> {
 
 #[cfg(test)]
 mod tests {
-    #[cfg(stage0)]
-    use core::prelude::v1::*;
-
     use io::prelude::*;
     use io::{Cursor, SeekFrom};
     use vec::Vec;
diff --git a/src/libstd/io/impls.rs b/src/libstd/io/impls.rs
index 864870a5905..a5c8ba335c1 100644
--- a/src/libstd/io/impls.rs
+++ b/src/libstd/io/impls.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use boxed::Box;
 use cmp;
 use io::{self, SeekFrom, Read, Write, Seek, BufRead, Error, ErrorKind};
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs
index d69e17cade4..33c561e3eea 100644
--- a/src/libstd/io/stdio.rs
+++ b/src/libstd/io/stdio.rs
@@ -56,21 +56,21 @@ struct StderrRaw(stdio::Stderr);
 /// The returned handle has no external synchronization or buffering.
 fn stdin_raw() -> io::Result<StdinRaw> { stdio::Stdin::new().map(StdinRaw) }
 
-/// Constructs a new raw handle to the standard input stream of this process.
+/// Constructs a new raw handle to the standard output stream of this process.
 ///
 /// The returned handle does not interact with any other handles created nor
 /// handles returned by `std::io::stdout`. Note that data is buffered by the
-/// `std::io::stdin` handles so writes which happen via this raw handle may
+/// `std::io::stdout` handles so writes which happen via this raw handle may
 /// appear before previous writes.
 ///
 /// The returned handle has no external synchronization or buffering layered on
 /// top.
 fn stdout_raw() -> io::Result<StdoutRaw> { stdio::Stdout::new().map(StdoutRaw) }
 
-/// Constructs a new raw handle to the standard input stream of this process.
+/// Constructs a new raw handle to the standard error stream of this process.
 ///
 /// The returned handle does not interact with any other handles created nor
-/// handles returned by `std::io::stdout`.
+/// handles returned by `std::io::stderr`.
 ///
 /// The returned handle has no external synchronization or buffering layered on
 /// top.
diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs
index 6e218f6ca7e..07a9548224a 100644
--- a/src/libstd/io/util.rs
+++ b/src/libstd/io/util.rs
@@ -10,9 +10,6 @@
 
 #![allow(missing_copy_implementations)]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use io::{self, Read, Write, ErrorKind, BufRead};
 
 /// Copies the entire contents of a reader into a writer.
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 7baa7558e52..6041c2d3d47 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -191,10 +191,10 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/",
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/",
        test(no_crate_inject, attr(deny(warnings))),
        test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
 
@@ -249,7 +249,6 @@
 #![cfg_attr(test, feature(float_from_str_radix, range_inclusive, float_extras, hash_default))]
 #![cfg_attr(test, feature(test, rustc_private, float_consts))]
 #![cfg_attr(target_env = "msvc", feature(link_args))]
-#![cfg_attr(stage0, feature(core, core_prelude))]
 
 // Don't link to std. We are std.
 #![no_std]
@@ -257,8 +256,6 @@
 #![allow(trivial_casts)]
 #![deny(missing_docs)]
 
-#[cfg(stage0)] #[macro_use] extern crate core;
-
 #[cfg(test)] extern crate test;
 #[cfg(test)] #[macro_use] extern crate log;
 
diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs
index 290aa6e2fda..1e1ffc19900 100644
--- a/src/libstd/net/udp.rs
+++ b/src/libstd/net/udp.rs
@@ -11,9 +11,6 @@
 #![unstable(feature = "udp", reason = "remaining functions have not been \
                                        scrutinized enough to be stabilized")]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use fmt;
 use io::{self, Error, ErrorKind};
 use net::{ToSocketAddrs, SocketAddr, IpAddr};
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs
index 64da75e94db..6a8026a807e 100644
--- a/src/libstd/num/f32.rs
+++ b/src/libstd/num/f32.rs
@@ -15,9 +15,6 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 #![allow(missing_docs)]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use core::num;
 #[cfg(not(target_env = "msvc"))]
 use intrinsics;
diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs
index fcba821522e..e757ff90fdd 100644
--- a/src/libstd/num/f64.rs
+++ b/src/libstd/num/f64.rs
@@ -15,9 +15,6 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 #![allow(missing_docs)]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use core::num;
 use intrinsics;
 use libc::c_int;
diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs
index db7fd463e07..d1ef763e0f6 100644
--- a/src/libstd/num/mod.rs
+++ b/src/libstd/num/mod.rs
@@ -43,8 +43,6 @@ pub fn test_num<T>(ten: T, two: T) where
 
 #[cfg(test)]
 mod tests {
-    #[cfg(stage0)]
-    use core::prelude::v1::*;
     use super::*;
     use i8;
     use i16;
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 5b456b580e5..489438973b3 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -98,9 +98,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use ascii::*;
 use borrow::{Borrow, IntoCow, ToOwned, Cow};
 use cmp;
@@ -135,8 +132,6 @@ use self::platform::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix};
 #[cfg(unix)]
 mod platform {
     use super::Prefix;
-    #[cfg(stage0)]
-    use core::prelude::v1::*;
     use ffi::OsStr;
 
     #[inline]
@@ -159,8 +154,6 @@ mod platform {
 
 #[cfg(windows)]
 mod platform {
-    #[cfg(stage0)]
-    use core::prelude::v1::*;
     use ascii::*;
 
     use super::{os_str_as_u8_slice, u8_slice_as_os_str, Prefix};
@@ -409,7 +402,6 @@ fn has_physical_root(s: &[u8], prefix: Option<Prefix>) -> bool {
 }
 
 // basic workhorse for splitting stem and extension
-#[allow(unused_unsafe)] // FIXME
 fn split_file_at_dot(file: &OsStr) -> (Option<&OsStr>, Option<&OsStr>) {
     unsafe {
         if os_str_as_u8_slice(file) == b".." { return (Some(file), None) }
@@ -1750,8 +1742,6 @@ impl AsRef<Path> for PathBuf {
 #[cfg(test)]
 mod tests {
     use super::*;
-    #[cfg(stage0)]
-    use core::prelude::v1::*;
     use string::{ToString, String};
     use vec::Vec;
 
diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs
index df9cd98084b..ee46ec5c9c4 100644
--- a/src/libstd/rand/mod.rs
+++ b/src/libstd/rand/mod.rs
@@ -57,9 +57,6 @@
 
 #![unstable(feature = "rand")]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use cell::RefCell;
 use io;
 use mem;
diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs
index bd31fe08421..51d5af056cb 100644
--- a/src/libstd/rand/os.rs
+++ b/src/libstd/rand/os.rs
@@ -15,7 +15,6 @@ pub use self::imp::OsRng;
 
 #[cfg(all(unix, not(target_os = "ios")))]
 mod imp {
-    #[cfg(stage0)] use prelude::v1::*;
     use self::OsRngInner::*;
 
     use fs::File;
@@ -182,12 +181,12 @@ mod imp {
 
 #[cfg(target_os = "ios")]
 mod imp {
-    use prelude::v1::*;
+    #[cfg(stage0)] use prelude::v1::*;
 
     use io;
     use mem;
     use rand::Rng;
-    use libc::{c_int, c_void, size_t};
+    use libc::{c_int, size_t};
 
     /// A random number generator that retrieves randomness straight from
     /// the operating system. Platform sources:
@@ -249,9 +248,6 @@ mod imp {
 
 #[cfg(windows)]
 mod imp {
-    #[cfg(stage0)]
-    use prelude::v1::*;
-
     use io;
     use mem;
     use rand::Rng;
diff --git a/src/libstd/rand/reader.rs b/src/libstd/rand/reader.rs
index 8ac2722f65a..36adf44cd3a 100644
--- a/src/libstd/rand/reader.rs
+++ b/src/libstd/rand/reader.rs
@@ -12,7 +12,6 @@
 
 #![allow(dead_code)]
 
-#[cfg(stage0)] use prelude::v1::*;
 use io::prelude::*;
 use rand::Rng;
 
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs
index e77a2bbd0b9..cf8bac31057 100644
--- a/src/libstd/rt/args.rs
+++ b/src/libstd/rt/args.rs
@@ -19,8 +19,6 @@
 //!
 //! FIXME #7756: Would be nice for this to not exist.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
 use vec::Vec;
 
 /// One-time global initialization.
@@ -141,8 +139,6 @@ mod imp {
           target_os = "ios",
           target_os = "windows"))]
 mod imp {
-    #[cfg(stage0)]
-    use core::prelude::v1::*;
     use vec::Vec;
 
     pub unsafe fn init(_argc: isize, _argv: *const *const u8) {
diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs
index 18d93cba8bc..9e7ed89bae1 100644
--- a/src/libstd/rt/backtrace.rs
+++ b/src/libstd/rt/backtrace.rs
@@ -12,9 +12,6 @@
 
 #![allow(non_camel_case_types)]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use env;
 use sync::atomic::{self, Ordering};
 
diff --git a/src/libstd/rt/unwind/mod.rs b/src/libstd/rt/unwind/mod.rs
index bb43eec8db1..4feb2d49a98 100644
--- a/src/libstd/rt/unwind/mod.rs
+++ b/src/libstd/rt/unwind/mod.rs
@@ -77,18 +77,18 @@ use sys_common::mutex::Mutex;
 // implementations. One goes through SEH on Windows and the other goes through
 // libgcc via the libunwind-like API.
 
-// *-pc-windows-msvc
-#[cfg(all(windows, target_env = "msvc"))]
+// i686-pc-windows-msvc
+#[cfg(all(windows, target_arch = "x86", target_env = "msvc"))]
 #[path = "seh.rs"] #[doc(hidden)]
 pub mod imp;
 
-// x86_64-pc-windows-gnu
-#[cfg(all(windows, target_arch="x86_64", target_env="gnu"))]
+// x86_64-pc-windows-*
+#[cfg(all(windows, target_arch = "x86_64"))]
 #[path = "seh64_gnu.rs"] #[doc(hidden)]
 pub mod imp;
 
 // i686-pc-windows-gnu and all others
-#[cfg(any(unix, all(windows, target_arch="x86", target_env="gnu")))]
+#[cfg(any(unix, all(windows, target_arch = "x86", target_env = "gnu")))]
 #[path = "gcc.rs"] #[doc(hidden)]
 pub mod imp;
 
diff --git a/src/libstd/sync/future.rs b/src/libstd/sync/future.rs
index d0314da19d3..506b8260278 100644
--- a/src/libstd/sync/future.rs
+++ b/src/libstd/sync/future.rs
@@ -39,8 +39,6 @@
                         outside in crates.io first")]
 #![allow(deprecated)]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
 use core::mem::replace;
 
 use boxed::Box;
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index 954edefcc45..c37c0405bbb 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -265,9 +265,6 @@
 // And now that you've seen all the races that I found and attempted to fix,
 // here's the code for you to find some more!
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use sync::Arc;
 use error;
 use fmt;
diff --git a/src/libstd/sync/mpsc/mpsc_queue.rs b/src/libstd/sync/mpsc/mpsc_queue.rs
index f45032d327f..e4eba3d3d20 100644
--- a/src/libstd/sync/mpsc/mpsc_queue.rs
+++ b/src/libstd/sync/mpsc/mpsc_queue.rs
@@ -40,9 +40,6 @@
 
 pub use self::PopResult::*;
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use alloc::boxed::Box;
 use core::ptr;
 use core::cell::UnsafeCell;
diff --git a/src/libstd/sync/mpsc/oneshot.rs b/src/libstd/sync/mpsc/oneshot.rs
index b84cb3b5472..cb930280964 100644
--- a/src/libstd/sync/mpsc/oneshot.rs
+++ b/src/libstd/sync/mpsc/oneshot.rs
@@ -37,9 +37,6 @@ pub use self::UpgradeResult::*;
 pub use self::SelectionResult::*;
 use self::MyUpgrade::*;
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use sync::mpsc::Receiver;
 use sync::mpsc::blocking::{self, SignalToken};
 use core::mem;
diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs
index c46e61cf414..56d903fed3b 100644
--- a/src/libstd/sync/mpsc/select.rs
+++ b/src/libstd/sync/mpsc/select.rs
@@ -57,9 +57,6 @@
                       but no guarantees beyond this are being made")]
 
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::cell::{Cell, UnsafeCell};
 use core::marker;
 use core::ptr;
diff --git a/src/libstd/sync/mpsc/shared.rs b/src/libstd/sync/mpsc/shared.rs
index 8c019395d30..a3779931c7b 100644
--- a/src/libstd/sync/mpsc/shared.rs
+++ b/src/libstd/sync/mpsc/shared.rs
@@ -20,9 +20,6 @@
 
 pub use self::Failure::*;
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::cmp;
 use core::isize;
 
diff --git a/src/libstd/sync/mpsc/spsc_queue.rs b/src/libstd/sync/mpsc/spsc_queue.rs
index 5c0db521007..819f75c006b 100644
--- a/src/libstd/sync/mpsc/spsc_queue.rs
+++ b/src/libstd/sync/mpsc/spsc_queue.rs
@@ -33,9 +33,6 @@
 //! concurrently between two threads. This data structure is safe to use and
 //! enforces the semantics that there is one pusher and one popper.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use alloc::boxed::Box;
 use core::ptr;
 use core::cell::UnsafeCell;
diff --git a/src/libstd/sync/mpsc/stream.rs b/src/libstd/sync/mpsc/stream.rs
index a9514da4698..a9da1b12f7d 100644
--- a/src/libstd/sync/mpsc/stream.rs
+++ b/src/libstd/sync/mpsc/stream.rs
@@ -22,9 +22,6 @@ pub use self::UpgradeResult::*;
 pub use self::SelectionResult::*;
 use self::Message::*;
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::cmp;
 use core::isize;
 use thread;
diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs
index 7c9298fff2a..84d758cf9b3 100644
--- a/src/libstd/sync/mpsc/sync.rs
+++ b/src/libstd/sync/mpsc/sync.rs
@@ -33,9 +33,6 @@
 /// of a synchronous channel. There are a few branches for the unbuffered case,
 /// but they're mostly just relevant to blocking senders.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 pub use self::Failure::*;
 use self::Blocker::*;
 
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs
index 53191e14bec..a91e1321149 100644
--- a/src/libstd/sync/once.rs
+++ b/src/libstd/sync/once.rs
@@ -13,9 +13,6 @@
 //! This primitive is meant to be used to run one-time initialization. An
 //! example use case would be for initializing an FFI library.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use isize;
 use sync::atomic::{AtomicIsize, Ordering};
 use sync::StaticMutex;
diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs
index 17953d0af4e..7f56afc9e1f 100644
--- a/src/libstd/sys/common/backtrace.rs
+++ b/src/libstd/sys/common/backtrace.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
 use io::prelude::*;
 
 use io;
diff --git a/src/libstd/sys/common/mod.rs b/src/libstd/sys/common/mod.rs
index d63b66c42c7..aca1f42c529 100644
--- a/src/libstd/sys/common/mod.rs
+++ b/src/libstd/sys/common/mod.rs
@@ -10,9 +10,6 @@
 
 #![allow(missing_docs)]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 pub mod backtrace;
 pub mod condvar;
 pub mod mutex;
@@ -51,7 +48,3 @@ pub trait IntoInner<Inner> {
 pub trait FromInner<Inner> {
     fn from_inner(inner: Inner) -> Self;
 }
-
-#[cfg(stage0)]
-#[lang = "stack_exhausted"]
-pub fn stack_exhausted() {}
diff --git a/src/libstd/sys/common/poison.rs b/src/libstd/sys/common/poison.rs
index 196fe37d456..c6917d8fca5 100644
--- a/src/libstd/sys/common/poison.rs
+++ b/src/libstd/sys/common/poison.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use cell::Cell;
 use error::{Error};
 use fmt;
diff --git a/src/libstd/sys/common/thread_info.rs b/src/libstd/sys/common/thread_info.rs
index fb4e0ec70e0..0467c67167b 100644
--- a/src/libstd/sys/common/thread_info.rs
+++ b/src/libstd/sys/common/thread_info.rs
@@ -10,9 +10,6 @@
 
 #![allow(dead_code)] // stack_guard isn't used right now on all platforms
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use cell::RefCell;
 use string::String;
 use thread::Thread;
diff --git a/src/libstd/sys/common/thread_local.rs b/src/libstd/sys/common/thread_local.rs
index 2269a053874..f68c57c86ef 100644
--- a/src/libstd/sys/common/thread_local.rs
+++ b/src/libstd/sys/common/thread_local.rs
@@ -58,9 +58,6 @@
 #![unstable(feature = "thread_local_internals")]
 #![allow(dead_code)] // sys isn't exported yet
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use sync::atomic::{self, AtomicUsize, Ordering};
 
 use sys::thread_local as imp;
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs
index 0a5f4563dea..9e4a80a411b 100644
--- a/src/libstd/sys/common/wtf8.rs
+++ b/src/libstd/sys/common/wtf8.rs
@@ -25,9 +25,6 @@
 // unix (it's mostly used on windows), so don't worry about dead code here.
 #![allow(dead_code)]
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use core::char::{encode_utf8_raw, encode_utf16_raw};
 use core::str::next_code_point;
 
diff --git a/src/libstd/sys/unix/backtrace.rs b/src/libstd/sys/unix/backtrace.rs
index 4128431ee64..853e745b8a1 100644
--- a/src/libstd/sys/unix/backtrace.rs
+++ b/src/libstd/sys/unix/backtrace.rs
@@ -83,8 +83,6 @@
 /// to symbols. This is a bit of a hokey implementation as-is, but it works for
 /// all unix platforms we support right now, so it at least gets the job done.
 
-#[cfg(stage0)]
-use prelude::v1::*;
 use io::prelude::*;
 
 use ffi::CStr;
@@ -107,6 +105,8 @@ use sys_common::backtrace::*;
 #[cfg(all(target_os = "ios", target_arch = "arm"))]
 #[inline(never)]
 pub fn write(w: &mut Write) -> io::Result<()> {
+    use mem;
+
     extern {
         fn backtrace(buf: *mut *mut libc::c_void,
                      sz: libc::c_int) -> libc::c_int;
@@ -121,7 +121,7 @@ pub fn write(w: &mut Write) -> io::Result<()> {
     try!(writeln!(w, "stack backtrace:"));
     // 100 lines should be enough
     const SIZE: usize = 100;
-    let mut buf: [*mut libc::c_void; SIZE] = unsafe {mem::zeroed()};
+    let mut buf: [*mut libc::c_void; SIZE] = unsafe { mem::zeroed() };
     let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as usize};
 
     // skipping the first one as it is write itself
diff --git a/src/libstd/sys/unix/condvar.rs b/src/libstd/sys/unix/condvar.rs
index 5d18c1d6280..b9538867b25 100644
--- a/src/libstd/sys/unix/condvar.rs
+++ b/src/libstd/sys/unix/condvar.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use cell::UnsafeCell;
 use libc;
 use ptr;
diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs
index dca7f6e829f..9bcd62dbdd1 100644
--- a/src/libstd/sys/unix/ext/fs.rs
+++ b/src/libstd/sys/unix/ext/fs.rs
@@ -12,9 +12,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use fs::{self, Permissions, OpenOptions};
 use io;
 use libc;
diff --git a/src/libstd/sys/unix/ext/process.rs b/src/libstd/sys/unix/ext/process.rs
index e984c577935..4ff6daf84c1 100644
--- a/src/libstd/sys/unix/ext/process.rs
+++ b/src/libstd/sys/unix/ext/process.rs
@@ -14,8 +14,6 @@
 
 use os::unix::raw::{uid_t, gid_t};
 use os::unix::io::{FromRawFd, RawFd, AsRawFd, IntoRawFd};
-#[cfg(stage0)]
-use prelude::v1::*;
 use process;
 use sys;
 use sys_common::{AsInnerMut, AsInner, FromInner, IntoInner};
diff --git a/src/libstd/sys/unix/fd.rs b/src/libstd/sys/unix/fd.rs
index bdbe120f79d..4ac498f77ce 100644
--- a/src/libstd/sys/unix/fd.rs
+++ b/src/libstd/sys/unix/fd.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use io;
 use libc::{self, c_int, size_t, c_void};
 use mem;
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs
index e671b2c8e0d..922a213f9c2 100644
--- a/src/libstd/sys/unix/fs.rs
+++ b/src/libstd/sys/unix/fs.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
 use io::prelude::*;
 use os::unix::prelude::*;
 
diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs
index 85dc8752443..2efca0257f3 100644
--- a/src/libstd/sys/unix/mod.rs
+++ b/src/libstd/sys/unix/mod.rs
@@ -11,9 +11,6 @@
 #![allow(missing_docs)]
 #![allow(non_camel_case_types)]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use io::{self, ErrorKind};
 use libc;
 use num::One;
diff --git a/src/libstd/sys/unix/mutex.rs b/src/libstd/sys/unix/mutex.rs
index a6132b37a66..e4c231ff971 100644
--- a/src/libstd/sys/unix/mutex.rs
+++ b/src/libstd/sys/unix/mutex.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use cell::UnsafeCell;
 use sys::sync as ffi;
 use mem;
diff --git a/src/libstd/sys/unix/os_str.rs b/src/libstd/sys/unix/os_str.rs
index e21d88676e7..f0f08a72ed8 100644
--- a/src/libstd/sys/unix/os_str.rs
+++ b/src/libstd/sys/unix/os_str.rs
@@ -11,9 +11,6 @@
 /// The underlying OsString/OsStr implementation on Unix systems: just
 /// a `Vec<u8>`/`[u8]`.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use borrow::Cow;
 use fmt::{self, Debug};
 use vec::Vec;
diff --git a/src/libstd/sys/unix/pipe.rs b/src/libstd/sys/unix/pipe.rs
index 2abd74bea1b..5c29c4c0811 100644
--- a/src/libstd/sys/unix/pipe.rs
+++ b/src/libstd/sys/unix/pipe.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use sys::fd::FileDesc;
 use io;
 use libc;
diff --git a/src/libstd/sys/unix/rwlock.rs b/src/libstd/sys/unix/rwlock.rs
index 50b4907e6ca..788bff62430 100644
--- a/src/libstd/sys/unix/rwlock.rs
+++ b/src/libstd/sys/unix/rwlock.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use libc;
 use cell::UnsafeCell;
 use sys::sync as ffi;
diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs
index 4e4cf2b0ed1..1aa75fa18b7 100644
--- a/src/libstd/sys/unix/stack_overflow.rs
+++ b/src/libstd/sys/unix/stack_overflow.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
-
 use libc;
 use self::imp::{make_handler, drop_handler};
 
diff --git a/src/libstd/sys/unix/stdio.rs b/src/libstd/sys/unix/stdio.rs
index 8542c660c26..c87800a1498 100644
--- a/src/libstd/sys/unix/stdio.rs
+++ b/src/libstd/sys/unix/stdio.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use io;
 use libc;
 use sys::fd::FileDesc;
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index fc0bb81f9a8..8d59461f1e4 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -163,9 +163,6 @@ impl Drop for Thread {
           not(target_os = "netbsd"),
           not(target_os = "openbsd")))]
 pub mod guard {
-    #[cfg(stage0)]
-    use prelude::v1::*;
-
     pub unsafe fn current() -> Option<usize> { None }
     pub unsafe fn init() -> Option<usize> { None }
 }
diff --git a/src/libstd/sys/unix/thread_local.rs b/src/libstd/sys/unix/thread_local.rs
index 5626446b31c..c375788fdc1 100644
--- a/src/libstd/sys/unix/thread_local.rs
+++ b/src/libstd/sys/unix/thread_local.rs
@@ -10,8 +10,6 @@
 
 #![allow(dead_code)] // sys isn't exported yet
 
-#[cfg(stage0)]
-use prelude::v1::*;
 use libc::c_int;
 
 pub type Key = pthread_key_t;
diff --git a/src/libstd/sys/windows/backtrace.rs b/src/libstd/sys/windows/backtrace.rs
index d84513c5f95..7078ee92085 100644
--- a/src/libstd/sys/windows/backtrace.rs
+++ b/src/libstd/sys/windows/backtrace.rs
@@ -24,8 +24,6 @@
 
 #![allow(dead_code)]
 
-#[cfg(stage0)]
-use prelude::v1::*;
 use io::prelude::*;
 
 use dynamic_lib::DynamicLibrary;
diff --git a/src/libstd/sys/windows/condvar.rs b/src/libstd/sys/windows/condvar.rs
index f3edcfd420c..ac76479d7db 100644
--- a/src/libstd/sys/windows/condvar.rs
+++ b/src/libstd/sys/windows/condvar.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use cell::UnsafeCell;
 use libc::{self, DWORD};
 use sys::c;
diff --git a/src/libstd/sys/windows/ext/fs.rs b/src/libstd/sys/windows/ext/fs.rs
index e15d1f0ec15..66f42db42cf 100644
--- a/src/libstd/sys/windows/ext/fs.rs
+++ b/src/libstd/sys/windows/ext/fs.rs
@@ -12,9 +12,6 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use fs::{OpenOptions, Metadata};
 use io;
 use path::Path;
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index 8d81d6576ff..b8c3f1e7b35 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use core::prelude::v1::*;
 use io::prelude::*;
 use os::windows::prelude::*;
 
diff --git a/src/libstd/sys/windows/handle.rs b/src/libstd/sys/windows/handle.rs
index 91fe131c251..a9e9b0e2520 100644
--- a/src/libstd/sys/windows/handle.rs
+++ b/src/libstd/sys/windows/handle.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use io::ErrorKind;
 use io;
 use libc::funcs::extra::kernel32::{GetCurrentProcess, DuplicateHandle};
diff --git a/src/libstd/sys/windows/net.rs b/src/libstd/sys/windows/net.rs
index f2aca8d1a6e..02c5bc1f0ab 100644
--- a/src/libstd/sys/windows/net.rs
+++ b/src/libstd/sys/windows/net.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use io;
 use libc::consts::os::extra::INVALID_SOCKET;
 use libc::{self, c_int, c_void};
diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs
index 4044c429d49..7e286b91f4a 100644
--- a/src/libstd/sys/windows/pipe.rs
+++ b/src/libstd/sys/windows/pipe.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use io;
 use libc;
 use sys::cvt;
diff --git a/src/libstd/sys/windows/rwlock.rs b/src/libstd/sys/windows/rwlock.rs
index 010ffe76fba..3e81ebfcedf 100644
--- a/src/libstd/sys/windows/rwlock.rs
+++ b/src/libstd/sys/windows/rwlock.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use cell::UnsafeCell;
 use sys::c;
 
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index a9d094375b2..cf1b3ebddb9 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -81,9 +81,6 @@ impl Thread {
 }
 
 pub mod guard {
-    #[cfg(stage0)]
-    use prelude::v1::*;
-
     pub unsafe fn current() -> Option<usize> { None }
     pub unsafe fn init() -> Option<usize> { None }
 }
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
index 0615033736e..3bf170b5fe2 100644
--- a/src/libstd/thread/local.rs
+++ b/src/libstd/thread/local.rs
@@ -12,9 +12,6 @@
 
 #![unstable(feature = "thread_local_internals")]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use cell::UnsafeCell;
 
 // Sure wish we had macro hygiene, no?
@@ -272,9 +269,6 @@ impl<T: 'static> LocalKey<T> {
           not(no_elf_tls)))]
 #[doc(hidden)]
 mod imp {
-    #[cfg(stage0)]
-    use prelude::v1::*;
-
     use cell::{Cell, UnsafeCell};
     use intrinsics;
     use ptr;
diff --git a/src/libstd/thread/scoped_tls.rs b/src/libstd/thread/scoped_tls.rs
index 1ea33a01791..303ab0f9f01 100644
--- a/src/libstd/thread/scoped_tls.rs
+++ b/src/libstd/thread/scoped_tls.rs
@@ -42,9 +42,6 @@
 
 #![unstable(feature = "thread_local_internals")]
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 #[doc(hidden)]
 pub use self::imp::KeyInner as __KeyInner;
 
@@ -250,9 +247,6 @@ mod imp {
           no_elf_tls))]
 #[doc(hidden)]
 mod imp {
-    #[cfg(stage0)]
-    use prelude::v1::*;
-
     use cell::Cell;
     use marker;
     use sys_common::thread_local::StaticKey as OsStaticKey;
@@ -280,8 +274,6 @@ mod imp {
 #[cfg(test)]
 mod tests {
     use cell::Cell;
-    #[cfg(stage0)]
-    use prelude::v1::*;
 
     scoped_thread_local!(static FOO: u32);
 
diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs
index 5270f9e6180..ba9c3157b02 100644
--- a/src/libstd/time/duration.rs
+++ b/src/libstd/time/duration.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[cfg(stage0)]
-use prelude::v1::*;
-
 use ops::{Add, Sub, Mul, Div};
 use sys::time::SteadyTime;
 
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 307403fda9a..bcc90dc47d9 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -941,7 +941,7 @@ pub enum Expr_ {
     /// `Foo {x: 1, .. base}`, where `base` is the `Option<Expr>`.
     ExprStruct(Path, Vec<Field>, Option<P<Expr>>),
 
-    /// A vector literal constructed from one repeated element.
+    /// An array literal constructed from one repeated element.
     ///
     /// For example, `[1u8; 5]`. The first expression is the element
     /// to be repeated; the second is the number of times to repeat it.
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs
index 48fd05a7550..6c3bee3f48e 100644
--- a/src/libsyntax/diagnostics/plugin.rs
+++ b/src/libsyntax/diagnostics/plugin.rs
@@ -115,7 +115,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt,
         }
 
         // URLs can be unavoidably longer than the line limit, so we allow them.
-        // Allowed format is: `[name]: http://rust-lang.org/`
+        // Allowed format is: `[name]: https://www.rust-lang.org/`
         let is_url = |l: &str| l.starts_with('[') && l.contains("]:") && l.contains("http");
 
         if msg.lines().any(|line| line.len() > MAX_DESCRIPTION_WIDTH && !is_url(line)) {
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 5424c0b214a..94c920406c4 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -21,9 +21,9 @@
 #![staged_api]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(associated_consts)]
 #![feature(bitset)]
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 77042547742..e6242690ac0 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2075,7 +2075,7 @@ impl<'a> Parser<'a> {
                     // Nonempty vector.
                     let first_expr = try!(self.parse_expr_nopanic());
                     if self.check(&token::Semi) {
-                        // Repeating vector syntax: [ 0; 512 ]
+                        // Repeating array syntax: [ 0; 512 ]
                         try!(self.bump());
                         let count = try!(self.parse_expr_nopanic());
                         try!(self.expect(&token::CloseDelim(token::Bracket)));
@@ -3260,7 +3260,7 @@ impl<'a> Parser<'a> {
             pat = PatTup(fields);
           }
           token::OpenDelim(token::Bracket) => {
-            // Parse [pat,pat,...] as vector pattern
+            // Parse [pat,pat,...] as slice pattern
             try!(self.bump());
             let (before, slice, after) = try!(self.parse_pat_vec_elements());
             try!(self.expect(&token::CloseDelim(token::Bracket)));
diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs
index 8601f59138c..69f0d186ed0 100644
--- a/src/libterm/lib.rs
+++ b/src/libterm/lib.rs
@@ -49,10 +49,10 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/",
-       html_playground_url = "http://play.rust-lang.org/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 #![deny(missing_docs)]
 
 #![feature(box_syntax)]
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index a7fb88215b7..54c0cbc67be 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -30,9 +30,9 @@
 #![staged_api]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/nightly/")]
+       html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 #![feature(asm)]
 #![feature(box_syntax)]
diff --git a/src/rt/empty.c b/src/rt/empty.c
deleted file mode 100644
index 6a54ed322de..00000000000
--- a/src/rt/empty.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
diff --git a/src/rustbook/build.rs b/src/rustbook/build.rs
index 3ac71c167cd..a1f4539443d 100644
--- a/src/rustbook/build.rs
+++ b/src/rustbook/build.rs
@@ -143,7 +143,7 @@ fn render(book: &Book, tgt: &Path) -> CliResult<()> {
             format!("-o{}", out_path.display()),
             format!("--html-before-content={}", prelude.display()),
             format!("--html-after-content={}", postlude.display()),
-            format!("--markdown-playground-url=http://play.rust-lang.org"),
+            format!("--markdown-playground-url=https://play.rust-lang.org"),
             format!("--markdown-css={}", item.path_to_root.join("rust-book.css").display()),
             "--markdown-no-toc".to_string(),
         ];
diff --git a/src/snapshots.txt b/src/snapshots.txt
index 31803fb18f6..704c1b0b835 100644
--- a/src/snapshots.txt
+++ b/src/snapshots.txt
@@ -1,3 +1,14 @@
+S 2015-08-11 1af31d4
+  bitrig-x86_64 0000000000000000000000000000000000000000
+  freebsd-i386 0000000000000000000000000000000000000000
+  freebsd-x86_64 0000000000000000000000000000000000000000
+  linux-i386 e2553bf399cd134a08ef3511a0a6ab0d7a667216
+  linux-x86_64 7df8ba9dec63ec77b857066109d4b6250f3d222f
+  macos-i386 29750870c82a0347f8b8b735a4e2e0da26f5098d
+  macos-x86_64 c9f2c588238b4c6998190c3abeb33fd6164099a2
+  winnt-i386 dc01ac690efdcc40eb6fd8154205a1f21893eb6c
+  winnt-x86_64 1464a2e54768498222277f904ccd559e27608950
+
 S 2015-07-26 a5c12f4
   bitrig-x86_64 8734eb41ffbe6ddc1120aa2910db4162ec9cf270
   freebsd-i386 2fee22adec101e2f952a5548fd1437ce1bd8d26f
diff --git a/src/test/bench/shootout-fasta-redux.rs b/src/test/bench/shootout-fasta-redux.rs
index 3f3c9e52220..963a007c685 100644
--- a/src/test/bench/shootout-fasta-redux.rs
+++ b/src/test/bench/shootout-fasta-redux.rs
@@ -87,16 +87,12 @@ static HOMO_SAPIENS: [AminoAcid;4] = [
     AminoAcid { c: 't' as u8, p: 0.3015094502008 },
 ];
 
-// FIXME: Use map().
 fn sum_and_scale(a: &'static [AminoAcid]) -> Vec<AminoAcid> {
-    let mut result = Vec::new();
     let mut p = 0f32;
-    for a_i in a {
-        let mut a_i = *a_i;
+    let mut result: Vec<AminoAcid> = a.iter().map(|a_i| {
         p += a_i.p;
-        a_i.p = p * LOOKUP_SCALE;
-        result.push(a_i);
-    }
+        AminoAcid { c: a_i.c, p: p * LOOKUP_SCALE }
+    }).collect();
     let result_len = result.len();
     result[result_len - 1].p = LOOKUP_SCALE;
     result
@@ -177,17 +173,17 @@ impl<'a, W: Write> RandomFasta<'a, W> {
 
     fn rng(&mut self, max: f32) -> f32 {
         self.seed = (self.seed * IA + IC) % IM;
-        max * (self.seed as f32) / (IM as f32)
+        (max * self.seed as f32) / (IM as f32)
     }
 
     fn nextc(&mut self) -> u8 {
-        let r = self.rng(1.0);
-        for a in &self.lookup[..] {
-            if a.p >= r {
-                return a.c;
+        let r = self.rng(LOOKUP_SCALE);
+        for i in (r as usize..LOOKUP_SIZE) {
+            if self.lookup[i].p >= r {
+                return self.lookup[i].c;
             }
         }
-        0
+        unreachable!();
     }
 
     fn make(&mut self, n: usize) -> io::Result<()> {
@@ -217,7 +213,8 @@ fn main() {
         5
     };
 
-    let mut out = io::stdout();
+    let stdout = io::stdout();
+    let mut out = stdout.lock();
 
     out.write_all(b">ONE Homo sapiens alu\n").unwrap();
     {
diff --git a/src/test/compile-fail/loops-reject-duplicate-labels-2.rs b/src/test/compile-fail/loops-reject-duplicate-labels-2.rs
index 68627ecaa71..4a3338c4bf6 100644
--- a/src/test/compile-fail/loops-reject-duplicate-labels-2.rs
+++ b/src/test/compile-fail/loops-reject-duplicate-labels-2.rs
@@ -16,7 +16,7 @@
 //
 // This is testing the generalization (to the whole function body)
 // discussed here:
-// http://internals.rust-lang.org/t/psa-rejecting-duplicate-loop-labels/1833
+// https://internals.rust-lang.org/t/psa-rejecting-duplicate-loop-labels/1833
 
 pub fn foo() {
     { 'fl: for _ in 0..10 { break; } }   //~ NOTE shadowed label `'fl` declared here
diff --git a/src/test/run-pass/backtrace-debuginfo.rs b/src/test/run-pass/backtrace-debuginfo.rs
index 8f41c68b047..f889e381dc4 100644
--- a/src/test/run-pass/backtrace-debuginfo.rs
+++ b/src/test/run-pass/backtrace-debuginfo.rs
@@ -8,7 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// compile-flags:-g
+// We disable tail merging here because it can't preserve debuginfo and thus
+// potentially breaks the backtraces. Also, subtle changes can decide whether
+// tail merging suceeds, so the test might work today but fail tomorrow due to a
+// seemingly completely unrelated change.
+// Unfortunately, LLVM has no "disable" option for this, so we have to set
+// "enable" to 0 instead.
+// compile-flags:-g -Cllvm-args=-enable-tail-merge=0
 // ignore-pretty as this critically relies on line numbers
 
 use std::io;
@@ -97,6 +103,10 @@ fn inner_inlined(counter: &mut i32, main_pos: Pos, outer_pos: Pos) {
     let inner_pos = pos!(); aux::callback_inlined(|aux_pos| {
         check!(counter; main_pos, outer_pos, inner_pos, aux_pos);
     });
+
+    // this tests a distinction between two independent calls to the inlined function.
+    // (un)fortunately, LLVM somehow merges two consecutive such calls into one node.
+    inner_further_inlined(counter, main_pos, outer_pos, pos!());
 }
 
 #[inline(never)]
diff --git a/src/test/run-pass/cleanup-arm-conditional.rs b/src/test/run-pass/cleanup-arm-conditional.rs
index b62f2b2a8eb..58d7c1df19c 100644
--- a/src/test/run-pass/cleanup-arm-conditional.rs
+++ b/src/test/run-pass/cleanup-arm-conditional.rs
@@ -8,16 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// copyright 2014 the rust project developers. see the copyright
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/copyright.
-//
-// licensed under the apache license, version 2.0 <license-apache or
-// http://www.apache.org/licenses/license-2.0> or the mit license
-// <license-mit or http://opensource.org/licenses/mit>, at your
-// option. this file may not be copied, modified, or distributed
-// except according to those terms.
-
 // Test that cleanup scope for temporaries created in a match
 // arm is confined to the match arm itself.
 
diff --git a/src/test/run-pass/cleanup-shortcircuit.rs b/src/test/run-pass/cleanup-shortcircuit.rs
index 0cfe739018c..6744d7d413d 100644
--- a/src/test/run-pass/cleanup-shortcircuit.rs
+++ b/src/test/run-pass/cleanup-shortcircuit.rs
@@ -8,16 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// copyright 2014 the rust project developers. see the copyright
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/copyright.
-//
-// licensed under the apache license, version 2.0 <license-apache or
-// http://www.apache.org/licenses/license-2.0> or the mit license
-// <license-mit or http://opensource.org/licenses/mit>, at your
-// option. this file may not be copied, modified, or distributed
-// except according to those terms.
-
 // Test that cleanups for the RHS of shortcircuiting operators work.
 
 // pretty-expanded FIXME #23616