about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_mir_build/src/build/custom/mod.rs6
m---------src/doc/book0
m---------src/doc/nomicon0
m---------src/doc/reference0
m---------src/doc/rust-by-example0
m---------src/doc/rustc-dev-guide0
-rw-r--r--src/librustdoc/clean/mod.rs2
-rw-r--r--src/librustdoc/clean/types.rs3
-rw-r--r--tests/rustdoc/reexport-doc-hidden-inside-private.rs2
9 files changed, 10 insertions, 3 deletions
diff --git a/compiler/rustc_mir_build/src/build/custom/mod.rs b/compiler/rustc_mir_build/src/build/custom/mod.rs
index 32c618828c9..e5c2cc6c7bb 100644
--- a/compiler/rustc_mir_build/src/build/custom/mod.rs
+++ b/compiler/rustc_mir_build/src/build/custom/mod.rs
@@ -118,7 +118,11 @@ fn parse_attribute(attr: &Attribute) -> MirPhase {
                 phase = Some(value);
             }
             other => {
-                panic!("Unexpected key {}", other);
+                span_bug!(
+                    nested.span(),
+                    "Unexpected key while parsing custom_mir attribute: '{}'",
+                    other
+                );
             }
         }
     }
diff --git a/src/doc/book b/src/doc/book
-Subproject 8fa6b854d515506d825390fe0d817f5ef0c8935
+Subproject 21cf840842bdf768a798869f06373c96c1cc512
diff --git a/src/doc/nomicon b/src/doc/nomicon
-Subproject b5f018fb5930cb733b0a8aaf2eed975d4771e74
+Subproject c369e4b489332f8721fbae630354fa83385d457
diff --git a/src/doc/reference b/src/doc/reference
-Subproject 553d99b02a53b4133a40d5bd2e19958c67487c0
+Subproject 5ca365eac678cb0d41a20b3204546d6ed70c717
diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example
-Subproject 8ee9528b72b927cff8fd32346db8bbd1198816f
+Subproject 57636d6926762861f34e030d52ca25a71e95e5b
diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide
-Subproject f1e637883fafeb83bdd5906ee7f467e4d35b733
+Subproject 17fe3e948498c50e208047a750f17d6a8d89669
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index c041df64b8d..b2f9c0bccea 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -2355,7 +2355,7 @@ fn filter_tokens_from_list(
     tokens
 }
 
-/// When inlining items, we merge its attributes (and all the reexports attributes too) with the
+/// When inlining items, we merge their attributes (and all the reexports attributes too) with the
 /// final reexport. For example:
 ///
 /// ```ignore (just an example)
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index 5f5cade67a2..26139d52769 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -956,6 +956,8 @@ pub(crate) trait AttributesExt {
                     .filter_map(|attr| Cfg::parse(attr.meta_item()?).ok())
                     .fold(Cfg::True, |cfg, new_cfg| cfg & new_cfg)
             } else if doc_auto_cfg_active {
+                // If there is no `doc(cfg())`, then we retrieve the `cfg()` attributes (because
+                // `doc(cfg())` overrides `cfg()`).
                 self.iter()
                     .filter(|attr| attr.has_name(sym::cfg))
                     .filter_map(|attr| single(attr.meta_item_list()?))
@@ -2387,6 +2389,7 @@ impl ImplKind {
 #[derive(Clone, Debug)]
 pub(crate) struct Import {
     pub(crate) kind: ImportKind,
+    /// The item being re-exported.
     pub(crate) source: ImportSource,
     pub(crate) should_be_displayed: bool,
 }
diff --git a/tests/rustdoc/reexport-doc-hidden-inside-private.rs b/tests/rustdoc/reexport-doc-hidden-inside-private.rs
index 1e4216d3c0c..e9d243d8abf 100644
--- a/tests/rustdoc/reexport-doc-hidden-inside-private.rs
+++ b/tests/rustdoc/reexport-doc-hidden-inside-private.rs
@@ -1,4 +1,4 @@
-// This test ensures that a re-export of  `#[doc(hidden)]` item inside a private
+// This test ensures that a re-export of `#[doc(hidden)]` item inside a private
 // module will still be displayed (the re-export, not the item).
 
 #![crate_name = "foo"]