Skip to content

cfgs for target modifiers#152038

Open
davidtwco wants to merge 5 commits intorust-lang:mainfrom
davidtwco:target-modifier-cfgs
Open

cfgs for target modifiers#152038
davidtwco wants to merge 5 commits intorust-lang:mainfrom
davidtwco:target-modifier-cfgs

Conversation

@davidtwco
Copy link
Member

@davidtwco davidtwco commented Feb 3, 2026

This is a rough draft that can be nominated for t-lang, plenty of the details will change.

The issue this aims to solve...

In #151486, Chromium uses -Zbranch-protection=bti, which is an AArch64 extension for control-flow integrity (e.g. to protect against ROP attacks). The idea is that every indirect branch target has to start with a BTI landing pad instruction that tells the CPU whether it is a valid target for calls or jumps, otherwise the CPU faults.

Since #149633 and #144938, we enable a outline-atomics feature on AArch64 targets. This lowers atomic operations to out-of-line helper functions, which can use the Large System Extension (LSE) if present, and otherwise falls back to an implementation that doesn't use LSE. Rust's fallback implementation is provided by compiler-builtins.

When -Zbranch-protection=bti is used, compiler-builtins' outline-atomics routines need to have the BTI hint instruction so that the program can jump to it without the CPU faulting. These are normally added automatically by -Zbranch-protection=bti but outline-atomics' implementations use naked functions, so correctly don't automatically have the BTI hint instructions.

We'd like to add the BTI hint instruction to these, but there is no way of knowing that BTI is enabled when writing the naked function. LLVM does this conditionally when they generate their implementations (here), because they have a preprocessor define they can check. BTI isn't a target feature, so there's no cfg(target_feature = "bti") that could be used to cfg this in compiler-builtins.

(Technically BTI uses hint-space instructions, that older CPUs without support for BTI would ignore, so it could be added to these functions unconditionally. However, this still has a code-size cost and the other overheads of a no-op, like instruction cache pressure.)

-Zbranch-protection isn't a target modifier but should be, we just haven't made it one yet because it's waiting on build-std to be stabilised anyway. It would be useful to have a cfg for BTI to be able be able to write naked functions that are aware of it, e.g. cfg(branch_protection = "bti"). During the discussion on Zulip, it was suggested that perhaps this same logic applies to all target modifiers.

What this proposes..

Target modifier flags are those that must be set across all compilation units as they indicate an ABI incompatibility (or in general that the flag is only effective if the entire crate graph also has it set, e.g. for pointer authentication, the security isn't as useful if there are functions compiled without it). Knowledge of enabled target modifiers is necessary for naked functions or asm in general to appropriately generate the right assembly (for BTI on AArch64, for example).

This patch proposes automatically adding a cfg for target modifier flags (e.g. -Zbranch-protection=bti -> cfg(target_modifier_branch_protection="bti"). Flags that do not accept values similarly have cfgs without values (e.g. -Zfixed-x18 -> cfg(target_modifier_fixed_x18)), whereas flags that do have values have cfgs with values (e.g. -Zregparm=0 -> cfg(target_modifier_regparm="0")). Flags that take comma-separated values will set multiple cfgs (e.g. -Zbranch-protection=bti,pac-ret -> cfg(target_modifier_branch_protection="bti"),cfg(target_modifier_branch_protection="pac-ret")).

Not all target modifiers need to have cfgs - for example, sanitizers are a target modifier but have their own cfg already so this patch does not have an automatically-generated target modifier cfg.

Each of the target modifier cfgs for unstable target modifier flags are gated on feature(cfg_unstable_target_modifier) and will be stabilised automatically alongside their flag counterparts. All target modifiers are currently unstable so this doesn't stabilise anything.

Like all other builtin cfgs, users cannot set target modifier cfgs via --cfg.

This patch makes -Zbranch-protection a target modifier in the same patch, just to test this works with a target modifier that accepts comma-separated values, but that can be split out into a separate PR.

With this patch, the original issue could be resolved by adding..

#[cfg(target_modifier_branch_protection="bti")]
"hint #34"

..in the naked_asm! of the compiler-builtins implementations.

Unresolved questions for t-lang...

  1. Do we want this?

    • If not, do we want a cfg only for -Zbranch-protection to solve the original issue?
  2. What should these be called?

    • e.g. target_modifier_$flag, target_modifier($flag), $flag, something different for each
    • To date, the "target modifier" terminology hasn't been user-facing
  3. Does it make sense to group target modifier flags together to match the cfg?

    • e.g. -Ztarget-modifier branch-protection="bti"?
  4. Should each target modifier cfg have a separate feature to permit its use?

    • e.g. feature(target_modifier_branch_protection_cfg) rather than feature(cfg_unstable_target_modifier)
  5. Should target modifier cfgs be stabilised alongside their flags?

  6. Compiler flags have different stability guarantees than language features, as sometimes the output of a flag can't be guaranteed to never change (e.g. it might depend on LLVM's behaviour), or the values accepted by a flag may change over time (e.g. --target as targets can be added and removed), or a flag may be deprecated (-Csoft-float). Does the fact that target modifier flags have cfgs that are subject to the language's stability guarantees change anything?

cc #t-libs > bti in compiler-builtins' aarch64 outline-atomics @ 💬, #151486

r? @ghost (the exact implementation isn't super important yet until we've decided if we want this or not)

Target modifier flags are those that must be set across all compilation
units as they indicate an ABI incompatibility. Knowledge of enabled
target modifiers is necessary for naked functions or asm in general to
appropriately generate the right assembly (for BTI on AArch64, for
example).

Therefore, all target modifier flags now set a corresponding
`target_modifier_$x` cfg. Flags that do not accept values similarly have
cfgs without values, whereas flags that do have values have cfgs with
values. Flags that take comma-separated values will set multiple cfgs.

Not all target modifiers need to have cfgs - for example, sanitizers are
a target modifier but have their own cfg already so do not have an
automatically generated target modifier cfg.

It would be relatively straightforward to change these to
`target_modifier($x)` or just `$x` if that were preferred.
Each of the target modifier cfgs for unstable target modifier flags
are gated on `feature(cfg_unstable_target_modifier)` and will be
stabilised automatically alongside their flag counterparts. All target
modifiers are currently unstable so this doesn't stabilise anything.

It might be better to separate these so that cfgs can be stabilised
separately, but given the motivation for target modifier cfgs, perhaps
not.

feature gate test
As with all other builtin cfgs, target modifier cfgs cannot be set by
users.
`check-cfg` needs to be aware of the name of cfgs to avoid the
`unexpected_cfgs` lint from triggering.
As one of the motivating examples of making target modifiers have cfgs,
`-Zbranch-protection` should be made a target modifier.
@davidtwco davidtwco added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-lang-nominated Nominated for discussion during a lang team meeting. A-cfg Area: `cfg` conditional compilation F-target_modifiers `#![feature(target_modifiers)]` S-waiting-on-t-lang Status: Awaiting decision from T-lang labels Feb 3, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2026

Some changes occurred in cfg and check-cfg configuration

cc @Urgau

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 3, 2026
Comment on lines +31 to +37
`target_modifier_branch_protection`
`target_modifier_fixed_x18`
`target_modifier_indirect_branch_cs_prefix`
`target_modifier_reg_struct_return`
`target_modifier_regparm`
`target_modifier_retpoline`
`target_modifier_retpoline_external_thunk`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I would like to remind everyone of this section from the target modifiers RFC:

Teaching

We should be careful to not introduce too many concepts that end-users have to learn.

It is intentional that the guide-level section of this RFC does not use the word “target modifier”. The “target modifier” name is not intended to be used outside of the compiler internals and very technical documentation. Compiler errors should not say “error: trying to mix target modifiers” or something like that; rather the error should just say that mixing -Cfoo may cause ABI issues.

For similar reasons, the flag for silencing the error is called -Cunsafe-allow-abi-mismatch with the word “ABI” to avoid having to teach the user about mismatched flags or target modifiers.

Some of the proposed namings above would involve changing the above decision. That's okay with me, but if so, we should be explicit that we're changing it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Echoing what I said on Zulip: I feel like the cfg needs to match the CLI option. That is, if the flag is -Cbranch-protection=bti, the cfg should be cfg(branch_protection = "bti"). Or, if we want to treat target modifiers as more akin to target features (from Alice's snip I don't think this is the case), then -Ctarget-modifier=branch-protection=bti and cfg(target_modifier = "branch-protection=bti").

I'm not sure if the target_modifier prefix adds too much here, outside of perhaps reminding the user that it's an ABI flag?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aware of both concerns - I picked the name in the patch relatively arbitrarily figuring that it'll be bikeshed a bit in t-lang discussions and the name in the prototype isn't all that important. I'm happy with either surfacing "target modifier" in the flags and cfgs, or not doing so.

Copy link
Member

@scottmcm scottmcm Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really this PR's problem, but it would almost be nice if this was -T branch-protection=bti, along with a consistent rule of "you can mismatch -C flags across crates, but -T flags need to be the same".

Conceptually, at least, I like the thought of having a way to talk about these things that's used-facing other than that "well there's a bunch of flags that blow up if you're inconsistent about them in the crate graph".

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[group]Runner Image Provisioner
Hosted Compute Agent
Version: 20260123.484
Commit: 6bd6555ca37d84114959e1c76d2c01448ff61c5d
Build Date: 2026-01-23T19:41:17Z
Worker ID: {729262f5-9c59-4b46-95ab-bac5878bab0c}
Azure Region: southcentralus
##[endgroup]
##[group]VM Image
- OS: Linux (arm64)
- Source: Partner
- Name: Ubuntu 24.04 by Arm Limited
---
test [ui] tests/ui/asm/aarch64/type-check-3.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-2.rs ... ok
test [ui] tests/ui/asm/aarch64/sym.rs ... ok
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/arm-low-dreg.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/binary_asm_labels.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/bad-template.rs#aarch64 ... ok
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ok
test [ui] tests/ui/asm/cfg.rs#reva ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/cfg.rs#revb ... ignored, only executed when the architecture is x86_64
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat2 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin1 ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-std.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-macro.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-rename-builtin.rs ... ok
---
[TIMING:end] tool::Rustdoc { target_compiler: Compiler { stage: 2, host: aarch64-unknown-linux-gnu, forced_compiler: false } } -- 0.000
##[group]Testing stage2 with compiletest suite=rustdoc-html mode=rustdoc-html (aarch64-unknown-linux-gnu)

running 776 tests
test [rustdoc-html] tests/rustdoc-html/all.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/anchor-id-duplicate-method-name-25001.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/anchor-id-trait-method-15169.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/anchor-id-trait-tymethod-28478.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/disambiguate-anchors-header-29449.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/disambiguate-anchors-32890.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/anchors.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/method-anchor-in-blanket-impl-86620.rs ... ok
test [rustdoc-html] tests/rustdoc-html/array-links.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anonymous-lifetime.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/trait-impl-items-links-and-anchors.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anon-fn-params.rs ... ok
test [rustdoc-html] tests/rustdoc-html/asm-foreign.rs ... ok
test [rustdoc-html] tests/rustdoc-html/asm-foreign2.rs ... ok
test [rustdoc-html] tests/rustdoc-html/asref-for-and-of-local-82465.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/assoc-fns.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/assoc-item-cast.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/assoc-types.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/assoc-type-bindings-20646.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/cross-crate-hidden-assoc-trait-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/doc-assoc-item.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/inline-assoc-type-20727-bindings.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/inline-assoc-type-20727-bounds-deref.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/inline-assoc-type-20727-bounds-index.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/inline-assoc-type-20727-bounds.rs ... ok
test [rustdoc-html] tests/rustdoc-html/async/async-move-doctest.rs ... ok
test [rustdoc-html] tests/rustdoc-html/async/async-fn-opaque-item.rs ... ok
test [rustdoc-html] tests/rustdoc-html/async/async-fn.rs ... ok
test [rustdoc-html] tests/rustdoc-html/async/async-trait-sig.rs ... ok
test [rustdoc-html] tests/rustdoc-html/async/async-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/attributes-2021-edition.rs ... ok
test [rustdoc-html] tests/rustdoc-html/assoc/normalize-assoc-item.rs ... ok
test [rustdoc-html] tests/rustdoc-html/attributes-inlining-108281.rs ... ok
test [rustdoc-html] tests/rustdoc-html/attributes-re-export-2021-edition.rs ... ok
test [rustdoc-html] tests/rustdoc-html/attributes-re-export.rs ... ok
test [rustdoc-html] tests/rustdoc-html/attributes.rs ... ok
test [rustdoc-html] tests/rustdoc-html/auto/auto-impl-for-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs ... ok
test [rustdoc-html] tests/rustdoc-html/auto/auto-impl-primitive.rs ... ok
test [rustdoc-html] tests/rustdoc-html/auto/auto-trait-bounds-inference-variables-54705.rs ... ok
test [rustdoc-html] tests/rustdoc-html/auto/auto-trait-bounds-where-51236.rs ... ok
test [rustdoc-html] tests/rustdoc-html/auto/auto-trait-negative-impl-55321.rs ... ok
test [rustdoc-html] tests/rustdoc-html/auto/auto-trait-not-send.rs ... ok
test [rustdoc-html] tests/rustdoc-html/auto/auto-traits.rs ... ok
test [rustdoc-html] tests/rustdoc-html/auto/auto_aliases.rs ... ok
test [rustdoc-html] tests/rustdoc-html/bad-codeblock-syntax.rs ... ok
test [rustdoc-html] tests/rustdoc-html/blank-line-in-doc-block-47197.rs ... ok
test [rustdoc-html] tests/rustdoc-html/bold-tag-101743.rs ... ok
test [rustdoc-html] tests/rustdoc-html/bounds.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cap-lints.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cfg-bool.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cfg-doctest.rs ... ok
test [rustdoc-html] tests/rustdoc-html/comment-in-doctest.rs ... ok
test [rustdoc-html] tests/rustdoc-html/check-styled-link.rs ... ok
test [rustdoc-html] tests/rustdoc-html/check.rs ... ok
test [rustdoc-html] tests/rustdoc-html/codeblock-title.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-fn-76501.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-fn-effects.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-fn.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-generics/add-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-generics/const-generic-defaults.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-generics/const-generic-slice.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-generics/const-generics-docs.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-generics/const-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-generics/const-param-type-references-generics.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-generics/generic_const_exprs.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-generics/lazy_normalization_consts/const-equate-pred.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-generics/type-alias.rs ... ok
test [rustdoc-html] tests/rustdoc-html/const-intrinsic.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/assoc-const-has-projection-ty.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/assoc-consts-underscore.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/assoc-consts-version.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/assoc-consts.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/associated-consts.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/const-display.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/const-doc.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/const-effect-param.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/const-trait-and-impl-methods.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/const-underscore.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/const-value-display.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/const.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/document-item-with-associated-const-in-where-clause.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/generic_const_exprs.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/generic-const-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/glob-shadowing-const.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/hide-complex-unevaluated-const-arguments.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/ice-associated-const-equality-105952.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/hide-complex-unevaluated-consts.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/legacy-const-generic.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/link-assoc-const.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/redirect-const.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/rfc-2632-const-trait-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/show-const-contents.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constructor-imports.rs ... ok
test [rustdoc-html] tests/rustdoc-html/crate-doc-hidden-109695.rs ... ok
test [rustdoc-html] tests/rustdoc-html/crate-version-escape.rs ... ok
test [rustdoc-html] tests/rustdoc-html/crate-version-extra.rs ... ok
test [rustdoc-html] tests/rustdoc-html/crate-version.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/cargo-two-no-index/e.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/cargo-two/e.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/cargo-transitive/s.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/cargo-transitive-no-index/s.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/single-crate-baseline/q.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/single-crate-no-index/q.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/index-on-last/e.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/working-dir-examples/q.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/two/e.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/transitive/s.rs ... ok
test [rustdoc-html] tests/rustdoc-html/custom_code_classes.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/write-docs-somewhere-else/e.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-links.rs ... ok
test [rustdoc-html] tests/rustdoc-html/decl-line-wrapping-empty-arg-list.rs ... ok
test [rustdoc-html] tests/rustdoc-html/decl-trailing-whitespace.rs ... ok
test [rustdoc-html] tests/rustdoc-html/default-theme.rs ... ok
test [rustdoc-html] tests/rustdoc-html/default-trait-method-link.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deep-structures.rs ... ok
test [rustdoc-html] tests/rustdoc-html/demo-allocator-54478.rs ... ok
test [rustdoc-html] tests/rustdoc-html/default-trait-method.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deprecated-future-staged-api.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deprecated-future.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deprecated.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref-methods-19190-foreign-type.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref-methods-19190-inline.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref-methods-19190.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref-mut-35169-2.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref-mut-35169.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/deref-const-fn.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/deref-methods-24686-target.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/deref-multiple-impl-blocks.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/kitchen-sink/i.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/deref-mut-methods.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/deref-recursive-pathbuf.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/deref-recursive.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/deref-slice-core.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/deref-to-primitive.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/deref-typedef.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/recursive-deref-sidebar.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/escape-deref-methods.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/recursive-deref.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/sidebar-links-deref-100679.rs ... ok
test [rustdoc-html] tests/rustdoc-html/description.rs ... ok
test [rustdoc-html] tests/rustdoc-html/description_default.rs ... ok
test [rustdoc-html] tests/rustdoc-html/display-hidden-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-attr-comment-mix-42760.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-attribute.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-auto-cfg-public-in-private.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-auto-cfg.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-cfg/doc-cfg-hide.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-cfg/doc-cfg-implicit-gate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-cfg/doc-cfg-target-feature.rs ... ignored, only executed when the architecture is x86_64
test [rustdoc-html] tests/rustdoc-html/doc-cfg/doc-cfg-implicit.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-cfg/doc-cfg-inherit-from-module-79201.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-cfg/doc-cfg-simplification.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-cfg/doc-cfg-traits.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-cfg/doc-cfg.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-cfg/duplicate-cfg.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-test-attr-18199.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-on-keyword.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-hidden-method-13698.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-cfg-feature-30252.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-crate-attributes-38129.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc_auto_cfg.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-hide-empty-line-23106.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc_auto_cfg_reexports.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-include-43153.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-macro-38219.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-hidden-crate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-manual-crate-name.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-escape-boring-41783.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-markdown-inline-parse-23744.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-markdown-trailing-docblock-48377.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-multi-line-string-literal-25944.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-ignore-32556.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-runtool.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/ignore-sometimes.rs ... ok
test [rustdoc-html] tests/rustdoc-html/document-hidden-items-15347.rs ... ok
test [rustdoc-html] tests/rustdoc-html/double-hyphen-to-dash.rs ... ok
test [rustdoc-html] tests/rustdoc-html/double-quote-escape.rs ... ok
test [rustdoc-html] tests/rustdoc-html/duplicate-flags.rs ... ok
test [rustdoc-html] tests/rustdoc-html/duplicate_impls/impls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/duplicate_impls/sidebar-links-duplicate-impls-33054.rs ... ok
test [rustdoc-html] tests/rustdoc-html/edition-flag.rs ... ok
test [rustdoc-html] tests/rustdoc-html/edition-doctest.rs ... ok
test [rustdoc-html] tests/rustdoc-html/dyn-compatibility.rs ... ok
test [rustdoc-html] tests/rustdoc-html/early-unindent.rs ... ok
test [rustdoc-html] tests/rustdoc-html/elided-lifetime.rs ... ok
test [rustdoc-html] tests/rustdoc-html/empty-doc-comment.rs ... ok
test [rustdoc-html] tests/rustdoc-html/empty-mod-public.rs ... ok
test [rustdoc-html] tests/rustdoc-html/empty-section.rs ... ok
test [rustdoc-html] tests/rustdoc-html/enum/enum-headings.rs ... ok
test [rustdoc-html] tests/rustdoc-html/empty-tuple-struct-118180.rs ... ok
test [rustdoc-html] tests/rustdoc-html/enum/enum-non-exhaustive-108925.rs ... ok
test [rustdoc-html] tests/rustdoc-html/enum/enum-variant-doc-hidden-field-88600.rs ... ok
test [rustdoc-html] tests/rustdoc-html/enum/enum-variant-fields-heading.rs ... ok
test [rustdoc-html] tests/rustdoc-html/enum/enum-variant-non_exhaustive.rs ... ok
test [rustdoc-html] tests/rustdoc-html/enum/enum-variant-value.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/duplicate-reexports-section-150211.rs ... ok
test [rustdoc-html] tests/rustdoc-html/enum/strip-enum-variant.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/extern-default-method.rs ... ok
test [rustdoc-html] tests/rustdoc-html/enum/render-enum-variant-structlike-32395.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/extern-fn-22038.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/extern-html-alias.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/extern-html-fallback.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/extern-html-root-url-precedence.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/extern-links.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/extern-html-root-url.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/extern-method.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/external-cross.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/external-doc.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/hidden-extern-34025.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/pub-extern-crate-150176.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/link-extern-crate-title-33178.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/link-extern-crate-item-30109.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/unsafe-extern-blocks.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/pub-extern-crate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/link-extern-crate-33178.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/unused-extern-crate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/file-creation-111249.rs ... ok
test [rustdoc-html] tests/rustdoc-html/feature-gate-doc_auto_cfg.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extremely_long_typename.rs ... ok
test [rustdoc-html] tests/rustdoc-html/ffi.rs ... ok
test [rustdoc-html] tests/rustdoc-html/files-creation-hidden.rs ... ok
test [rustdoc-html] tests/rustdoc-html/fn-pointer-arg-name.rs ... ok
test [rustdoc-html] tests/rustdoc-html/fn-bound.rs ... ok
test [rustdoc-html] tests/rustdoc-html/fn-sidebar.rs ... ok
test [rustdoc-html] tests/rustdoc-html/fn-type.rs ... ok
test [rustdoc-html] tests/rustdoc-html/footnote-ids.rs ... ok
test [rustdoc-html] tests/rustdoc-html/footnote-definition-without-blank-line-100638.rs ... ok
test [rustdoc-html] tests/rustdoc-html/force-target-feature.rs ... ignored, only executed when the architecture is x86_64
test [rustdoc-html] tests/rustdoc-html/footnote-in-summary.rs ... ok
test [rustdoc-html] tests/rustdoc-html/footnote-reference-ids.rs ... ok
test [rustdoc-html] tests/rustdoc-html/footnote-reference-in-footnote-def.rs ... ok
test [rustdoc-html] tests/rustdoc-html/force-unstable-if-unmarked-106421-not-internal.rs ... ok
test [rustdoc-html] tests/rustdoc-html/force-unstable-if-unmarked-106421.rs ... ok
test [rustdoc-html] tests/rustdoc-html/foreigntype.rs ... ok
test [rustdoc-html] tests/rustdoc-html/generic-associated-types/gat-elided-lifetime-94683.rs ... ok
test [rustdoc-html] tests/rustdoc-html/generic-associated-types/gat-linkification-109488.rs ... ok
test [rustdoc-html] tests/rustdoc-html/generic-associated-types/gats.rs ... ok
test [rustdoc-html] tests/rustdoc-html/glob-shadowing.rs ... ok
test [rustdoc-html] tests/rustdoc-html/heading-levels-89309.rs ... ok
test [rustdoc-html] tests/rustdoc-html/heterogeneous-concat.rs ... ok
test [rustdoc-html] tests/rustdoc-html/hidden-line.rs ... ok
test [rustdoc-html] tests/rustdoc-html/hidden-methods.rs ... ok
test [rustdoc-html] tests/rustdoc-html/hidden-trait-methods-with-document-hidden-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/hidden-trait-methods.rs ... ok
test [rustdoc-html] tests/rustdoc-html/ice-type-error-19181.rs ... ok
test [rustdoc-html] tests/rustdoc-html/higher-ranked-trait-bounds.rs ... ok
test [rustdoc-html] tests/rustdoc-html/hide-unstable-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/highlight-invalid-rust-12834.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/blanket-impl-29503.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/blanket-impl-78673.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/cross-crate-hidden-impl-parameter.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/deduplicate-glob-import-impl-21474.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/deduplicate-trait-impl-22025.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/default-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/deprecated-impls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/doc-hidden-trait-implementors-33069.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/doc_auto_cfg_nested_impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/empty-impl-block.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/duplicated_impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/empty-impls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/extern-impl-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/extern-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/foreign-implementors-js-43701.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/generic-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/hidden-implementors-90781.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/hidden-trait-struct-impls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/hidden-impls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/hide-mut-methods-if-no-derefmut-impl-74083.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-alias-substituted.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-associated-items-order.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-assoc-type-21092.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-associated-items-sidebar.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-blanket-53689.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-disambiguation.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-box.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-everywhere.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-in-const-block.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-on-ty-alias-issue-119015.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-parts-crosscrate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-parts.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-ref-20175.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-trait-43869.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-trait-alias.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-trait-precise-capturing.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-type-parameter-33592.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/implementor-stable-version.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/implementors-unstable-75588.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/manual_impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/method-link-foreign-trait-impl-17476.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/module-impls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/inline-impl-through-glob-import-100204.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/must_implement_one_of.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/negative-impl-no-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/negative-impl-sidebar.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/negative-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/return-impl-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/same-crate-hidden-impl-parameter.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/sidebar-trait-impl-disambiguate-78701.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/struct-implementations-title.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/underscore-type-in-trait-impl-96381.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/rustc-incoherent-impls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/trait-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/trait-implementations-duplicate-self-45584.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/universal-impl-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/unneeded-trait-implementations-title.rs ... ok
test [rustdoc-html] tests/rustdoc-html/include_str_cut.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impossible-default.rs ... ok
test [rustdoc-html] tests/rustdoc-html/infinite-redirection-16265-1.rs ... ok
test [rustdoc-html] tests/rustdoc-html/infinite-redirection-16265-2.rs ... ok
test [rustdoc-html] tests/rustdoc-html/import-remapped-paths.rs ... ok
test [rustdoc-html] tests/rustdoc-html/index-page.rs ... ok
test [rustdoc-html] tests/rustdoc-html/infinite-redirection.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inherent-projections.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline-default-methods.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline-rename-34473.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/add-docs.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/assoc-const-equality.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/async-fn.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/attributes.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/assoc-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/assoc_item_trait_bounds.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/const-effect-param.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/const-eval-46727.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/const-fn-27362.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/default-trait-method.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/deduplicate-inlined-items-23207.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/default-generic-args.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/cross-glob.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/doc-auto-cfg.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/doc-hidden-extern-trait-impl-29584.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/doc-hidden-broken-link-28480.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-1.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-2.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/dyn_trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/doc-reachability-impl-31948.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/early-late-bound-lifetime-params.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/fn-ptr-ty.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/generic-const-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/ice-import-crate-57180.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/hidden-use.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/impl-dyn-trait-32881.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/impl-inline-without-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/impl-sized.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/impl-ref-33113.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/impl_trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/implementors-js.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/inline_hidden.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/macro-vis.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/macros.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/non_lifetime_binders.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/reexport-with-anonymous-lifetime-98697.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/qpath-self-85454.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/proc_macro.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/renamed-via-module.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/ret-pos-impl-trait-in-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/rustc-private-76736-1.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/rustc-private-76736-2.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/rustc-private-76736-3.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/rustc-private-76736-4.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/self-sized-bounds-24183.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/sugar-closure-crate-21801.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/blanket-impl-reexported-trait-94183.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/trait-vis.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/doc-no-inline-32343.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/fully-stable-path-is-better.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/enum-variant-reexport-46766.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/glob-extern-document-private-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/glob-extern.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/glob-private-document-private-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/use_crate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/glob-private.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/hidden-use.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/macro_by_example.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/please_inline.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/parent-path-is-better.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/private-reexport-in-public-api-81141-2.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/private-reexport-in-public-api-81141.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/private-reexport-in-public-api-hidden-81141.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/private-reexport-in-public-api-generics-81141.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/reexported-macro-and-macro-export-sidebar-89852.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/pub-re-export-28537.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/private-reexport-in-public-api-private-81141.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/staged-inline.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/trait-vis.rs ... ok
test [rustdoc-html] tests/rustdoc-html/internal.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/adt-through-alias.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/anchors.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc-crate/self.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/assoc-reexport-super.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/associated-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/associated-defaults.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/basic.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/builtin-macros.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/crate-relative-assoc.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/crate-relative.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate/additional_doc.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate/basic.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate/crate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate/hidden.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate/submodule-outer.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate/module.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate/submodule-inner.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/deprecated.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/deps.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate/traits.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate/macro.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/disambiguators-removed.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/email-address.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/enum-self-82209.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/enum-struct-field.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/extern-builtin-type-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/extern-inherent-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/extern-crate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/extern-reference-link.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/extern-type.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/external-traits.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/field.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/filter-out-private.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/generic-params.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/generic-trait-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/extern-crate-only-used-in-link.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/ice-deprecated-note-on-reexport.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/ice-intra-doc-links-107995.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/in-bodies.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/inherent-associated-types.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/intra-doc-link-method-trait-impl-72340.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/link-in-footnotes-132208.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/link-same-name-different-disambiguator-108459.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/link-to-proc-macro.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/macro-caching-144965.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/macros-disambiguators.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/mod-ambiguity.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/mod-relative.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/no-doc-primitive.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/module-scope-name-resolution-55364.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/nested-use.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/non-path-primitives.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/prim-methods-external-core.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/prim-methods-local.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/prim-assoc.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/prim-associated-traits.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/prim-self.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/prim-methods.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/prim-precedence.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/primitive-disambiguators.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/primitive-non-default-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/private-failures-ignored.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/private.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/pub-use.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/raw-ident-self.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/same-name-different-crates-66159.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/proc-macro.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/libstd-re-export.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/reexport-additional-docs.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/self.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/self-cache.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/trait-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/trait-item.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/true-false.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/type-alias-primitive.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/type-alias.rs ... ok
test [rustdoc-html] tests/rustdoc-html/invalid$crate$name.rs ... ok
test [rustdoc-html] tests/rustdoc-html/item-desc-list-at-start.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/assoc-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/assoc-types.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/derive-macro.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/doc-links-calls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/doc-links.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/no-body-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/non-local-method.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/patterns.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/macro.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/prelude-types.rs ... ok
test [rustdoc-html] tests/rustdoc-html/jump-to-def/shebang.rs ... ok
test [rustdoc-html] tests/rustdoc-html/keyword.rs ... ok
test [rustdoc-html] tests/rustdoc-html/lifetime-name.rs ... ok
test [rustdoc-html] tests/rustdoc-html/line-breaks.rs ... ok
test [rustdoc-html] tests/rustdoc-html/link-on-path-with-generics.rs ... ok
test [rustdoc-html] tests/rustdoc-html/link-title-escape.rs ... ok
test [rustdoc-html] tests/rustdoc-html/links-in-headings.rs ... ok
test [rustdoc-html] tests/rustdoc-html/logo-class-default.rs ... ok
test [rustdoc-html] tests/rustdoc-html/logo-class.rs ... ok
test [rustdoc-html] tests/rustdoc-html/logo-class-rust.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro-expansion/type-macro-expansion.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro-expansion/field-followed-by-exclamation.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/decl_macro.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/const-rendering-macros-33302.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/decl_macro_priv.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/doc-proc-macro.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/macro-const-display-115295.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/macro-doc-comment-23812.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/macro-export-crate-root-108231.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/macro-generated-macro.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/macro-ice-16019.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/macro-higher-kinded-function.rs ... ok
---
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,RandomState,A>::with_capacity_in (line 323) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap (line 72) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,RandomState>::from (line 1504) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,RandomState>::with_capacity (line 283) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::capacity (line 445) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::clear (line 819) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::contains_key (line 1220) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::drain (line 721) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::entry (line 959) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::extract_if (line 761) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get (line 987) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_disjoint_mut (line 1119) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_disjoint_mut (line 1077) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::hasher (line 837) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_key_value (line 1017) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_disjoint_unchecked_mut (line 1162) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_mut (line 1247) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::insert (line 1280) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::into_iter (line 2053) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::into_keys (line 491) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::into_values (line 586) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::is_empty (line 698) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::iter (line 618) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::iter_mut (line 648) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::keys (line 461) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::len (line 681) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::remove (line 1339) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::reserve (line 870) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::remove_entry (line 1367) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::retain (line 792) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::shrink_to (line 937) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::shrink_to_fit (line 913) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::try_insert (line 1309) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::try_reserve (line 895) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S>::with_capacity_and_hasher (line 383) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::values (line 523) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::values_mut (line 552) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S>::with_hasher (line 351) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::IntoIter (line 1611) ... ok
---
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet (line 95) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,RandomState>::new (line 142) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,RandomState>::with_capacity (line 161) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,RandomState>::from (line 1180) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::capacity (line 313) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::clear (line 490) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::contains (line 758) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::drain (line 398) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::difference (line 630) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::entry (line 861) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::extract_if (line 434) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::get (line 783) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::get_or_insert (line 805) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::get_or_insert_with (line 829) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::hasher (line 508) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::insert (line 983) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::into_iter (line 1643) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::intersection (line 697) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::is_disjoint (line 903) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::is_empty (line 375) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::is_superset (line 951) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::is_subset (line 929) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::iter (line 329) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::len (line 357) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::remove (line 1030) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::reserve (line 541) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::replace (line 1004) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::retain (line 465) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::shrink_to (line 607) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::shrink_to_fit (line 584) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::symmetric_difference (line 660) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::take (line 1058) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::try_reserve (line 567) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S>::with_capacity_and_hasher (line 255) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::union (line 726) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S>::with_hasher (line 223) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::Intersection (line 1507) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::Iter (line 1392) ... ok
---

failures:

---- [ui] tests/rustdoc-ui/doc-cfg-2.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/rustdoc-ui/doc-cfg-2/doc-cfg-2.stderr`
diff of stderr:

4 LL | #[doc(cfg(foo), cfg(bar))]
5    |           ^^^
6    |
-    = help: expected names are: `FALSE` and `test` and 31 more
+    = help: expected names are: `FALSE` and `test` and 38 more
8    = help: to expect this configuration use `--check-cfg=cfg(foo)`
---
To only update this specific test, also pass `--test-args doc-cfg-2.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/tests/rustdoc-ui/doc-cfg-2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-o" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/rustdoc-ui/doc-cfg-2" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
warning: unexpected `cfg` condition name: `foo`
##[warning]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:3:11
   |
LL | #[doc(cfg(foo), cfg(bar))]
   |           ^^^
   |
   = help: expected names are: `FALSE` and `test` and 38 more
   = help: to expect this configuration use `--check-cfg=cfg(foo)`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition name: `bar`
##[warning]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:3:21
   |
LL | #[doc(cfg(foo), cfg(bar))]
   |                     ^^^
   |
   = help: to expect this configuration use `--check-cfg=cfg(bar)`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration

error: only `hide` or `show` are allowed in `#[doc(auto_cfg(...))]`
##[error]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:6:16
   |
LL | #[doc(auto_cfg(42))] //~ ERROR
   |                ^^
   |
   = note: `#[deny(invalid_doc_attributes)]` on by default

error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
##[error]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:7:21
   |
LL | #[doc(auto_cfg(hide(true)))] //~ ERROR
   |                     ^^^^

error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
##[error]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:8:21
   |
LL | #[doc(auto_cfg(hide(42)))] //~ ERROR
   |                     ^^

error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
##[error]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:9:21
   |
LL | #[doc(auto_cfg(hide("a")))] //~ ERROR
   |                     ^^^

error: expected boolean for `#[doc(auto_cfg = ...)]`
##[error]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:10:18
   |
LL | #[doc(auto_cfg = 42)] //~ ERROR
   |                  ^^

error: expected boolean for `#[doc(auto_cfg = ...)]`
##[error]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:11:18
   |
LL | #[doc(auto_cfg = "a")] //~ ERROR
   |                  ^^^

warning: unexpected `cfg` condition name: `feature`
##[warning]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:14:21
   |
LL | #[doc(auto_cfg(hide(feature = "windows")))]
   |                     ^^^^^^^^^^^^^^^^^^^
   |
   = help: to expect this configuration use `--check-cfg=cfg(feature, values("windows"))`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `foo`
##[warning]  --> /checkout/tests/rustdoc-ui/doc-cfg-2.rs:16:21
   |
LL | #[doc(auto_cfg(hide(foo)))]
   |                     ^^^
   |
   = help: to expect this configuration use `--check-cfg=cfg(foo)`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration

Comment on lines +415 to +427
let gate =
Z_OPTIONS.iter().filter_map(|opt| opt.target_modifier_cfg()).find(|cfg| *cfg == name).map(
|cfg| {
(
cfg,
sym::cfg_unstable_target_modifier,
Features::cfg_unstable_target_modifier as for<'a> fn(&'a Features) -> _,
)
},
);
if let (Some(feats), Some(gated_cfg)) = (features, gate) {
gate_cfg(&gated_cfg, span, sess, feats);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let gate =
Z_OPTIONS.iter().filter_map(|opt| opt.target_modifier_cfg()).find(|cfg| *cfg == name).map(
|cfg| {
(
cfg,
sym::cfg_unstable_target_modifier,
Features::cfg_unstable_target_modifier as for<'a> fn(&'a Features) -> _,
)
},
);
if let (Some(feats), Some(gated_cfg)) = (features, gate) {
gate_cfg(&gated_cfg, span, sess, feats);
}
let gate = Z_OPTIONS.iter().filter_map(|opt| opt.target_modifier_cfg()).find(|cfg| *cfg == name);
if let (Some(feats), Some(cfg)) = (features, gate) {
let gated_cfg = (cfg, sym::cfg_unstable_target_modifier, Features::cfg_unstable_target_modifier as _);
gate_cfg(&gated_cfg, span, sess, feats);
}

Think this may read a bit better than constructing the tuple in the map

@traviscross traviscross added the P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang label Feb 4, 2026
@davidtwco
Copy link
Member Author

We discussed this in the lang team triage call:

  • There's an openness to seeing these flags be namespaced in some way given they have these additional behaviours compared to other flags, like requiring other crates be rebuilt with them, or now having cfgs. I'll prepare another patch to try this and nominate it.
  • I'll prepare a list of the current target modifiers and whether they would all warrant cfgs or not to inform the decision as to whether that should be the policy or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-cfg Area: `cfg` conditional compilation A-run-make Area: port run-make Makefiles to rmake.rs F-target_modifiers `#![feature(target_modifiers)]` I-lang-nominated Nominated for discussion during a lang team meeting. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-t-lang Status: Awaiting decision from T-lang T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants