Skip to content

Commit

Permalink
Auto merge of #113083 - matthiaskrgr:rollup-anbqpij, r=matthiaskrgr
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Jun 27, 2023
2 parents b5e51db + c396abe commit 95978b3
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 8 deletions.
6 changes: 5 additions & 1 deletion compiler/rustc_mir_build/src/build/custom/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book
2 changes: 1 addition & 1 deletion src/doc/nomicon
Submodule nomicon updated 2 files
+12 −12 src/phantom-data.md
+199 −275 src/subtyping.md
2 changes: 1 addition & 1 deletion src/doc/reference
2 changes: 1 addition & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?))
Expand Down Expand Up @@ -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,
}
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc/reexport-doc-hidden-inside-private.rs
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down

0 comments on commit 95978b3

Please sign in to comment.