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 index 8fa6b854d51..21cf840842b 160000 --- a/src/doc/book +++ b/src/doc/book @@ -1 +1 @@ -Subproject commit 8fa6b854d515506d825390fe0d817f5ef0c89350 +Subproject commit 21cf840842bdf768a798869f06373c96c1cc5122 diff --git a/src/doc/nomicon b/src/doc/nomicon index b5f018fb593..c369e4b4893 160000 --- a/src/doc/nomicon +++ b/src/doc/nomicon @@ -1 +1 @@ -Subproject commit b5f018fb5930cb733b0a8aaf2eed975d4771e74d +Subproject commit c369e4b489332f8721fbae630354fa83385d457d diff --git a/src/doc/reference b/src/doc/reference index 553d99b02a5..5ca365eac67 160000 --- a/src/doc/reference +++ b/src/doc/reference @@ -1 +1 @@ -Subproject commit 553d99b02a53b4133a40d5bd2e19958c67487c00 +Subproject commit 5ca365eac678cb0d41a20b3204546d6ed70c7171 diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example index 8ee9528b72b..57636d69267 160000 --- a/src/doc/rust-by-example +++ b/src/doc/rust-by-example @@ -1 +1 @@ -Subproject commit 8ee9528b72b927cff8fd32346db8bbd1198816f0 +Subproject commit 57636d6926762861f34e030d52ca25a71e95e5bf diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide index f1e637883fa..17fe3e94849 160000 --- a/src/doc/rustc-dev-guide +++ b/src/doc/rustc-dev-guide @@ -1 +1 @@ -Subproject commit f1e637883fafeb83bdd5906ee7f467e4d35b7337 +Subproject commit 17fe3e948498c50e208047a750f17d6a8d89669b 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"]