Skip to content

Commit 29c2c58

Browse files
Improve code and fix typo
1 parent 605b60b commit 29c2c58

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/librustdoc/clean/types.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
10371037
/// This type keeps track of (doc) cfg information as we go down the item tree.
10381038
#[derive(Clone, Debug)]
10391039
pub(crate) struct CfgInfo {
1040-
/// List of currently active `doc(auto_cfg(hide(...)))` cfgs,minus currently active
1040+
/// List of currently active `doc(auto_cfg(hide(...)))` cfgs, minus currently active
10411041
/// `doc(auto_cfg(show(...)))` cfgs.
10421042
hidden_cfg: FxHashSet<Cfg>,
10431043
/// Current computed `cfg`. Each time we enter a new item, this field is updated as well while
@@ -1054,13 +1054,11 @@ pub(crate) struct CfgInfo {
10541054
impl Default for CfgInfo {
10551055
fn default() -> Self {
10561056
Self {
1057-
hidden_cfg: [
1057+
hidden_cfg: FxHashSet::from_iter([
10581058
Cfg::Cfg(sym::test, None),
10591059
Cfg::Cfg(sym::doc, None),
10601060
Cfg::Cfg(sym::doctest, None),
1061-
]
1062-
.into_iter()
1063-
.collect(),
1061+
]),
10641062
current_cfg: Cfg::True,
10651063
auto_cfg_active: true,
10661064
parent_is_doc_cfg: false,

0 commit comments

Comments
 (0)