Auto merge of #113083 - matthiaskrgr:rollup-anbqpij, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #113039 (make custom mir ICE a bit nicer)
 - #113058 (Add/improve code comments)
 - #113063 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2023-06-27 06:04:37 +00:00
commit 95978b302c
9 changed files with 15 additions and 8 deletions

View File

@ -118,7 +118,11 @@ fn parse_attribute(attr: &Attribute) -> MirPhase {
phase = Some(value); phase = Some(value);
} }
other => { other => {
panic!("Unexpected key {}", other); span_bug!(
nested.span(),
"Unexpected key while parsing custom_mir attribute: '{}'",
other
);
} }
} }
} }

@ -1 +1 @@
Subproject commit 8fa6b854d515506d825390fe0d817f5ef0c89350 Subproject commit 21cf840842bdf768a798869f06373c96c1cc5122

@ -1 +1 @@
Subproject commit b5f018fb5930cb733b0a8aaf2eed975d4771e74d Subproject commit c369e4b489332f8721fbae630354fa83385d457d

@ -1 +1 @@
Subproject commit 553d99b02a53b4133a40d5bd2e19958c67487c00 Subproject commit 5ca365eac678cb0d41a20b3204546d6ed70c7171

@ -1 +1 @@
Subproject commit 8ee9528b72b927cff8fd32346db8bbd1198816f0 Subproject commit 57636d6926762861f34e030d52ca25a71e95e5bf

@ -1 +1 @@
Subproject commit f1e637883fafeb83bdd5906ee7f467e4d35b7337 Subproject commit 17fe3e948498c50e208047a750f17d6a8d89669b

View File

@ -2355,7 +2355,7 @@ fn filter_tokens_from_list(
tokens 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: /// final reexport. For example:
/// ///
/// ```ignore (just an example) /// ```ignore (just an example)

View File

@ -956,6 +956,8 @@ pub(crate) trait AttributesExt {
.filter_map(|attr| Cfg::parse(attr.meta_item()?).ok()) .filter_map(|attr| Cfg::parse(attr.meta_item()?).ok())
.fold(Cfg::True, |cfg, new_cfg| cfg & new_cfg) .fold(Cfg::True, |cfg, new_cfg| cfg & new_cfg)
} else if doc_auto_cfg_active { } 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() self.iter()
.filter(|attr| attr.has_name(sym::cfg)) .filter(|attr| attr.has_name(sym::cfg))
.filter_map(|attr| single(attr.meta_item_list()?)) .filter_map(|attr| single(attr.meta_item_list()?))
@ -2387,6 +2389,7 @@ impl ImplKind {
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub(crate) struct Import { pub(crate) struct Import {
pub(crate) kind: ImportKind, pub(crate) kind: ImportKind,
/// The item being re-exported.
pub(crate) source: ImportSource, pub(crate) source: ImportSource,
pub(crate) should_be_displayed: bool, pub(crate) should_be_displayed: bool,
} }

View File

@ -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). // module will still be displayed (the re-export, not the item).
#![crate_name = "foo"] #![crate_name = "foo"]