Skip to content

Conversation

@camelid
Copy link
Member

@camelid camelid commented Jan 13, 2026

Fixes #151030.

This will make it significantly easier to add support for
fully-qualified paths (e.g. <Foo as Trait>::bar and <dyn Trait>::bar)
without duplicating logic from rustc. All paths that need
type-dependent resolution -- i.e. all that are not handled by
rustc_resolve -- are now parsed by rustc_parse, except for
associated items on some primitives. We support non-standard Rust syntax
like !::clone in rustdoc, so those cannot be parsed by rustc. My hope
is that once fully-qualified paths are implemented, we can deprecate
(but still support) this unusual syntax.

As part of this change, I also fixed a pre-existing bug where links to
fields of re-exported variants were not resolved. This was because we
assumed that these links always had at least three path segments; this
assumption is broken by re-exports.

r? @GuillaumeGomez

Previously, these failed to resolve, despite them working for struct
fields or enum variants that were behind aliases.

However, there is now an inconsistency where enum variant fields behind
an alias resolve to the entry on the alias's page, while enum variants
and struct fields resolve to the page of the backing ADT.
The old name and API were confusing. In my opinion, looking up the type
at the call site is clearer.
All the other parts of this function return the Res for the containing
page, but for some reason, this returns the associated item itself. It
doesn't seem to affect the behavior of rustdoc because e.g. the href
functions use the parent if the DefId is for an assoc item. But it's
clearer and simpler to be consistent.
This will make it significantly easier to add support for
fully-qualified paths (e.g. `<Foo as Trait>::bar` and `<dyn
Trait>::bar`) without duplicating logic from rustc. All paths that need
type-dependent resolution -- i.e. all that are not handled by
`rustc_resolve` -- are now parsed by `rustc_parse`, except for
associated items on some primitives. We support non-standard Rust syntax
like `!::clone` in rustdoc, so those cannot be parsed by rustc. My hope
is that once fully-qualified paths are implemented, we can deprecate
(but still support) this unusual syntax.

As part of this change, I also fixed a pre-existing bug where links to
fields of re-exported variants were not resolved. This was because we
assumed that these links always had at least three path segments; this
assumption is broken by re-exports.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jan 13, 2026
@camelid
Copy link
Member Author

camelid commented Jan 13, 2026

Blocked on #150586.

@camelid
Copy link
Member Author

camelid commented Jan 13, 2026

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 13, 2026
rustdoc: Parse intra-doc links using `rustc_parse`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 13, 2026
@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)
[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 775 tests
test [rustdoc-html] tests/rustdoc-html/all.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/anchor-id-duplicate-method-name-25001.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/disambiguate-anchors-header-29449.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/anchors.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anchors/disambiguate-anchors-32890.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/anchors/trait-impl-items-links-and-anchors.rs ... ok
test [rustdoc-html] tests/rustdoc-html/anonymous-lifetime.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/assoc/assoc-fns.rs ... ok
test [rustdoc-html] tests/rustdoc-html/asref-for-and-of-local-82465.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-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-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/generic_const_exprs.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/hide-complex-unevaluated-consts.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/ice-associated-const-equality-105952.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/show-const-contents.rs ... ok
test [rustdoc-html] tests/rustdoc-html/constant/rfc-2632-const-trait-impl.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-extra.rs ... ok
test [rustdoc-html] tests/rustdoc-html/crate-version-escape.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-no-index/s.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/single-crate-baseline/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/single-crate-no-index/q.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/decl-line-wrapping-empty-arg-list.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-links.rs ... ok
test [rustdoc-html] tests/rustdoc-html/decl-trailing-whitespace.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deep-structures.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/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/deref/deref-mut-methods.rs ... ok
test [rustdoc-html] tests/rustdoc-html/cross-crate-info/kitchen-sink/i.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/escape-deref-methods.rs ... ok
test [rustdoc-html] tests/rustdoc-html/deref/recursive-deref-sidebar.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_default.rs ... ok
test [rustdoc-html] tests/rustdoc-html/description.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/doc_auto_cfg.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doctest/doctest-crate-attributes-38129.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/doctest/doctest-manual-crate-name.rs ... ok
test [rustdoc-html] tests/rustdoc-html/doc-hidden-crate.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-ignore-32556.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-markdown-trailing-docblock-48377.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/sidebar-links-duplicate-impls-33054.rs ... ok
test [rustdoc-html] tests/rustdoc-html/duplicate_impls/impls.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/empty-doc-comment.rs ... ok
test [rustdoc-html] tests/rustdoc-html/elided-lifetime.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/empty-tuple-struct-118180.rs ... ok
test [rustdoc-html] tests/rustdoc-html/enum/enum-headings.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/enum/strip-enum-variant.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/duplicate-reexports-section-150211.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-html-root-url.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/extern-links.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/link-extern-crate-title-33178.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-item-30109.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/pub-extern-crate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/extern/unsafe-extern-blocks.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/extremely_long_typename.rs ... ok
test [rustdoc-html] tests/rustdoc-html/feature-gate-doc_auto_cfg.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-definition-without-blank-line-100638.rs ... ok
test [rustdoc-html] tests/rustdoc-html/footnote-ids.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/foreigntype.rs ... ok
test [rustdoc-html] tests/rustdoc-html/force-unstable-if-unmarked-106421.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/hide-unstable-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/higher-ranked-trait-bounds.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/deduplicate-glob-import-impl-21474.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/cross-crate-hidden-impl-parameter.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/doc-hidden-trait-implementors-33069.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/deprecated-impls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/doc_auto_cfg_nested_impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/duplicated_impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/empty-impl-block.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/generic-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/foreign-implementors-js-43701.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/hidden-implementors-90781.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/hidden-impls.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/hidden-trait-struct-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-assoc-type-21092.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-associated-items-order.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-box.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-everywhere.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-disambiguation.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.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/impl-parts-crosscrate.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.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/negative-impl-sidebar.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/return-impl-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/struct-implementations-title.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/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-implementations-duplicate-self-45584.rs ... ok
test [rustdoc-html] tests/rustdoc-html/impl/trait-impl.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/import-remapped-paths.rs ... ok
test [rustdoc-html] tests/rustdoc-html/infinite-redirection-16265-2.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/assoc-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/attributes.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/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/default-trait-method.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/doc-reachability-impl-31948.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/dyn_trait.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/ret-pos-impl-trait-in-trait.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/renamed-via-module.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/self-sized-bounds-24183.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/rustc-private-76736-4.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/sugar-closure-crate-21801.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_cross/trait-vis.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/blanket-impl-reexported-trait-94183.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/doc-no-inline-32343.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/enum-variant-reexport-46766.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/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_cross/use_crate.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/glob-private-document-private-items.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/parent-path-is-better.rs ... ok
test [rustdoc-html] tests/rustdoc-html/inline_local/please_inline.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-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/private-reexport-in-public-api-hidden-81141.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/pub-re-export-28537.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/assoc-reexport-super.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc-crate/self.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/associated-defaults.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/associated-items.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/builtin-macros.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/basic.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/cross-crate/macro.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/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/extern-builtin-type-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/enum-struct-field.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-inherent-impl.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/extern-type.rs ... ok
test [rustdoc-html] tests/rustdoc-html/intra-doc/field-of-reexported-variant.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-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/proc-macro.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/self-cache.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/libstd-re-export.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/patterns.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/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-rust.rs ... ok
test [rustdoc-html] tests/rustdoc-html/logo-class.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro-expansion/field-followed-by-exclamation.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro-expansion/type-macro-expansion.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/const-rendering-macros-33302.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/decl_macro.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-higher-kinded-function.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/macro-ice-16019.rs ... ok
test [rustdoc-html] tests/rustdoc-html/macro/macro-in-async-block.rs ... 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>::new (line 264) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,RandomState>::from (line 1503) ... 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>::entry (line 959) ... 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>::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 1077) ... 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>::hasher (line 837) ... 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_key_value (line 1017) ... 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 2052) ... 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>::remove_entry (line 1367) ... 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>::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_reserve (line 895) ... 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>::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::HashMap<K,V,S>::with_capacity_and_hasher (line 383) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::IntoIter (line 1610) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::IntoKeys (line 1842) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::Iter (line 1524) ... 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,S,A>::capacity (line 313) ... 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>::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>::difference (line 630) ... 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>::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_or_insert (line 805) ... 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_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>::intersection (line 697) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::into_iter (line 1642) ... 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_subset (line 929) ... 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>::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>::take (line 1058) ... 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>::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>::with_hasher (line 223) ... 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::Intersection (line 1506) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::IntoIter (line 1421) ... ok
---
To only update this specific test, also pass `--test-args intra-doc/ambiguity.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/intra-doc/ambiguity.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/intra-doc/ambiguity" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
error: expected identifier, found keyword `true`
##[error] --> <anon>:1:1
  |
1 | true
  | ^^^^ expected identifier, found keyword

error: `true` is both a module and a primitive type
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/ambiguity.rs:38:6
   |
LL | /// [true] //~ ERROR `true` is both a module and a primitive type
   |      ^^^^ ambiguous link
   |
note: the lint level is defined here
  --> /checkout/tests/rustdoc-ui/intra-doc/ambiguity.rs:1:9
   |
LL | #![deny(rustdoc::broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: to link to the module, prefix with `mod@`
   |
LL | /// [mod@true] //~ ERROR `true` is both a module and a primitive type
   |      ++++
help: to link to the primitive type, prefix with `prim@`
   |
LL | /// [prim@true] //~ ERROR `true` is both a module and a primitive type
   |      +++++

error: `ambiguous` is both a function and a struct
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/ambiguity.rs:27:7
   |
LL | /// [`ambiguous`] is ambiguous. //~ERROR `ambiguous`
   |       ^^^^^^^^^ ambiguous link
   |
help: to link to the function, add parentheses
   |
LL | /// [`ambiguous()`] is ambiguous. //~ERROR `ambiguous`
   |                ++
help: to link to the struct, prefix with `struct@`
   |
LL | /// [`struct@ambiguous`] is ambiguous. //~ERROR `ambiguous`
   |       +++++++

error: `ambiguous` is both a function and a struct
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/ambiguity.rs:29:6
   |
LL | /// [ambiguous] is ambiguous. //~ERROR ambiguous
   |      ^^^^^^^^^ ambiguous link
   |
help: to link to the function, add parentheses
   |
LL | /// [ambiguous()] is ambiguous. //~ERROR ambiguous
   |               ++
help: to link to the struct, prefix with `struct@`
   |
LL | /// [struct@ambiguous] is ambiguous. //~ERROR ambiguous
   |      +++++++

error: `multi_conflict` is a function, a struct, and a macro
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/ambiguity.rs:31:7
   |
LL | /// [`multi_conflict`] is a three-way conflict. //~ERROR `multi_conflict`
   |       ^^^^^^^^^^^^^^ ambiguous link
   |
help: to link to the function, add parentheses
   |
LL | /// [`multi_conflict()`] is a three-way conflict. //~ERROR `multi_conflict`
   |                     ++
help: to link to the struct, prefix with `struct@`
   |
LL | /// [`struct@multi_conflict`] is a three-way conflict. //~ERROR `multi_conflict`
   |       +++++++
help: to link to the macro, add an exclamation mark
   |
LL | /// [`multi_conflict!`] is a three-way conflict. //~ERROR `multi_conflict`
   |                     +

error: `type_and_value` is both a constant and a module
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/ambiguity.rs:33:16
   |
LL | /// Ambiguous [type_and_value]. //~ERROR type_and_value
   |                ^^^^^^^^^^^^^^ ambiguous link
   |
help: to link to the constant, prefix with `const@`
   |
LL | /// Ambiguous [const@type_and_value]. //~ERROR type_and_value
   |                ++++++
help: to link to the module, prefix with `mod@`
   |
LL | /// Ambiguous [mod@type_and_value]. //~ERROR type_and_value
   |                ++++

error: `foo::bar` is both a function and an enum
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/ambiguity.rs:35:43
   |
LL | /// Ambiguous non-implied shortcut link [`foo::bar`]. //~ERROR `foo::bar`
   |                                           ^^^^^^^^ ambiguous link
   |
help: to link to the function, add parentheses
   |
LL | /// Ambiguous non-implied shortcut link [`foo::bar()`]. //~ERROR `foo::bar`
   |                                                   ++
help: to link to the enum, prefix with `enum@`
   |
LL | /// Ambiguous non-implied shortcut link [`enum@foo::bar`]. //~ERROR `foo::bar`
   |                                           +++++

error: aborting due to 6 previous errors
------------------------------------------

---- [ui] tests/rustdoc-ui/intra-doc/ambiguity.rs stdout end ----
---- [ui] tests/rustdoc-ui/intra-doc/errors.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit status: 101
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/intra-doc/errors.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/intra-doc/errors" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
error: unresolved link to `path::to::nonexistent::module`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:7:6
   |
LL | /// [path::to::nonexistent::module]
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope
   |
note: the lint level is defined here
  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:1:9
   |
---

error: unresolved link to `path::to::nonexistent::macro`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:11:6
   |
LL | /// [path::to::nonexistent::macro!]
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope

error: expected identifier, found keyword `type`
##[error] --> <anon>:1:24
  |
---

error: unresolved link to `path::to::nonexistent::type`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:15:6
   |
LL | /// [type@path::to::nonexistent::type]
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope

error: unresolved link to `std::io::not::here`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:19:6
   |
LL | /// [std::io::not::here]
   |      ^^^^^^^^^^^^^^^^^^ no item named `not` in module `io`

error: unresolved link to `std::io::not::here`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:23:6
   |
LL | /// [type@std::io::not::here]
   |      ^^^^^^^^^^^^^^^^^^^^^^^ no item named `not` in module `io`

error: unresolved link to `std::io::Error::x`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:27:6
   |
LL | /// [std::io::Error::x]
   |      ^^^^^^^^^^^^^^^^^ the struct `Error` has no field or associated item named `x`

error: unresolved link to `std::io::ErrorKind::x`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:31:6
   |
LL | /// [std::io::ErrorKind::x]
   |      ^^^^^^^^^^^^^^^^^^^^^ the enum `ErrorKind` has no variant or associated item named `x`

error: unresolved link to `f::A`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:35:6
   |
LL | /// [f::A]
   |      ^^^^ `f` is a function, not a module or type, and cannot have associated items

error: unresolved link to `f::A`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:39:6
   |
LL | /// [f::A!]
   |      ^^^^^ `f` is a function, not a module or type, and cannot have associated items

error: unresolved link to `S::A`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:43:6
   |
LL | /// [S::A]
   |      ^^^^ the struct `S` has no field or associated item named `A`

error: unresolved link to `S::fmt`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:47:6
   |
LL | /// [S::fmt]
   |      ^^^^^^ the struct `S` has no field or associated item named `fmt`

error: unresolved link to `E::D`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:51:6
   |
LL | /// [E::D]
   |      ^^^^ the enum `E` has no variant or associated item named `D`

error: unresolved link to `u8::not_found`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:55:6
   |
LL | /// [u8::not_found]
   |      ^^^^^^^^^^^^^ the primitive type `u8` has no associated item named `not_found`

error: unresolved link to `std::primitive::u8::not_found`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:59:6
   |
LL | /// [std::primitive::u8::not_found]
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the primitive type `u8` has no associated item named `not_found`

error: unresolved link to `Vec::into_iter`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:63:6
   |
LL | /// [type@Vec::into_iter]
   |      ^^^^^^^^^^^^^^^^^^^ this link resolves to the associated function `into_iter`, which is not in the type namespace
   |
help: to link to the associated function, add parentheses
   |
LL - /// [type@Vec::into_iter]
LL + /// [Vec::into_iter()]
   |

error: unresolved link to `S`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:68:6
   |
LL | /// [S!]
   |      ^^ this link resolves to the struct `S`, which is not a macro
   |
help: to link to the struct, prefix with `struct@`
   |
LL - /// [S!]
LL + /// [struct@S]
   |

error: unresolved link to `S::h`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:78:6
   |
LL | /// [type@S::h]
   |      ^^^^^^^^^ this link resolves to the associated function `h`, which is not in the type namespace
   |
help: to link to the associated function, add parentheses
   |
LL - /// [type@S::h]
LL + /// [S::h()]
   |

error: unresolved link to `T::g`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:86:6
   |
LL | /// [type@T::g]
   |      ^^^^^^^^^ this link resolves to the associated function `g`, which is not in the type namespace
   |
help: to link to the associated function, add parentheses
   |
LL - /// [type@T::g]
LL + /// [T::g()]
   |

error: unresolved link to `T::h`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:91:6
   |
LL | /// [T::h!]
   |      ^^^^^ the trait `T` has no macro named `h`

error: unresolved link to `TestEnum::Variant1::field_name`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/errors.rs:107:6
   |
LL | ///[`TestEnum::Variant1::field_name`]
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ variant `Variant1` has no such field


thread 'rustc' (316290) panicked at src/librustdoc/passes/collect_intra_doc_links.rs:724:39:
variant parent must be ADT
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: rustdoc::passes::collect_intra_doc_links::resolve_variant_field
   4: rustdoc::passes::collect_intra_doc_links::resolve_associated_item
   5: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve
   6: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_links::{closure#0}
   7: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
   8: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
   9: rustdoc::passes::collect_intra_doc_links::collect_intra_doc_links
  10: rustdoc::core::run_global_ctxt
  11: <rustc_session::session::Session>::time::<(rustdoc::clean::types::Crate, rustdoc::config::RenderOptions, rustdoc::formats::cache::Cache, std::collections::hash::map::HashMap<rustc_span::BytePos, alloc::vec::Vec<rustdoc::html::macro_expansion::ExpandedCode>, rustc_hash::FxBuildHasher>), rustdoc::main_args::{closure#2}::{closure#0}::{closure#0}>
  12: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<(), rustdoc::main_args::{closure#2}::{closure#0}>::{closure#2}::{closure#0}, ()>::{closure#1}, ()>::{closure#0}, ()>
  13: <rustc_interface::passes::create_and_enter_global_ctxt<(), rustdoc::main_args::{closure#2}::{closure#0}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustdoc::main_args::{closure#2}::{closure#0})>>::call_once::{shim:vtable#0}
  14: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustdoc::main_args::{closure#2}::{closure#0}), Output = ()>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustdoc::main_args::{closure#2}::{closure#0})>>::call_once
  15: rustc_interface::passes::create_and_enter_global_ctxt::<(), rustdoc::main_args::{closure#2}::{closure#0}>
  16: rustc_interface::interface::run_compiler::<(), rustdoc::main_args::{closure#2}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.94.0-nightly (9b424ef42 2026-01-12) running on aarch64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C debuginfo=0

query stack during panic:
end of query stack
error: aborting due to 20 previous errors
------------------------------------------
---

26    |
27    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
28 
- error: unresolved link to `Type::field%extra`
-   --> $DIR/malformed-paths.rs:14:7
-    |
- LL | //! [`Type::field%extra`]
-    |       ^^^^^^^^^^^^^^^^^ the struct `Type` has no field or associated item named `field%extra`
- 
- error: aborting due to 4 previous errors
+ error: aborting due to 3 previous errors
36 
37 
---
To only update this specific test, also pass `--test-args intra-doc/malformed-paths.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/intra-doc/malformed-paths.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/intra-doc/malformed-paths" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
error: unresolved link to `Type::`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/malformed-paths.rs:5:7
   |
LL | //! [`Type::`]
   |       ^^^^^^ the struct `Type` has no field or associated item named ``
   |
note: the lint level is defined here
  --> /checkout/tests/rustdoc-ui/intra-doc/malformed-paths.rs:2:9
   |
LL | #![deny(rustdoc::broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unresolved link to `Type@field`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/malformed-paths.rs:9:7
   |
LL | //! [`struct@Type@field`]
   |       ^^^^^^^^^^^^^^^^^ no item named `Type@field` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unresolved link to `Type&content`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/malformed-paths.rs:12:6
   |
LL | //! [Type&content]
   |      ^^^^^^^^^^^^ no item named `Type&content` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: aborting due to 3 previous errors
------------------------------------------

---- [ui] tests/rustdoc-ui/intra-doc/malformed-paths.rs stdout end ----
---- [ui] tests/rustdoc-ui/intra-doc/non-path-primitives.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/rustdoc-ui/intra-doc/non-path-primitives/non-path-primitives.stderr`
diff of stderr:

47 LL | //! [tuple::eq]
48    |      ^^^^^^^^^ the primitive type `tuple` has no associated item named `eq`
49 
+ error: expected identifier, found keyword `fn`
+  --> <anon>:1:1
+   |
+ 1 | fn::eq
+   | ^^ expected identifier, found keyword
+   |
+ help: escape `fn` to use it as an identifier
+   |
+ 1 | r#fn::eq
+   | ++
+ 
+ error: expected identifier, found keyword `fn`
+  --> <anon>:1:1
+   |
+ 1 | fn::eq
+   | ^^ expected identifier, found keyword
+   |
+ help: escape `fn` to use it as an identifier
+   |
+ 1 | r#fn::eq
+   | ++
+ 
50 error: unresolved link to `fn::eq`
51   --> $DIR/non-path-primitives.rs:30:6
52    |


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args intra-doc/non-path-primitives.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/intra-doc/non-path-primitives.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/intra-doc/non-path-primitives" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
error: unresolved link to `T`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/non-path-primitives.rs:12:7
   |
LL | //! [[T]::rotate_left] //~ ERROR unresolved link to `T`
   |       ^ no item named `T` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
  --> /checkout/tests/rustdoc-ui/intra-doc/non-path-primitives.rs:1:9
   |
LL | #![deny(rustdoc::broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unresolved link to `Z`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/non-path-primitives.rs:14:5
   |
LL | //![Z]([T; N]::map) //~ ERROR unresolved link to `Z`
   |     ^ no item named `Z` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unresolved link to `Z`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/non-path-primitives.rs:17:6
   |
LL | //! [Z][] //~ ERROR unresolved link to `Z`
   |      ^ no item named `Z` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unresolved link to `Z`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/non-path-primitives.rs:19:6
   |
LL | //! [Z]: [T; N]::map //~ ERROR unresolved link to `Z`
   |      ^ no item named `Z` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unresolved link to `unit::eq`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/non-path-primitives.rs:28:6
   |
LL | //! [unit::eq] //~ ERROR unresolved
   |      ^^^^^^^^ the primitive type `unit` has no associated item named `eq`

error: unresolved link to `tuple::eq`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/non-path-primitives.rs:29:6
   |
LL | //! [tuple::eq] //~ ERROR unresolved
   |      ^^^^^^^^^ the primitive type `tuple` has no associated item named `eq`

error: expected identifier, found keyword `fn`
##[error] --> <anon>:1:1
  |
1 | fn::eq
  | ^^ expected identifier, found keyword
  |
help: escape `fn` to use it as an identifier
  |
1 | r#fn::eq
  | ++

error: expected identifier, found keyword `fn`
##[error] --> <anon>:1:1
  |
1 | fn::eq
  | ^^ expected identifier, found keyword
  |
help: escape `fn` to use it as an identifier
  |
1 | r#fn::eq
  | ++

error: unresolved link to `fn::eq`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/non-path-primitives.rs:30:6
   |
LL | //! [fn::eq] //~ ERROR unresolved
   |      ^^^^^^ the primitive type `fn` has no associated item named `eq`

error: unresolved link to `reference::deref`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/non-path-primitives.rs:34:6
   |
LL | //! [reference::deref] //~ ERROR unresolved
   |      ^^^^^^^^^^^^^^^^ the primitive type `reference` has no associated item named `deref`

error: aborting due to 8 previous errors
------------------------------------------

---- [ui] tests/rustdoc-ui/intra-doc/non-path-primitives.rs stdout end ----
---
To only update this specific test, also pass `--test-args intra-doc/reference-link-reports-error-once.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/intra-doc/reference-link-reports-error-once.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/intra-doc/reference-link-reports-error-once" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
error: expected identifier, found keyword `ref`
##[error] --> <anon>:1:1
  |
---

error: unresolved link to `ref`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs:13:10
   |
LL | /// [a]: ref
   |          ^^^ no item named `ref` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
  --> /checkout/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs:1:9
   |
LL | #![deny(rustdoc::broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unresolved link to `ref2`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs:15:10
   |
LL | /// [b]: ref2
   |          ^^^^ no item named `ref2` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: expected identifier, found keyword `ref`
---

error: unresolved link to `ref`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs:7:62
   |
LL | /// Other links to the same target should still emit error: [ref] //~ERROR unresolved link to `ref`
   |                                                              ^^^ no item named `ref` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: expected identifier, found keyword `ref`
---

error: unresolved link to `ref`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs:8:16
   |
LL | /// Duplicate [ref] //~ERROR unresolved link to `ref`
   |                ^^^ no item named `ref` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unresolved link to `ref2`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs:10:60
   |
LL | /// Other links to other targets should still emit error: [ref2] //~ERROR unresolved link to `ref2`
   |                                                            ^^^^ no item named `ref2` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unresolved link to `ref2`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs:11:16
   |
LL | /// Duplicate [ref2] //~ERROR unresolved link to `ref2`
   |                ^^^^ no item named `ref2` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: expected identifier, found keyword `ref`
---

error: unresolved link to `ref`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs:18:6
   |
LL | /// [ref][]
   |      ^^^ no item named `ref` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: aborting due to 7 previous errors
------------------------------------------

---- [ui] tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs stdout end ----
---- [ui] tests/rustdoc-ui/intra-doc/weird-syntax.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit status: 101
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/intra-doc/weird-syntax.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/intra-doc/weird-syntax" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
error: incompatible link kind for `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:18:7
   |
LL | /// [`struct@Clone`] //~ERROR link
   |       ^^^^^^^^^^^^ this link resolved to a trait, which is not a struct
   |
note: the lint level is defined here
  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:3:9
   |
LL | #![deny(rustdoc::broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: to link to the trait, prefix with `trait@`
   |
LL - /// [`struct@Clone`] //~ERROR link
LL + /// [`trait@Clone`] //~ERROR link
   |

error: incompatible link kind for `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:21:9
   |
LL | /// [```struct@Clone```] //~ERROR link
   |         ^^^^^^^^^^^^ this link resolved to a trait, which is not a struct
   |
help: to link to the trait, prefix with `trait@`
   |
LL - /// [```struct@Clone```] //~ERROR link
LL + /// [```trait@Clone```] //~ERROR link
   |

error: incompatible link kind for `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:24:11
   |
LL | /// [  `  struct@Clone  `  ] //~ERROR link
   |           ^^^^^^^^^^^^ this link resolved to a trait, which is not a struct
   |
help: to link to the trait, prefix with `trait@`
   |
LL - /// [  `  struct@Clone  `  ] //~ERROR link
LL + /// [  `  trait@Clone  `  ] //~ERROR link
   |

error: unresolved link to `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:27:9
   |
LL | /// [  `Clone ()`  ] //~ERROR link
   |         ^^^^^^^^ this link resolves to the trait `Clone`, which is not a function
   |
help: to link to the trait, prefix with `trait@`
   |
LL - /// [  `Clone ()`  ] //~ERROR link
LL + /// [  `trait@Clone `  ] //~ERROR link
   |

error: unresolved link to `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:30:7
   |
LL | /// [`Clone ()`  ] //~ERROR link
   |       ^^^^^^^^ this link resolves to the trait `Clone`, which is not a function
   |
help: to link to the trait, prefix with `trait@`
   |
LL - /// [`Clone ()`  ] //~ERROR link
LL + /// [`trait@Clone `  ] //~ERROR link
   |

error: unresolved link to `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:33:9
   |
LL | /// [  `Clone ()`] //~ERROR link
   |         ^^^^^^^^ this link resolves to the trait `Clone`, which is not a function
   |
help: to link to the trait, prefix with `trait@`
   |
LL - /// [  `Clone ()`] //~ERROR link
LL + /// [  `trait@Clone `] //~ERROR link
   |

error: unresolved link to `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:36:9
   |
LL | /// [```Clone ()```] //~ERROR link
   |         ^^^^^^^^ this link resolves to the trait `Clone`, which is not a function
   |
help: to link to the trait, prefix with `trait@`
   |
LL - /// [```Clone ()```] //~ERROR link
LL + /// [```trait@Clone ```] //~ERROR link
   |

error: unresolved link to `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:42:13
   |
LL | /// [  ```  Clone ()  ```  ] //~ERROR link
   |             ^^^^^^^^ this link resolves to the trait `Clone`, which is not a function
   |
help: to link to the trait, prefix with `trait@`
   |
LL - /// [  ```  Clone ()  ```  ] //~ERROR link
LL + /// [  ```  trait@Clone   ```  ] //~ERROR link
   |

error: incompatible link kind for `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:62:10
   |
LL | /// [x][ struct@Clone] //~ERROR link
   |          ^^^^^^^^^^^^ this link resolved to a trait, which is not a struct
   |
help: to link to the trait, prefix with `trait@`
   |
LL - /// [x][ struct@Clone] //~ERROR link
LL + /// [x][ trait@Clone] //~ERROR link
   |

error: incompatible link kind for `Clone`
##[error]  --> /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:65:9
   |
LL | /// [x][struct@Clone ] //~ERROR link
   |         ^^^^^^^^^^^^ this link resolved to a trait, which is not a struct
   |
help: to link to the trait, prefix with `trait@`
   |
LL - /// [x][struct@Clone ] //~ERROR link
LL + /// [x][trait@Clone ] //~ERROR link
   |

error: unknown start of token: \
##[error] --> <anon>:1:6
  |
---
1 | Clone\(\)
  |        ^


thread 'rustc' (316690) panicked at src/librustdoc/passes/collect_intra_doc_links.rs:492:17:
path must have no generics, but has Some(Parenthesized(ParenthesizedArgs { span: /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:1:1: 1:10 (#0), inputs: [], inputs_span: /checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:1:7: 1:10 (#0), output: Default(/checkout/tests/rustdoc-ui/intra-doc/weird-syntax.rs:1:10: 1:10 (#0)) }))
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve
   3: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_links::{closure#0}
   4: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
   5: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
   6: rustdoc::passes::collect_intra_doc_links::collect_intra_doc_links
   7: rustdoc::core::run_global_ctxt
   8: <rustc_session::session::Session>::time::<(rustdoc::clean::types::Crate, rustdoc::config::RenderOptions, rustdoc::formats::cache::Cache, std::collections::hash::map::HashMap<rustc_span::BytePos, alloc::vec::Vec<rustdoc::html::macro_expansion::ExpandedCode>, rustc_hash::FxBuildHasher>), rustdoc::main_args::{closure#2}::{closure#0}::{closure#0}>
   9: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<(), rustdoc::main_args::{closure#2}::{closure#0}>::{closure#2}::{closure#0}, ()>::{closure#1}, ()>::{closure#0}, ()>
  10: <rustc_interface::passes::create_and_enter_global_ctxt<(), rustdoc::main_args::{closure#2}::{closure#0}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustdoc::main_args::{closure#2}::{closure#0})>>::call_once::{shim:vtable#0}
  11: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustdoc::main_args::{closure#2}::{closure#0}), Output = ()>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustdoc::main_args::{closure#2}::{closure#0})>>::call_once
  12: rustc_interface::passes::create_and_enter_global_ctxt::<(), rustdoc::main_args::{closure#2}::{closure#0}>
  13: rustc_interface::interface::run_compiler::<(), rustdoc::main_args::{closure#2}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.94.0-nightly (9b424ef42 2026-01-12) running on aarch64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C debuginfo=0

query stack during panic:
end of query stack
error: aborting due to 10 previous errors
------------------------------------------
---
To only update this specific test, also pass `--test-args lints/redundant_explicit_links-utf8.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
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/lints/redundant_explicit_links-utf8.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/lints/redundant_explicit_links-utf8" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
error: unknown start of token: \u{2026}
##[error] --> <anon>:1:1
  |
---

warning: unresolved link to `…foo`
##[warning]  --> /checkout/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs:3:7
   |
LL | /// [`…foo`] //~ WARN: unresolved link
   |       ^^^^ no item named `…foo` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
   = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

---

warning: unresolved link to `…bar`
##[warning]  --> /checkout/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs:4:7
   |
LL | /// [`…bar`] //~ WARN: unresolved link
   |       ^^^^ no item named `…bar` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unknown start of token: \u{2026}
---

warning: unresolved link to `…`
##[warning]  --> /checkout/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs:8:7
   |
LL | /// [`…`] //~ WARN: unresolved link
   |       ^ no item named `…` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unknown start of token: \u{2026}
##[error] --> <anon>:1:1
---

warning: unresolved link to `…`
##[warning]  --> /checkout/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs:9:7
   |
LL | /// [`…`] //~ WARN: unresolved link
   |       ^ no item named `…` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unknown start of token: \u{2026}
##[error] --> <anon>:1:1
---

warning: unresolved link to `…`
##[warning]  --> /checkout/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs:13:11
   |
LL | /// [`…`][…] //~ WARN: unresolved link
   |           ^ no item named `…` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unknown start of token: \u{2026}
##[error] --> <anon>:1:1
---

warning: unresolved link to `…`
##[warning]  --> /checkout/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs:14:11
   |
LL | /// [`…`][…] //~ WARN: unresolved link
   |           ^ no item named `…` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unknown start of token: \u{2026}
##[error] --> <anon>:1:1
---

warning: unresolved link to `…………………………`
##[warning]  --> /checkout/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs:21:15
   |
LL | /// [Broken3][…………………………] //~ WARN: unresolved link
   |               ^^^^^^^^^^ no item named `…………………………` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: 7 warnings emitted
------------------------------------------

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 13, 2026

☀️ Try build successful (CI)
Build commit: aad88b3 (aad88b3772bf2de00c6c29b0e3b8448659711867, parent: 2f1bd3f3781c90a8447e37d65a898442b8618895)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (aad88b3): comparison URL.

Overall result: ❌ regressions - BENCHMARK(S) FAILED

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

❗ ❗ ❗ ❗ ❗
Warning ⚠️: The following benchmark(s) failed to build:

  • Job failure
  • cargo-0.87.1

❗ ❗ ❗ ❗ ❗

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.0% [0.2%, 9.2%] 17
Regressions ❌
(secondary)
1.2% [0.1%, 9.0%] 26
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.0% [0.2%, 9.2%] 17

Max RSS (memory usage)

Results (primary -2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Cycles

Results (primary 6.5%, secondary 2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
6.5% [6.5%, 6.5%] 1
Regressions ❌
(secondary)
4.6% [2.0%, 7.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) 6.5% [6.5%, 6.5%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 475.39s -> 474.205s (-0.25%)
Artifact size: 391.43 MiB -> 391.40 MiB (-0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jan 13, 2026
@camelid
Copy link
Member Author

camelid commented Jan 16, 2026

Ok, there are a couple of issues here:

  1. There are significant perf regressions, worst of all on serde (9%). These are probably too much to justify.
  2. There are also some tricky backcompat issues, like Retry::try no longer being accepted due to the use of a keyword.

The first could potentially be solved by not using rustc_parse for really simple paths – i.e., with no generics. We would fall back to splitting. Technically no paths actually have generics right now due to us stripping them out with our bespoke parser (which I actually implemented, in #76934)1. However, once we support fully-qualified syntax (#74563), which is the ultimate goal of this PR's work, we will no longer be stripping generics.

Another complication, once we work on support for fully-qualified paths, is that rustc_resolve needs to be able to parse the fully-qualified paths so that it can record Ress for the components (like the Vec and the Clone in <Vec as Clone>::clone). Rustdoc later uses these Ress as part of its type-directed resolution. So perhaps the resolver should itself parse paths using rustc_parse and have another field in addition to doc_link_resolutions that maps non-trivial paths to their parsed Path representation. This way, rustdoc wouldn't have to do the parsing a second time.

Regarding backwards compatibility with keyword uses (e.g. Retry::try), I think we should do some kind of future-compatibility warning and phase these paths out in favor of normal Rust-style Retry::r#try – which does not match the display in docs, but does match the use in code, which might be clearer for readers of the docs. We could also consider requiring escaping but stripping the r# when rendering the links, like we do for disambiguators. Or we could permanently keep accepting keywords, but this would create inconsistency where fully-qualified paths would need to escape keywords (due to use of rustc_parse and potentially ambiguity with e.g. the as in the path), but trivial paths would not.

Also, regarding backcompat with our non-standard primitive paths like !::into and &mut::clone, I think we should also deprecate these once fully-qualified syntax is available. It's just confusing IMO to have weird non-standard paths like these once proper syntax like <! as Into>::into and <&mut T>::clone is available.

Footnotes

  1. I believe there is actually a weird edge case with Fn() paths based on the error encountered by rust-timer when building the cargo benchmark. This shows the value of us switching to rustc_parse for parsing given the subtleties that can be easily missed.

@camelid
Copy link
Member Author

camelid commented Jan 16, 2026

cc @petrochenkov regarding the potential (minor) changes to the resolver that I mentioned above.

@petrochenkov petrochenkov self-assigned this Jan 16, 2026
@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 16, 2026
@GuillaumeGomez
Copy link
Member

Regarding backwards compatibility with keyword uses (e.g. Retry::try), I think we should do some kind of future-compatibility warning and phase these paths out in favor of normal Rust-style Retry::r#try – which does not match the display in docs, but does match the use in code, which might be clearer for readers of the docs. We could also consider requiring escaping but stripping the r# when rendering the links, like we do for disambiguators. Or we could permanently keep accepting keywords, but this would create inconsistency where fully-qualified paths would need to escape keywords (due to use of rustc_parse and potentially ambiguity with e.g. the as in the path), but trivial paths would not.

I disagree here. Writing docs should be as easy as possible, and there is possible ambiguity here. I think the right way to handle this is to allow rustc_parse to not check keywords if we ask it not to.

Also, regarding backcompat with our non-standard primitive paths like !::into and &mut::clone, I think we should also deprecate these once fully-qualified syntax is available. It's just confusing IMO to have weird non-standard paths like these once proper syntax like <! as Into>::into and <&mut T>::clone is available.

I'm not too sure about this. I like !::into to work, but on the other hand, there is a clearer (although longer) alternative. Well, let's see what the others think about it.

@petrochenkov
Copy link
Contributor

Finished benchmarking commit (aad88b3): comparison URL.

helloworld regressing is weird, it doesn't even have doc links.
Also, creating a new ParseSess for every path is certainly sub-optimal.

@petrochenkov
Copy link
Contributor

cc @petrochenkov regarding the potential (minor) changes to the resolver that I mentioned above.

If you make compiler changes related to doc link resolution, please assign those PRs to me

@petrochenkov petrochenkov removed their assignment Jan 16, 2026
@camelid
Copy link
Member Author

camelid commented Jan 16, 2026

I disagree here. Writing docs should be as easy as possible, and there is possible ambiguity here. I think the right way to handle this is to allow rustc_parse to not check keywords if we ask it not to.

I assume you meant there is no possible ambiguity. I initially thought that as well, and was thinking of adding a rustc_parse flag to allow keywords, but it's actually not true that there's no ambiguity. For example, fully-qualified paths use the as keyword, so we wouldn't want to allow unprefixed use of that. There might be other keywords we want to use later too, like const { ... } for certain generic arguments -- something that is being implemented in rustc right now.

Also, using keywords as item names is quite rare because it's a pain for people to write r# in their code all the time. It doesn't seem too bad to me to make writing the links harder if it's going to be the same syntax as writing it in code, especially given that this is not a common case.

@GuillaumeGomez
Copy link
Member

I disagree here. Writing docs should be as easy as possible, and there is possible ambiguity here. I think the right way to handle this is to allow rustc_parse to not check keywords if we ask it not to.

I assume you meant there is no possible ambiguity. I initially thought that as well, and was thinking of adding a rustc_parse flag to allow keywords, but it's actually not true that there's no ambiguity. For example, fully-qualified paths use the as keyword, so we wouldn't want to allow unprefixed use of that. There might be other keywords we want to use later too, like const { ... } for certain generic arguments -- something that is being implemented in rustc right now.

Also, using keywords as item names is quite rare because it's a pain for people to write r# in their code all the time. It doesn't seem too bad to me to make writing the links harder if it's going to be the same syntax as writing it in code, especially given that this is not a common case.

Yes, forgot the no. ^^'

And good catch for the as. I hate to suggest this but can we special-case this one? Are there other potential issues like that? If that's a possibility, then we'll need to wait next edition for this switch to be complete then.

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

Labels

perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustdoc: Parse intra-doc links using rustc_parse

6 participants