about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-02-06 07:02:25 +0000
committerbors <bors@rust-lang.org>2018-02-06 07:02:25 +0000
commitb224fc84e3438117b218ec6b57fdc3ea8a3d1c2e (patch)
treefdea43c93e46ce70ebc3a9f102a0bfa37cd6e69b
parent6c04c41034c46730fba97bfe9cfa2dd0687c2a5f (diff)
parent0553dc81d38cf7bd81334477b0338ef46da50e18 (diff)
downloadrust-b224fc84e3438117b218ec6b57fdc3ea8a3d1c2e.tar.gz
rust-b224fc84e3438117b218ec6b57fdc3ea8a3d1c2e.zip
Auto merge of #48017 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #46030, #47496, #47543, #47704, #47753, #47807, #47948, #47959, #48003, #48007
- Failed merges:
-rw-r--r--src/Cargo.lock51
m---------src/doc/book0
m---------src/doc/reference0
-rw-r--r--src/doc/unstable-book/src/language-features/use-nested-groups.md90
-rw-r--r--src/libcore/convert.rs6
-rw-r--r--src/librustc/lint/context.rs19
-rw-r--r--src/librustc_borrowck/borrowck/mod.rs12
-rw-r--r--src/librustc_save_analysis/lib.rs13
-rw-r--r--src/libstd/ffi/c_str.rs18
-rw-r--r--src/libsyntax/feature_gate.rs28
-rw-r--r--src/libsyntax_ext/asm.rs6
-rw-r--r--src/test/codegen/no-output-asm-is-volatile.rs (renamed from src/test/ui/feature-gate-use_nested_groups.rs)29
-rw-r--r--src/test/compile-fail/absolute-paths-in-nested-use-groups.rs1
-rw-r--r--src/test/compile-fail/issue-42344.rs17
-rw-r--r--src/test/compile-fail/issue-44415.rs22
-rw-r--r--src/test/compile-fail/issue-46604.rs3
-rw-r--r--src/test/run-make/save-analysis-fail/foo.rs8
-rw-r--r--src/test/run-make/save-analysis/extra-docs.md1
-rw-r--r--src/test/run-make/save-analysis/foo.rs4
-rw-r--r--src/test/run-pass/issue-47673.rs1
-rw-r--r--src/test/run-pass/use-nested-groups.rs2
-rw-r--r--src/test/rustdoc/issue-47639.rs16
-rw-r--r--src/test/ui/feature-gate-use_nested_groups.stderr26
-rw-r--r--src/test/ui/use-nested-groups-error.rs2
-rw-r--r--src/test/ui/use-nested-groups-error.stderr4
-rw-r--r--src/tools/rustbook/Cargo.toml2
-rw-r--r--src/tools/rustbook/src/main.rs10
-rw-r--r--src/tools/tidy/src/deps.rs2
28 files changed, 186 insertions, 207 deletions
diff --git a/src/Cargo.lock b/src/Cargo.lock
index 23ec918a865..1393dd46d6b 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -929,6 +929,11 @@ dependencies = [
 ]
 
 [[package]]
+name = "is-match"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
 name = "itertools"
 version = "0.6.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -937,6 +942,14 @@ dependencies = [
 ]
 
 [[package]]
+name = "itertools"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
 name = "itoa"
 version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1129,23 +1142,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "mdbook"
-version = "0.0.28"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
+ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "handlebars 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "pulldown-cmark 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "toml-query 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -1695,7 +1713,7 @@ name = "rustbook"
 version = "0.1.0"
 dependencies = [
  "clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "mdbook 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mdbook 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -2380,6 +2398,11 @@ version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
+name = "shlex"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
 name = "siphasher"
 version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2703,6 +2726,18 @@ dependencies = [
 ]
 
 [[package]]
+name = "toml-query"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
 name = "unicode-bidi"
 version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2992,7 +3027,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
 "checksum if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "61bb90bdd39e3af69b0172dfc6130f6cd6332bf040fbb9bdd4401d37adbd48b8"
 "checksum ignore 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb2f0238094bd1b41800fb6eb9b16fdd5e9832ed6053ed91409f0cd5bf28dcfd"
+"checksum is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5b386aef33a1c677be65237cb9d32c3f3ef56bd035949710c4bb13083eb053"
 "checksum itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3f2be4da1690a039e9ae5fd575f706a63ad5a2120f161b1d653c9da3930dd21"
+"checksum itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b07332223953b5051bceb67e8c4700aa65291535568e1f12408c43c4a42c0394"
 "checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c"
 "checksum jobserver 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "565f6106bd87b394398f813bea4e5ecad6d6b0f6aa077592d088f882a506481d"
 "checksum json 0.11.12 (registry+https://github.com/rust-lang/crates.io-index)" = "39ebf0fac977ee3a4a3242b6446004ff64514889e3e2730bbd4f764a67a2e483"
@@ -3014,7 +3051,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
 "checksum markup5ever 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "047150a0e03b57e638fc45af33a0b63a0362305d5b9f92ecef81df472a4cceb0"
 "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
-"checksum mdbook 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "1ee8ba20c002000546681dc78d7f7e91fd35832058b1e2fdd492ca842bb6e9be"
+"checksum mdbook 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fef236caad7ba3b5b3944df946f19ab3e190bca53c111dd00fe05fa8d879f2fd"
 "checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
 "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
 "checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"
@@ -3094,6 +3131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c9db7266c7d63a4c4b7fe8719656ccdd51acf1bed6124b174f933b009fb10bcb"
 "checksum shared_child 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "099b38928dbe4a0a01fcd8c233183072f14a7d126a34bed05880869be66e14cc"
 "checksum shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5cc96481d54583947bfe88bf30c23d53f883c6cd0145368b69989d97b84ef8"
+"checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"
 "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
 "checksum smallvec 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4f8266519bc1d17d0b5b16f6c21295625d562841c708f6376f49028a43e9c11e"
 "checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9"
@@ -3122,6 +3160,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098"
 "checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4"
 "checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e"
+"checksum toml-query 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6854664bfc6df0360c695480836ee90e2d0c965f06db291d10be9344792d43e8"
 "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
 "checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f"
 "checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946"
diff --git a/src/doc/book b/src/doc/book
-Subproject 194eb8d5f1753fb5f4501011cebdc1b58571247
+Subproject a645960fe48946153936dd5628df4a90bd83798
diff --git a/src/doc/reference b/src/doc/reference
-Subproject 1d791b55b23ec5389fbd5b3cee80db3f8bbdd16
+Subproject e6a5d5d10aa2fde0baed7b29bf672bd9f3af896
diff --git a/src/doc/unstable-book/src/language-features/use-nested-groups.md b/src/doc/unstable-book/src/language-features/use-nested-groups.md
deleted file mode 100644
index 47b635bad73..00000000000
--- a/src/doc/unstable-book/src/language-features/use-nested-groups.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# `use_nested_groups`
-
-The tracking issue for this feature is: [#44494]
-
-[#44494]: https://github.com/rust-lang/rust/issues/44494
-
-------------------------
-
-The `use_nested_groups` feature allows you to import multiple items from a
-complex module tree easily, by nesting different imports in the same
-declaration. For example:
-
-```rust
-#![feature(use_nested_groups)]
-# #![allow(unused_imports, dead_code)]
-#
-# mod foo {
-#     pub mod bar {
-#         pub type Foo = ();
-#     }
-#     pub mod baz {
-#         pub mod quux {
-#             pub type Bar = ();
-#         }
-#     }
-# }
-
-use foo::{
-    bar::{self, Foo},
-    baz::{*, quux::Bar},
-};
-#
-# fn main() {}
-```
-
-## Snippet for the book's new features appendix
-
-When stabilizing, add this to
-`src/doc/book/second-edition/src/appendix-07-newest-features.md`:
-
-### Nested groups in `use` declarations
-
-If you have a complex module tree with many different submodules and you need
-to import a few items from each one, it might be useful to group all the
-imports in the same declaration to keep your code clean and avoid repeating the
-base modules' name.
-
-The `use` declaration supports nesting to help you in those cases, both with
-simple imports and glob ones. For example this snippets imports `bar`, `Foo`,
-all the items in `baz` and `Bar`:
-
-```rust
-# #![feature(use_nested_groups)]
-# #![allow(unused_imports, dead_code)]
-#
-# mod foo {
-#     pub mod bar {
-#         pub type Foo = ();
-#     }
-#     pub mod baz {
-#         pub mod quux {
-#             pub type Bar = ();
-#         }
-#     }
-# }
-#
-use foo::{
-    bar::{self, Foo},
-    baz::{*, quux::Bar},
-};
-#
-# fn main() {}
-```
-
-## Updated reference
-
-When stabilizing, replace the shortcut list in
-`src/doc/reference/src/items/use-declarations.md` with this updated one:
-
-* Simultaneously binding a list of paths with a common prefix, using the
-  glob-like brace syntax `use a::b::{c, d, e::f, g::h::i};`
-* Simultaneously binding a list of paths with a common prefix and their common
-  parent module, using the `self` keyword, such as `use a::b::{self, c, d::e};`
-* Rebinding the target name as a new local name, using the syntax `use p::q::r
-  as x;`. This can also be used with the last two features:
-  `use a::b::{self as ab, c as abc}`.
-* Binding all paths matching a given prefix, using the asterisk wildcard syntax
-  `use a::b::*;`.
-* Nesting groups of the previous features multiple times, such as
-  `use a::b::{self as ab, c d::{*, e::f}};`
diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs
index e815d72d366..d3a83dc795c 100644
--- a/src/libcore/convert.rs
+++ b/src/libcore/convert.rs
@@ -141,9 +141,9 @@ pub trait AsRef<T: ?Sized> {
 ///
 /// # Generic Implementations
 ///
-/// - `AsMut` auto-dereferences if the inner type is a reference or a mutable
-///   reference (e.g.: `foo.as_ref()` will work the same if `foo` has type
-///   `&mut Foo` or `&&mut Foo`)
+/// - `AsMut` auto-dereferences if the inner type is a mutable reference
+///   (e.g.: `foo.as_mut()` will work the same if `foo` has type `&mut Foo`
+///   or `&mut &mut Foo`)
 ///
 /// # Examples
 ///
diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs
index 929d5e7ec62..ed937046e5e 100644
--- a/src/librustc/lint/context.rs
+++ b/src/librustc/lint/context.rs
@@ -1042,11 +1042,20 @@ pub fn check_ast_crate(sess: &Session, krate: &ast::Crate) {
     // Put the lint store levels and passes back in the session.
     cx.lint_sess.restore(&sess.lint_store);
 
-    // Emit all buffered lints from early on in the session now that we've
-    // calculated the lint levels for all AST nodes.
-    for (_id, lints) in cx.buffered.map {
-        for early_lint in lints {
-            span_bug!(early_lint.span, "failed to process buffered lint here");
+    // All of the buffered lints should have been emitted at this point.
+    // If not, that means that we somehow buffered a lint for a node id
+    // that was not lint-checked (perhaps it doesn't exist?). This is a bug.
+    //
+    // Rustdoc runs everybody-loops before the early lints and removes
+    // function bodies, so it's totally possible for linted
+    // node ids to not exist (e.g. macros defined within functions for the
+    // unused_macro lint) anymore. So we only run this check
+    // when we're not in rustdoc mode. (see issue #47639)
+    if !sess.opts.actually_rustdoc {
+        for (_id, lints) in cx.buffered.map {
+            for early_lint in lints {
+                span_bug!(early_lint.span, "failed to process buffered lint here");
+            }
         }
     }
 }
diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs
index 84ca2a9318a..738c0d82ee1 100644
--- a/src/librustc_borrowck/borrowck/mod.rs
+++ b/src/librustc_borrowck/borrowck/mod.rs
@@ -1068,22 +1068,12 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
         };
 
         match cause {
-            mc::AliasableStatic => {
-                // This happens when we have an `&mut` or assignment to a
-                // static. We should have already reported a mutability
-                // violation first, but may have continued compiling.
-                self.tcx.sess.delay_span_bug(
-                    span,
-                    &format!("aliasability violation for static `{}`", prefix)
-                );
-                return;
-            }
             mc::AliasableStaticMut => {
                 // This path cannot occur. `static mut X` is not checked
                 // for aliasability violations.
                 span_bug!(span, "aliasability violation for static mut `{}`", prefix)
             }
-            mc::AliasableBorrowed => {}
+            mc::AliasableStatic | mc::AliasableBorrowed => {}
         };
         let blame = cmt.immutability_blame();
         let mut err = match blame {
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs
index 2e494fdfad8..841350bdb68 100644
--- a/src/librustc_save_analysis/lib.rs
+++ b/src/librustc_save_analysis/lib.rs
@@ -791,7 +791,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
         field_ref: &ast::Field,
         variant: &ty::VariantDef,
     ) -> Option<Ref> {
-        let f = variant.field_named(field_ref.ident.node.name);
+        let f = variant.find_field_named(field_ref.ident.node.name)?;
         // We don't really need a sub-span here, but no harm done
         let sub_span = self.span_utils.span_for_last_ident(field_ref.ident.span);
         filter!(self.span_utils, sub_span, field_ref.ident.span, None);
@@ -870,6 +870,17 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
                         result.push_str(&val.as_str());
                     }
                     result.push('\n');
+                } else if let Some(meta_list) = attr.meta_item_list() {
+                    meta_list.into_iter()
+                             .filter(|it| it.check_name("include"))
+                             .filter_map(|it| it.meta_item_list().map(|l| l.to_owned()))
+                             .flat_map(|it| it)
+                             .filter(|meta| meta.check_name("contents"))
+                             .filter_map(|meta| meta.value_str())
+                             .for_each(|val| {
+                                 result.push_str(&val.as_str());
+                                 result.push('\n');
+                             });
                 }
             }
         }
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index a19fe825f21..e91d3a32a50 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -1026,9 +1026,9 @@ impl CStr {
     /// The returned slice will **not** contain the trailing nul terminator that this C
     /// string has.
     ///
-    /// > **Note**: This method is currently implemented as a 0-cost cast, but
-    /// > it is planned to alter its definition in the future to perform the
-    /// > length calculation whenever this method is called.
+    /// > **Note**: This method is currently implemented as a constant-time
+    /// > cast, but it is planned to alter its definition in the future to
+    /// > perform the length calculation whenever this method is called.
     ///
     /// # Examples
     ///
@@ -1077,9 +1077,9 @@ impl CStr {
     /// it will return an error with details of where UTF-8 validation failed.
     ///
     /// > **Note**: This method is currently implemented to check for validity
-    /// > after a 0-cost cast, but it is planned to alter its definition in the
-    /// > future to perform the length calculation in addition to the UTF-8
-    /// > check whenever this method is called.
+    /// > after a constant-time cast, but it is planned to alter its definition
+    /// > in the future to perform the length calculation in addition to the
+    /// > UTF-8 check whenever this method is called.
     ///
     /// [`&str`]: ../primitive.str.html
     ///
@@ -1110,9 +1110,9 @@ impl CStr {
     /// with the result.
     ///
     /// > **Note**: This method is currently implemented to check for validity
-    /// > after a 0-cost cast, but it is planned to alter its definition in the
-    /// > future to perform the length calculation in addition to the UTF-8
-    /// > check whenever this method is called.
+    /// > after a constant-time cast, but it is planned to alter its definition
+    /// > in the future to perform the length calculation in addition to the
+    /// > UTF-8 check whenever this method is called.
     ///
     /// [`Cow`]: ../borrow/enum.Cow.html
     /// [`Borrowed`]: ../borrow/enum.Cow.html#variant.Borrowed
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 3e858c3b923..9c6520cd874 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -423,9 +423,6 @@ declare_features! (
     // In-band lifetime bindings (e.g. `fn foo(x: &'a u8) -> &'a u8`)
     (active, in_band_lifetimes, "1.23.0", Some(44524)),
 
-    // Nested groups in `use` (RFC 2128)
-    (active, use_nested_groups, "1.23.0", Some(44494)),
-
     // generic associated types (RFC 1598)
     (active, generic_associated_types, "1.23.0", Some(44265)),
 
@@ -544,6 +541,8 @@ declare_features! (
     (accepted, repr_align, "1.24.0", Some(33626)),
     // allow '|' at beginning of match arms (RFC 1925)
     (accepted, match_beginning_vert, "1.25.0", Some(44101)),
+    // Nested groups in `use` (RFC 2128)
+    (accepted, use_nested_groups, "1.25.0", Some(44494)),
 );
 
 // If you change this, please modify src/doc/unstable-book as well. You must
@@ -1805,29 +1804,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
         visit::walk_path(self, path);
     }
 
-    fn visit_use_tree(&mut self, use_tree: &'a ast::UseTree, id: NodeId, nested: bool) {
-        if nested {
-            match use_tree.kind {
-                ast::UseTreeKind::Simple(_) => {
-                    if use_tree.prefix.segments.len() != 1 {
-                        gate_feature_post!(&self, use_nested_groups, use_tree.span,
-                                           "paths in `use` groups are experimental");
-                    }
-                }
-                ast::UseTreeKind::Glob => {
-                    gate_feature_post!(&self, use_nested_groups, use_tree.span,
-                                       "glob imports in `use` groups are experimental");
-                }
-                ast::UseTreeKind::Nested(_) => {
-                    gate_feature_post!(&self, use_nested_groups, use_tree.span,
-                                       "nested groups in `use` are experimental");
-                }
-            }
-        }
-
-        visit::walk_use_tree(self, use_tree, id);
-    }
-
     fn visit_vis(&mut self, vis: &'a ast::Visibility) {
         if let ast::Visibility::Crate(span, ast::CrateSugar::JustCrate) = *vis {
             gate_feature_post!(&self, crate_visibility_modifier, span,
diff --git a/src/libsyntax_ext/asm.rs b/src/libsyntax_ext/asm.rs
index 3742fb8c804..d1de4dccd00 100644
--- a/src/libsyntax_ext/asm.rs
+++ b/src/libsyntax_ext/asm.rs
@@ -239,6 +239,12 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt,
         }
     }
 
+    // If there are no outputs, the inline assembly is executed just for its side effects,
+    // so ensure that it is volatile
+    if outputs.is_empty() {
+        volatile = true;
+    }
+
     MacEager::expr(P(ast::Expr {
         id: ast::DUMMY_NODE_ID,
         node: ast::ExprKind::InlineAsm(P(ast::InlineAsm {
diff --git a/src/test/ui/feature-gate-use_nested_groups.rs b/src/test/codegen/no-output-asm-is-volatile.rs
index 56413a999d7..457d706a8ff 100644
--- a/src/test/ui/feature-gate-use_nested_groups.rs
+++ b/src/test/codegen/no-output-asm-is-volatile.rs
@@ -8,24 +8,19 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![allow(unused_imports, dead_code)]
+// compile-flags: -O
 
-mod a {
-    pub enum B {}
-    pub enum C {}
+// ignore-asmjs
 
-    pub mod d {
-        pub enum E {}
-        pub enum F {}
+#![feature(asm)]
+#![crate_type = "lib"]
 
-        pub mod g {
-            pub enum H {}
-        }
-    }
-}
-
-use a::{B, d::{*, g::H}};  //~ ERROR glob imports in `use` groups are experimental
-                           //~^ ERROR nested groups in `use` are experimental
-                           //~^^ ERROR paths in `use` groups are experimental
+// Check that inline assembly expressions without any outputs
+// are marked as having side effects / being volatile
 
-fn main() {}
+// CHECK-LABEL: @assembly
+#[no_mangle]
+pub fn assembly() {
+    unsafe { asm!("") }
+// CHECK: tail call void asm sideeffect "", {{.*}}
+}
diff --git a/src/test/compile-fail/absolute-paths-in-nested-use-groups.rs b/src/test/compile-fail/absolute-paths-in-nested-use-groups.rs
index 8e5ba489c56..fe052f2f47f 100644
--- a/src/test/compile-fail/absolute-paths-in-nested-use-groups.rs
+++ b/src/test/compile-fail/absolute-paths-in-nested-use-groups.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(use_nested_groups)]
 #![allow(unused_imports)]
 
 mod foo {}
diff --git a/src/test/compile-fail/issue-42344.rs b/src/test/compile-fail/issue-42344.rs
new file mode 100644
index 00000000000..2f11ff402be
--- /dev/null
+++ b/src/test/compile-fail/issue-42344.rs
@@ -0,0 +1,17 @@
+// Copyright 2018 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.
+
+static TAB: [&mut [u8]; 0] = [];
+
+pub unsafe fn test() {
+    TAB[0].iter_mut(); //~ ERROR cannot borrow data mutably in a `&` reference [E0389]
+}
+
+pub fn main() {}
diff --git a/src/test/compile-fail/issue-44415.rs b/src/test/compile-fail/issue-44415.rs
new file mode 100644
index 00000000000..3b7089f4975
--- /dev/null
+++ b/src/test/compile-fail/issue-44415.rs
@@ -0,0 +1,22 @@
+// Copyright 2018 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.
+
+#![feature(const_fn)]
+#![feature(core_intrinsics)]
+
+use std::intrinsics;
+
+struct Foo {
+    bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
+    //~^ ERROR unsupported cyclic reference between types/traits detected
+    x: usize,
+}
+
+fn main() {}
diff --git a/src/test/compile-fail/issue-46604.rs b/src/test/compile-fail/issue-46604.rs
index 06aa4c343fe..dc14eca1e67 100644
--- a/src/test/compile-fail/issue-46604.rs
+++ b/src/test/compile-fail/issue-46604.rs
@@ -17,5 +17,6 @@ fn write<T: AsRef<[u8]>>(buffer: T) { }
 
 fn main() {
     write(&buf);
-    buf[0]=2;                                   //[mir]~ ERROR E0594
+    buf[0]=2;                                   //[ast]~ ERROR E0389
+                                                //[mir]~^ ERROR E0594
 }
diff --git a/src/test/run-make/save-analysis-fail/foo.rs b/src/test/run-make/save-analysis-fail/foo.rs
index 8a1b5793989..07322d8bbc3 100644
--- a/src/test/run-make/save-analysis-fail/foo.rs
+++ b/src/test/run-make/save-analysis-fail/foo.rs
@@ -451,3 +451,11 @@ extern {
     static EXTERN_FOO: u8;
     fn extern_foo(a: u8, b: i32) -> String;
 }
+
+struct Rls699 {
+  f: u32,
+}
+
+fn new(f: u32) -> Rls699 {
+    Rls699 { fs }
+}
diff --git a/src/test/run-make/save-analysis/extra-docs.md b/src/test/run-make/save-analysis/extra-docs.md
new file mode 100644
index 00000000000..0605ca517ff
--- /dev/null
+++ b/src/test/run-make/save-analysis/extra-docs.md
@@ -0,0 +1 @@
+Extra docs for this struct.
diff --git a/src/test/run-make/save-analysis/foo.rs b/src/test/run-make/save-analysis/foo.rs
index 834a7554a55..5b4e4802957 100644
--- a/src/test/run-make/save-analysis/foo.rs
+++ b/src/test/run-make/save-analysis/foo.rs
@@ -12,6 +12,7 @@
 #![feature(box_syntax)]
 #![feature(rustc_private)]
 #![feature(associated_type_defaults)]
+#![feature(external_doc)]
 
 extern crate graphviz;
 // A simple rust project
@@ -461,3 +462,6 @@ impl Iterator for SilenceGenerator {
 trait Foo {
     type Bar = FrameBuffer;
 }
+
+#[doc(include="extra-docs.md")]
+struct StructWithDocs;
diff --git a/src/test/run-pass/issue-47673.rs b/src/test/run-pass/issue-47673.rs
index 92f54a44f63..22f7f169e29 100644
--- a/src/test/run-pass/issue-47673.rs
+++ b/src/test/run-pass/issue-47673.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(use_nested_groups)]
 #![allow(unused_import)]
 
 use {{}, {}};
diff --git a/src/test/run-pass/use-nested-groups.rs b/src/test/run-pass/use-nested-groups.rs
index a28f8da9ff8..be06e463e3b 100644
--- a/src/test/run-pass/use-nested-groups.rs
+++ b/src/test/run-pass/use-nested-groups.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(use_nested_groups)]
-
 mod a {
     pub enum B {}
 
diff --git a/src/test/rustdoc/issue-47639.rs b/src/test/rustdoc/issue-47639.rs
new file mode 100644
index 00000000000..167c3aaec4a
--- /dev/null
+++ b/src/test/rustdoc/issue-47639.rs
@@ -0,0 +1,16 @@
+// Copyright 2018 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.
+
+// This should not ICE
+pub fn test() {
+    macro_rules! foo {
+        () => ()
+    }
+}
diff --git a/src/test/ui/feature-gate-use_nested_groups.stderr b/src/test/ui/feature-gate-use_nested_groups.stderr
deleted file mode 100644
index 6ae691c384b..00000000000
--- a/src/test/ui/feature-gate-use_nested_groups.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error[E0658]: nested groups in `use` are experimental (see issue #44494)
-  --> $DIR/feature-gate-use_nested_groups.rs:27:12
-   |
-27 | use a::{B, d::{*, g::H}};  //~ ERROR glob imports in `use` groups are experimental
-   |            ^^^^^^^^^^^^
-   |
-   = help: add #![feature(use_nested_groups)] to the crate attributes to enable
-
-error[E0658]: glob imports in `use` groups are experimental (see issue #44494)
-  --> $DIR/feature-gate-use_nested_groups.rs:27:16
-   |
-27 | use a::{B, d::{*, g::H}};  //~ ERROR glob imports in `use` groups are experimental
-   |                ^
-   |
-   = help: add #![feature(use_nested_groups)] to the crate attributes to enable
-
-error[E0658]: paths in `use` groups are experimental (see issue #44494)
-  --> $DIR/feature-gate-use_nested_groups.rs:27:19
-   |
-27 | use a::{B, d::{*, g::H}};  //~ ERROR glob imports in `use` groups are experimental
-   |                   ^^^^
-   |
-   = help: add #![feature(use_nested_groups)] to the crate attributes to enable
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/use-nested-groups-error.rs b/src/test/ui/use-nested-groups-error.rs
index a9b6b3ee70d..0a68d34ade9 100644
--- a/src/test/ui/use-nested-groups-error.rs
+++ b/src/test/ui/use-nested-groups-error.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(use_nested_groups)]
-
 mod a {
     pub mod b1 {
         pub enum C2 {}
diff --git a/src/test/ui/use-nested-groups-error.stderr b/src/test/ui/use-nested-groups-error.stderr
index cae34684c8e..c4edb626be0 100644
--- a/src/test/ui/use-nested-groups-error.stderr
+++ b/src/test/ui/use-nested-groups-error.stderr
@@ -1,7 +1,7 @@
 error[E0432]: unresolved import `a::b1::C1`
-  --> $DIR/use-nested-groups-error.rs:21:14
+  --> $DIR/use-nested-groups-error.rs:19:14
    |
-21 | use a::{b1::{C1, C2}, B2};
+19 | use a::{b1::{C1, C2}, B2};
    |              ^^ no `C1` in `a::b1`. Did you mean to use `C2`?
 
 error: aborting due to previous error
diff --git a/src/tools/rustbook/Cargo.toml b/src/tools/rustbook/Cargo.toml
index bc35cbe9fbb..539b434e9ec 100644
--- a/src/tools/rustbook/Cargo.toml
+++ b/src/tools/rustbook/Cargo.toml
@@ -8,5 +8,5 @@ license = "MIT/Apache-2.0"
 clap = "2.25.0"
 
 [dependencies.mdbook]
-version = "0.0.28"
+version = "0.1.2"
 default-features = false
diff --git a/src/tools/rustbook/src/main.rs b/src/tools/rustbook/src/main.rs
index 50f4364e448..87a63a34cb6 100644
--- a/src/tools/rustbook/src/main.rs
+++ b/src/tools/rustbook/src/main.rs
@@ -13,7 +13,6 @@ extern crate mdbook;
 extern crate clap;
 
 use std::env;
-use std::io::{self, Write};
 use std::path::{Path, PathBuf};
 
 use clap::{App, ArgMatches, SubCommand, AppSettings};
@@ -45,14 +44,19 @@ fn main() {
     };
 
     if let Err(e) = res {
-        writeln!(&mut io::stderr(), "An error occured:\n{}", e).ok();
+        eprintln!("Error: {}", e);
+
+        for cause in e.iter().skip(1) {
+            eprintln!("\tCaused By: {}", cause);
+        }
+
         ::std::process::exit(101);
     }
 }
 // Build command implementation
 pub fn build(args: &ArgMatches) -> Result<()> {
     let book_dir = get_book_dir(args);
-    let mut book = MDBook::new(&book_dir).read_config()?;
+    let mut book = MDBook::load(&book_dir)?;
 
     // Set this to allow us to catch bugs in advance.
     book.config.build.create_missing = false;
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
index bc2767c7bcc..159c9e035b7 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
@@ -33,6 +33,8 @@ static EXCEPTIONS: &'static [&'static str] = &[
     "openssl", // BSD+advertising clause, cargo, mdbook
     "pest", // MPL2, mdbook via handlebars
     "thread-id", // Apache-2.0, mdbook
+    "toml-query", // MPL-2.0, mdbook
+    "is-match", // MPL-2.0, mdbook
     "cssparser", // MPL-2.0, rustdoc
     "smallvec", // MPL-2.0, rustdoc
     "fuchsia-zircon-sys", // BSD-3-Clause, rustdoc, rustc, cargo