From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs | 13 -- src/test/rustdoc-ui/assoc-item-not-in-scope.rs | 22 --- src/test/rustdoc-ui/assoc-item-not-in-scope.stderr | 14 -- src/test/rustdoc-ui/auxiliary/empty-fn.rs | 3 - src/test/rustdoc-ui/auxiliary/extern_macros.rs | 7 - src/test/rustdoc-ui/auxiliary/issue-61592.rs | 3 - src/test/rustdoc-ui/auxiliary/module_macro_doc.rs | 1 - src/test/rustdoc-ui/auxiliary/overflow.rs | 20 -- src/test/rustdoc-ui/auxiliary/panic-item.rs | 17 -- src/test/rustdoc-ui/bare-urls.fixed | 60 ------ src/test/rustdoc-ui/bare-urls.rs | 60 ------ src/test/rustdoc-ui/bare-urls.stderr | 143 --------------- src/test/rustdoc-ui/block-doc-comment.rs | 17 -- src/test/rustdoc-ui/block-doc-comment.stdout | 5 - src/test/rustdoc-ui/bounded-hr-lifetime.rs | 9 - src/test/rustdoc-ui/bounded-hr-lifetime.stderr | 10 - src/test/rustdoc-ui/c-help.rs | 6 - src/test/rustdoc-ui/c-help.stdout | 51 ------ src/test/rustdoc-ui/cfg-test.rs | 31 ---- src/test/rustdoc-ui/cfg-test.stdout | 7 - src/test/rustdoc-ui/check-attr-test.rs | 31 ---- src/test/rustdoc-ui/check-attr-test.stderr | 151 --------------- src/test/rustdoc-ui/check-attr.rs | 41 ----- src/test/rustdoc-ui/check-attr.stderr | 175 ------------------ src/test/rustdoc-ui/check-cfg-test.rs | 12 -- src/test/rustdoc-ui/check-cfg-test.stderr | 11 -- src/test/rustdoc-ui/check-cfg-test.stdout | 6 - src/test/rustdoc-ui/check-cfg-unstable.rs | 2 - src/test/rustdoc-ui/check-cfg-unstable.stderr | 2 - src/test/rustdoc-ui/check-cfg.rs | 7 - src/test/rustdoc-ui/check-cfg.stderr | 10 - .../rustdoc-ui/check-doc-alias-attr-location.rs | 23 --- .../check-doc-alias-attr-location.stderr | 26 --- src/test/rustdoc-ui/check-doc-alias-attr.rs | 28 --- src/test/rustdoc-ui/check-doc-alias-attr.stderr | 108 ----------- src/test/rustdoc-ui/check-fail.rs | 22 --- src/test/rustdoc-ui/check-fail.stderr | 52 ------ src/test/rustdoc-ui/check.rs | 14 -- src/test/rustdoc-ui/check.stderr | 57 ------ .../rustdoc-ui/commandline-argfile-badutf8.args | 2 - src/test/rustdoc-ui/commandline-argfile-badutf8.rs | 12 -- .../rustdoc-ui/commandline-argfile-badutf8.stderr | 2 - src/test/rustdoc-ui/commandline-argfile-missing.rs | 14 -- .../rustdoc-ui/commandline-argfile-missing.stderr | 2 - src/test/rustdoc-ui/commandline-argfile.args | 2 - src/test/rustdoc-ui/commandline-argfile.rs | 13 -- src/test/rustdoc-ui/const-evalutation-ice.rs | 11 -- src/test/rustdoc-ui/const-evalutation-ice.stderr | 9 - src/test/rustdoc-ui/coverage/allow_missing_docs.rs | 41 ----- .../rustdoc-ui/coverage/allow_missing_docs.stderr | 20 -- .../rustdoc-ui/coverage/allow_missing_docs.stdout | 7 - src/test/rustdoc-ui/coverage/basic.rs | 50 ----- src/test/rustdoc-ui/coverage/basic.stdout | 7 - src/test/rustdoc-ui/coverage/doc-examples-json.rs | 13 -- .../rustdoc-ui/coverage/doc-examples-json.stdout | 1 - src/test/rustdoc-ui/coverage/doc-examples.rs | 27 --- src/test/rustdoc-ui/coverage/doc-examples.stdout | 7 - src/test/rustdoc-ui/coverage/empty.rs | 4 - src/test/rustdoc-ui/coverage/empty.stdout | 7 - .../rustdoc-ui/coverage/enum-tuple-documented.rs | 37 ---- .../coverage/enum-tuple-documented.stdout | 7 - src/test/rustdoc-ui/coverage/enum-tuple.rs | 18 -- src/test/rustdoc-ui/coverage/enum-tuple.stdout | 7 - src/test/rustdoc-ui/coverage/enums.rs | 22 --- src/test/rustdoc-ui/coverage/enums.stdout | 7 - src/test/rustdoc-ui/coverage/exotic.rs | 15 -- src/test/rustdoc-ui/coverage/exotic.stdout | 7 - src/test/rustdoc-ui/coverage/html.rs | 4 - src/test/rustdoc-ui/coverage/html.stderr | 2 - src/test/rustdoc-ui/coverage/json.rs | 65 ------- src/test/rustdoc-ui/coverage/json.stdout | 1 - src/test/rustdoc-ui/coverage/private.rs | 21 --- src/test/rustdoc-ui/coverage/private.stdout | 7 - src/test/rustdoc-ui/coverage/statics-consts.rs | 23 --- src/test/rustdoc-ui/coverage/statics-consts.stdout | 7 - src/test/rustdoc-ui/coverage/traits.rs | 38 ---- src/test/rustdoc-ui/coverage/traits.stdout | 7 - .../deny-intra-link-resolution-failure.rs | 4 - .../deny-intra-link-resolution-failure.stderr | 15 -- src/test/rustdoc-ui/deny-missing-docs-crate.rs | 3 - src/test/rustdoc-ui/deny-missing-docs-crate.stderr | 22 --- src/test/rustdoc-ui/deny-missing-docs-macro.rs | 8 - src/test/rustdoc-ui/deny-missing-docs-macro.stderr | 14 -- src/test/rustdoc-ui/deprecated-attrs.rs | 16 -- src/test/rustdoc-ui/deprecated-attrs.stderr | 34 ---- src/test/rustdoc-ui/deref-generic.rs | 15 -- src/test/rustdoc-ui/diagnostic-width.rs | 5 - src/test/rustdoc-ui/diagnostic-width.stderr | 15 -- src/test/rustdoc-ui/display-output.rs | 15 -- src/test/rustdoc-ui/display-output.stdout | 43 ----- src/test/rustdoc-ui/doc-alias-assoc-const.rs | 21 --- src/test/rustdoc-ui/doc-alias-assoc-const.stderr | 8 - src/test/rustdoc-ui/doc-alias-crate-level.rs | 4 - src/test/rustdoc-ui/doc-alias-crate-level.stderr | 14 -- src/test/rustdoc-ui/doc-alias-same-name.rs | 4 - src/test/rustdoc-ui/doc-alias-same-name.stderr | 8 - src/test/rustdoc-ui/doc-attr.rs | 25 --- src/test/rustdoc-ui/doc-attr.stderr | 71 ------- src/test/rustdoc-ui/doc-cfg.rs | 9 - src/test/rustdoc-ui/doc-cfg.stderr | 26 --- src/test/rustdoc-ui/doc-comment-multi-line-attr.rs | 11 -- .../rustdoc-ui/doc-comment-multi-line-attr.stdout | 6 - .../rustdoc-ui/doc-comment-multi-line-cfg-attr.rs | 12 -- .../doc-comment-multi-line-cfg-attr.stdout | 6 - src/test/rustdoc-ui/doc-include-suggestion.rs | 10 - src/test/rustdoc-ui/doc-include-suggestion.stderr | 12 -- src/test/rustdoc-ui/doc-spotlight.fixed | 8 - src/test/rustdoc-ui/doc-spotlight.rs | 8 - src/test/rustdoc-ui/doc-spotlight.stderr | 19 -- src/test/rustdoc-ui/doc-test-attr-pass.rs | 8 - src/test/rustdoc-ui/doc-test-attr.rs | 14 -- src/test/rustdoc-ui/doc-test-attr.stderr | 34 ---- src/test/rustdoc-ui/doc-test-doctest-feature.rs | 13 -- .../rustdoc-ui/doc-test-doctest-feature.stdout | 6 - src/test/rustdoc-ui/doc-test-rustdoc-feature.rs | 15 -- .../rustdoc-ui/doc-test-rustdoc-feature.stdout | 6 - src/test/rustdoc-ui/doc-without-codeblock.rs | 23 --- src/test/rustdoc-ui/doc-without-codeblock.stderr | 38 ---- src/test/rustdoc-ui/doc_cfg_hide.rs | 11 -- src/test/rustdoc-ui/doc_cfg_hide.stderr | 40 ---- src/test/rustdoc-ui/doctest-edition.rs | 16 -- src/test/rustdoc-ui/doctest-edition.stderr | 22 --- .../doctest-multiline-crate-attribute.rs | 10 - .../doctest-multiline-crate-attribute.stdout | 6 - src/test/rustdoc-ui/doctest-output.rs | 28 --- src/test/rustdoc-ui/doctest-output.stdout | 8 - src/test/rustdoc-ui/error-in-impl-trait/README.md | 7 - src/test/rustdoc-ui/error-in-impl-trait/async.rs | 7 - src/test/rustdoc-ui/error-in-impl-trait/closure.rs | 5 - .../error-in-impl-trait/const-generics.rs | 23 --- .../error-in-impl-trait/generic-argument.rs | 7 - .../error-in-impl-trait/impl-keyword-closure.rs | 6 - .../rustdoc-ui/error-in-impl-trait/impl-keyword.rs | 6 - .../error-in-impl-trait/realistic-async.rs | 28 --- .../error-in-impl-trait/trait-alias-closure.rs | 10 - .../rustdoc-ui/error-in-impl-trait/trait-alias.rs | 10 - src/test/rustdoc-ui/expect-tool-lint-rfc-2383.rs | 157 ---------------- .../rustdoc-ui/expect-tool-lint-rfc-2383.stderr | 28 --- src/test/rustdoc-ui/failed-doctest-compile-fail.rs | 12 -- .../rustdoc-ui/failed-doctest-compile-fail.stdout | 14 -- .../failed-doctest-extra-semicolon-on-item.rs | 18 -- .../failed-doctest-extra-semicolon-on-item.stdout | 24 --- .../rustdoc-ui/failed-doctest-missing-codes.rs | 12 -- .../rustdoc-ui/failed-doctest-missing-codes.stdout | 25 --- .../rustdoc-ui/failed-doctest-output-windows.rs | 28 --- .../failed-doctest-output-windows.stdout | 39 ---- src/test/rustdoc-ui/failed-doctest-output.rs | 28 --- src/test/rustdoc-ui/failed-doctest-output.stdout | 39 ---- src/test/rustdoc-ui/failed-doctest-should-panic.rs | 12 -- .../rustdoc-ui/failed-doctest-should-panic.stdout | 14 -- src/test/rustdoc-ui/feature-gate-doc_cfg_hide.rs | 7 - .../rustdoc-ui/feature-gate-doc_cfg_hide.stderr | 14 -- ...ature-gate-rustdoc_missing_doc_code_examples.rs | 10 - ...e-gate-rustdoc_missing_doc_code_examples.stderr | 29 --- .../generate-link-to-definition-opt-unstable.rs | 6 - ...generate-link-to-definition-opt-unstable.stderr | 2 - .../rustdoc-ui/generate-link-to-definition-opt.rs | 6 - .../generate-link-to-definition-opt.stderr | 2 - .../rustdoc-ui/generate-link-to-definition-opt2.rs | 6 - .../generate-link-to-definition-opt2.stderr | 2 - src/test/rustdoc-ui/ignore-block-help.rs | 10 - src/test/rustdoc-ui/ignore-block-help.stderr | 19 -- src/test/rustdoc-ui/impl-fn-nesting.rs | 49 ----- src/test/rustdoc-ui/impl-fn-nesting.stderr | 66 ------- .../infinite-recursive-type-impl-trait-return.rs | 16 -- .../infinite-recursive-type-impl-trait.rs | 9 - src/test/rustdoc-ui/infinite-recursive-type.rs | 4 - src/test/rustdoc-ui/infinite-recursive-type.stderr | 17 -- src/test/rustdoc-ui/intra-doc/alias-ice.rs | 6 - src/test/rustdoc-ui/intra-doc/alias-ice.stderr | 14 -- src/test/rustdoc-ui/intra-doc/ambiguity.rs | 40 ---- src/test/rustdoc-ui/intra-doc/ambiguity.stderr | 101 ---------- src/test/rustdoc-ui/intra-doc/anchors.rs | 39 ---- src/test/rustdoc-ui/intra-doc/anchors.stderr | 32 ---- src/test/rustdoc-ui/intra-doc/assoc-field.rs | 26 --- .../rustdoc-ui/intra-doc/assoc-mod-inner-outer.rs | 19 -- .../intra-doc/auxiliary/assoc-field-dep.rs | 18 -- .../auxiliary/assoc-mod-inner-outer-dep.rs | 11 -- src/test/rustdoc-ui/intra-doc/auxiliary/dep1.rs | 1 - src/test/rustdoc-ui/intra-doc/auxiliary/dep2.rs | 1 - src/test/rustdoc-ui/intra-doc/auxiliary/dep3.rs | 1 - src/test/rustdoc-ui/intra-doc/auxiliary/dep4.rs | 1 - .../intra-doc/auxiliary/intra-doc-broken.rs | 4 - .../auxiliary/pointer-reexports-allowed.rs | 4 - .../intra-doc/auxiliary/through-proc-macro-aux.rs | 20 -- src/test/rustdoc-ui/intra-doc/broken-reexport.rs | 8 - src/test/rustdoc-ui/intra-doc/crate-nonexistent.rs | 5 - .../rustdoc-ui/intra-doc/crate-nonexistent.stderr | 14 -- .../rustdoc-ui/intra-doc/disambiguator-mismatch.rs | 81 -------- .../intra-doc/disambiguator-mismatch.stderr | 153 ---------------- src/test/rustdoc-ui/intra-doc/double-anchor.rs | 7 - src/test/rustdoc-ui/intra-doc/double-anchor.stderr | 12 -- .../intra-doc/email-address-localhost.rs | 7 - src/test/rustdoc-ui/intra-doc/errors.rs | 105 ----------- src/test/rustdoc-ui/intra-doc/errors.stderr | 157 ---------------- src/test/rustdoc-ui/intra-doc/extern-crate-load.rs | 26 --- .../intra-doc/feature-gate-intra-doc-pointers.rs | 6 - .../feature-gate-intra-doc-pointers.stderr | 23 --- src/test/rustdoc-ui/intra-doc/field-ice.rs | 11 -- src/test/rustdoc-ui/intra-doc/field-ice.stderr | 18 -- src/test/rustdoc-ui/intra-doc/global-path.rs | 8 - src/test/rustdoc-ui/intra-doc/global-path.stderr | 10 - .../intra-doc/html-as-generics-intra-doc.rs | 25 --- .../intra-doc/html-as-generics-intra-doc.stderr | 69 ------- .../incompatible-primitive-disambiguator.rs | 3 - .../incompatible-primitive-disambiguator.stderr | 18 -- src/test/rustdoc-ui/intra-doc/macro-rules-error.rs | 26 --- .../rustdoc-ui/intra-doc/macro-rules-error.stderr | 23 --- src/test/rustdoc-ui/intra-doc/macro-rules.rs | 24 --- .../rustdoc-ui/intra-doc/malformed-generics.rs | 28 --- .../rustdoc-ui/intra-doc/malformed-generics.stderr | 158 ---------------- .../rustdoc-ui/intra-doc/non-path-primitives.rs | 34 ---- .../intra-doc/non-path-primitives.stderr | 63 ------- .../intra-doc/pointer-reexports-allowed.rs | 4 - src/test/rustdoc-ui/intra-doc/prim-conflict.rs | 30 --- src/test/rustdoc-ui/intra-doc/prim-conflict.stderr | 59 ------ .../intra-doc/private-from-crate-level.rs | 6 - .../intra-doc/private-from-crate-level.stderr | 11 -- .../rustdoc-ui/intra-doc/private.private.stderr | 27 --- .../rustdoc-ui/intra-doc/private.public.stderr | 27 --- src/test/rustdoc-ui/intra-doc/private.rs | 18 -- src/test/rustdoc-ui/intra-doc/span-ice-55723.rs | 13 -- .../rustdoc-ui/intra-doc/span-ice-55723.stderr | 15 -- .../rustdoc-ui/intra-doc/through-proc-macro.rs | 18 -- .../rustdoc-ui/intra-doc/through-proc-macro.stderr | 15 -- .../rustdoc-ui/intra-doc/unknown-disambiguator.rs | 14 -- .../intra-doc/unknown-disambiguator.stderr | 56 ------ .../intra-doc/unresolved-import-recovery.rs | 6 - .../intra-doc/unresolved-import-recovery.stderr | 13 -- .../rustdoc-ui/intra-doc/unused-extern-crate.rs | 5 - .../intra-doc/unused-extern-crate.stderr | 15 -- src/test/rustdoc-ui/intra-doc/warning-crlf.rs | 26 --- src/test/rustdoc-ui/intra-doc/warning-crlf.stderr | 35 ---- src/test/rustdoc-ui/intra-doc/warning.rs | 84 --------- src/test/rustdoc-ui/intra-doc/warning.stderr | 175 ------------------ src/test/rustdoc-ui/invalid-cfg.rs | 4 - src/test/rustdoc-ui/invalid-cfg.stderr | 14 -- src/test/rustdoc-ui/invalid-doc-attr.rs | 32 ---- src/test/rustdoc-ui/invalid-doc-attr.stderr | 78 -------- .../rustdoc-ui/invalid-html-self-closing-tag.rs | 70 ------- .../invalid-html-self-closing-tag.stderr | 80 -------- src/test/rustdoc-ui/invalid-html-tags.rs | 123 ------------- src/test/rustdoc-ui/invalid-html-tags.stderr | 104 ----------- src/test/rustdoc-ui/invalid-keyword.rs | 4 - src/test/rustdoc-ui/invalid-keyword.stderr | 8 - src/test/rustdoc-ui/invalid-syntax.rs | 107 ----------- src/test/rustdoc-ui/invalid-syntax.stderr | 169 ----------------- src/test/rustdoc-ui/invalid-theme-name.rs | 3 - src/test/rustdoc-ui/invalid-theme-name.stderr | 4 - src/test/rustdoc-ui/issue-101076.rs | 14 -- src/test/rustdoc-ui/issue-102986.rs | 4 - src/test/rustdoc-ui/issue-102986.stderr | 14 -- src/test/rustdoc-ui/issue-103997.rs | 6 - src/test/rustdoc-ui/issue-103997.stderr | 10 - src/test/rustdoc-ui/issue-58473-2.rs | 12 -- src/test/rustdoc-ui/issue-58473.rs | 10 - src/test/rustdoc-ui/issue-61592-2.rs | 10 - src/test/rustdoc-ui/issue-61592-2.stderr | 12 -- src/test/rustdoc-ui/issue-61592.rs | 8 - src/test/rustdoc-ui/issue-61592.stderr | 11 -- src/test/rustdoc-ui/issue-61732.rs | 4 - src/test/rustdoc-ui/issue-61732.stderr | 13 -- src/test/rustdoc-ui/issue-74134.private.stderr | 11 -- src/test/rustdoc-ui/issue-74134.public.stderr | 11 -- src/test/rustdoc-ui/issue-74134.rs | 41 ----- src/test/rustdoc-ui/issue-79465.rs | 3 - src/test/rustdoc-ui/issue-79465.stderr | 15 -- src/test/rustdoc-ui/issue-79467.rs | 8 - src/test/rustdoc-ui/issue-79467.stderr | 9 - src/test/rustdoc-ui/issue-79494.rs | 5 - src/test/rustdoc-ui/issue-79494.stderr | 12 -- src/test/rustdoc-ui/issue-80992.rs | 11 -- src/test/rustdoc-ui/issue-80992.stdout | 6 - src/test/rustdoc-ui/issue-81662-shortness.rs | 12 -- src/test/rustdoc-ui/issue-81662-shortness.stdout | 16 -- src/test/rustdoc-ui/issue-83883-describe-lints.rs | 10 - .../rustdoc-ui/issue-83883-describe-lints.stdout | 24 --- src/test/rustdoc-ui/issue-91134.rs | 14 -- src/test/rustdoc-ui/issue-91134.stdout | 6 - src/test/rustdoc-ui/issue-91713.rs | 3 - src/test/rustdoc-ui/issue-91713.stderr | 5 - src/test/rustdoc-ui/issue-91713.stdout | 25 --- src/test/rustdoc-ui/issue-98690.rs | 10 - src/test/rustdoc-ui/issue-98690.stderr | 1 - src/test/rustdoc-ui/lint-group.rs | 31 ---- src/test/rustdoc-ui/lint-group.stderr | 50 ----- .../rustdoc-ui/lint-missing-doc-code-example.rs | 101 ---------- .../lint-missing-doc-code-example.stderr | 38 ---- src/test/rustdoc-ui/macro-docs.rs | 12 -- src/test/rustdoc-ui/macro-docs.stderr | 20 -- src/test/rustdoc-ui/macro-docs.stdout | 0 src/test/rustdoc-ui/no-crate-level-doc-lint.rs | 6 - src/test/rustdoc-ui/no-crate-level-doc-lint.stderr | 12 -- src/test/rustdoc-ui/no-run-flag-error.rs | 6 - src/test/rustdoc-ui/no-run-flag-error.stderr | 2 - src/test/rustdoc-ui/no-run-flag.rs | 38 ---- src/test/rustdoc-ui/no-run-flag.stdout | 12 -- src/test/rustdoc-ui/nocapture-fail.rs | 12 -- src/test/rustdoc-ui/nocapture-fail.stderr | 18 -- src/test/rustdoc-ui/nocapture-fail.stdout | 6 - src/test/rustdoc-ui/nocapture.rs | 10 - src/test/rustdoc-ui/nocapture.stderr | 1 - src/test/rustdoc-ui/nocapture.stdout | 7 - src/test/rustdoc-ui/normalize-cycle.rs | 26 --- src/test/rustdoc-ui/normalize-overflow.rs | 5 - src/test/rustdoc-ui/output-format-html-stable.rs | 4 - src/test/rustdoc-ui/private-doc-test.rs | 12 -- src/test/rustdoc-ui/private-item-doc-test.rs | 11 -- src/test/rustdoc-ui/private-item-doc-test.stderr | 18 -- .../rustdoc-ui/private-public-item-doc-test.rs | 11 -- .../rustdoc-ui/private-public-item-doc-test.stderr | 18 -- src/test/rustdoc-ui/pub-export-lint.rs | 5 - src/test/rustdoc-ui/pub-export-lint.stderr | 15 -- .../rustdoc-ui/public-reexported-item-doc-test.rs | 16 -- src/test/rustdoc-ui/range-pattern.rs | 3 - src/test/rustdoc-ui/recursive-deref-ice.rs | 19 -- .../reference-link-reports-error-once.rs | 20 -- .../reference-link-reports-error-once.stderr | 63 ------- src/test/rustdoc-ui/reference-links.rs | 6 - src/test/rustdoc-ui/reference-links.stderr | 14 -- src/test/rustdoc-ui/renamed-lint-still-applies.rs | 10 - .../rustdoc-ui/renamed-lint-still-applies.stderr | 42 ----- src/test/rustdoc-ui/run-directory.correct.stdout | 6 - src/test/rustdoc-ui/run-directory.incorrect.stdout | 6 - src/test/rustdoc-ui/run-directory.rs | 23 --- src/test/rustdoc-ui/rustc-check-passes.rs | 4 - src/test/rustdoc-ui/rustc-check-passes.stderr | 9 - .../scrape-examples-fail-if-type-error.rs | 7 - .../scrape-examples-fail-if-type-error.stderr | 14 -- src/test/rustdoc-ui/scrape-examples-ice.rs | 4 - .../rustdoc-ui/scrape-examples-wrong-options-1.rs | 1 - .../scrape-examples-wrong-options-1.stderr | 2 - .../rustdoc-ui/scrape-examples-wrong-options-2.rs | 1 - .../scrape-examples-wrong-options-2.stderr | 2 - ...rch-index-generics-recursion-bug-issue-59502.rs | 11 -- .../suggestions/html-as-generics-no-suggestions.rs | 80 -------- .../html-as-generics-no-suggestions.stderr | 68 ------- .../rustdoc-ui/suggestions/html-as-generics.fixed | 82 --------- .../rustdoc-ui/suggestions/html-as-generics.rs | 82 --------- .../rustdoc-ui/suggestions/html-as-generics.stderr | 183 ------------------- src/test/rustdoc-ui/test-compile-fail1.rs | 8 - src/test/rustdoc-ui/test-compile-fail1.stderr | 14 -- src/test/rustdoc-ui/test-compile-fail2.rs | 3 - src/test/rustdoc-ui/test-compile-fail2.stderr | 8 - src/test/rustdoc-ui/test-compile-fail3.rs | 3 - src/test/rustdoc-ui/test-compile-fail3.stderr | 9 - src/test/rustdoc-ui/test-no_std.rs | 13 -- src/test/rustdoc-ui/test-no_std.stdout | 6 - src/test/rustdoc-ui/test-type.rs | 26 --- src/test/rustdoc-ui/test-type.stdout | 10 - src/test/rustdoc-ui/track-diagnostics.rs | 10 - src/test/rustdoc-ui/track-diagnostics.stderr | 10 - src/test/rustdoc-ui/tuple-variadic-check.rs | 15 -- src/test/rustdoc-ui/tuple-variadic-check.stderr | 8 - src/test/rustdoc-ui/unknown-renamed-lints.rs | 24 --- src/test/rustdoc-ui/unknown-renamed-lints.stderr | 64 ------- src/test/rustdoc-ui/unparseable-doc-test.rs | 11 -- src/test/rustdoc-ui/unparseable-doc-test.stdout | 23 --- src/test/rustdoc-ui/unused-braces-lint.rs | 14 -- src/test/rustdoc-ui/unused-extern-crate.rs | 3 - src/test/rustdoc-ui/unused.rs | 14 -- .../use_both_out_dir_and_output_options.rs | 1 - .../use_both_out_dir_and_output_options.stderr | 2 - src/test/rustdoc-ui/wasm-safe.rs | 5 - src/test/rustdoc-ui/z-help.rs | 6 - src/test/rustdoc-ui/z-help.stdout | 203 --------------------- 366 files changed, 8561 deletions(-) delete mode 100644 src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs delete mode 100644 src/test/rustdoc-ui/assoc-item-not-in-scope.rs delete mode 100644 src/test/rustdoc-ui/assoc-item-not-in-scope.stderr delete mode 100644 src/test/rustdoc-ui/auxiliary/empty-fn.rs delete mode 100644 src/test/rustdoc-ui/auxiliary/extern_macros.rs delete mode 100644 src/test/rustdoc-ui/auxiliary/issue-61592.rs delete mode 100644 src/test/rustdoc-ui/auxiliary/module_macro_doc.rs delete mode 100644 src/test/rustdoc-ui/auxiliary/overflow.rs delete mode 100644 src/test/rustdoc-ui/auxiliary/panic-item.rs delete mode 100644 src/test/rustdoc-ui/bare-urls.fixed delete mode 100644 src/test/rustdoc-ui/bare-urls.rs delete mode 100644 src/test/rustdoc-ui/bare-urls.stderr delete mode 100644 src/test/rustdoc-ui/block-doc-comment.rs delete mode 100644 src/test/rustdoc-ui/block-doc-comment.stdout delete mode 100644 src/test/rustdoc-ui/bounded-hr-lifetime.rs delete mode 100644 src/test/rustdoc-ui/bounded-hr-lifetime.stderr delete mode 100644 src/test/rustdoc-ui/c-help.rs delete mode 100644 src/test/rustdoc-ui/c-help.stdout delete mode 100644 src/test/rustdoc-ui/cfg-test.rs delete mode 100644 src/test/rustdoc-ui/cfg-test.stdout delete mode 100644 src/test/rustdoc-ui/check-attr-test.rs delete mode 100644 src/test/rustdoc-ui/check-attr-test.stderr delete mode 100644 src/test/rustdoc-ui/check-attr.rs delete mode 100644 src/test/rustdoc-ui/check-attr.stderr delete mode 100644 src/test/rustdoc-ui/check-cfg-test.rs delete mode 100644 src/test/rustdoc-ui/check-cfg-test.stderr delete mode 100644 src/test/rustdoc-ui/check-cfg-test.stdout delete mode 100644 src/test/rustdoc-ui/check-cfg-unstable.rs delete mode 100644 src/test/rustdoc-ui/check-cfg-unstable.stderr delete mode 100644 src/test/rustdoc-ui/check-cfg.rs delete mode 100644 src/test/rustdoc-ui/check-cfg.stderr delete mode 100644 src/test/rustdoc-ui/check-doc-alias-attr-location.rs delete mode 100644 src/test/rustdoc-ui/check-doc-alias-attr-location.stderr delete mode 100644 src/test/rustdoc-ui/check-doc-alias-attr.rs delete mode 100644 src/test/rustdoc-ui/check-doc-alias-attr.stderr delete mode 100644 src/test/rustdoc-ui/check-fail.rs delete mode 100644 src/test/rustdoc-ui/check-fail.stderr delete mode 100644 src/test/rustdoc-ui/check.rs delete mode 100644 src/test/rustdoc-ui/check.stderr delete mode 100644 src/test/rustdoc-ui/commandline-argfile-badutf8.args delete mode 100644 src/test/rustdoc-ui/commandline-argfile-badutf8.rs delete mode 100644 src/test/rustdoc-ui/commandline-argfile-badutf8.stderr delete mode 100644 src/test/rustdoc-ui/commandline-argfile-missing.rs delete mode 100644 src/test/rustdoc-ui/commandline-argfile-missing.stderr delete mode 100644 src/test/rustdoc-ui/commandline-argfile.args delete mode 100644 src/test/rustdoc-ui/commandline-argfile.rs delete mode 100644 src/test/rustdoc-ui/const-evalutation-ice.rs delete mode 100644 src/test/rustdoc-ui/const-evalutation-ice.stderr delete mode 100644 src/test/rustdoc-ui/coverage/allow_missing_docs.rs delete mode 100644 src/test/rustdoc-ui/coverage/allow_missing_docs.stderr delete mode 100644 src/test/rustdoc-ui/coverage/allow_missing_docs.stdout delete mode 100644 src/test/rustdoc-ui/coverage/basic.rs delete mode 100644 src/test/rustdoc-ui/coverage/basic.stdout delete mode 100644 src/test/rustdoc-ui/coverage/doc-examples-json.rs delete mode 100644 src/test/rustdoc-ui/coverage/doc-examples-json.stdout delete mode 100644 src/test/rustdoc-ui/coverage/doc-examples.rs delete mode 100644 src/test/rustdoc-ui/coverage/doc-examples.stdout delete mode 100644 src/test/rustdoc-ui/coverage/empty.rs delete mode 100644 src/test/rustdoc-ui/coverage/empty.stdout delete mode 100644 src/test/rustdoc-ui/coverage/enum-tuple-documented.rs delete mode 100644 src/test/rustdoc-ui/coverage/enum-tuple-documented.stdout delete mode 100644 src/test/rustdoc-ui/coverage/enum-tuple.rs delete mode 100644 src/test/rustdoc-ui/coverage/enum-tuple.stdout delete mode 100644 src/test/rustdoc-ui/coverage/enums.rs delete mode 100644 src/test/rustdoc-ui/coverage/enums.stdout delete mode 100644 src/test/rustdoc-ui/coverage/exotic.rs delete mode 100644 src/test/rustdoc-ui/coverage/exotic.stdout delete mode 100644 src/test/rustdoc-ui/coverage/html.rs delete mode 100644 src/test/rustdoc-ui/coverage/html.stderr delete mode 100644 src/test/rustdoc-ui/coverage/json.rs delete mode 100644 src/test/rustdoc-ui/coverage/json.stdout delete mode 100644 src/test/rustdoc-ui/coverage/private.rs delete mode 100644 src/test/rustdoc-ui/coverage/private.stdout delete mode 100644 src/test/rustdoc-ui/coverage/statics-consts.rs delete mode 100644 src/test/rustdoc-ui/coverage/statics-consts.stdout delete mode 100644 src/test/rustdoc-ui/coverage/traits.rs delete mode 100644 src/test/rustdoc-ui/coverage/traits.stdout delete mode 100644 src/test/rustdoc-ui/deny-intra-link-resolution-failure.rs delete mode 100644 src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr delete mode 100644 src/test/rustdoc-ui/deny-missing-docs-crate.rs delete mode 100644 src/test/rustdoc-ui/deny-missing-docs-crate.stderr delete mode 100644 src/test/rustdoc-ui/deny-missing-docs-macro.rs delete mode 100644 src/test/rustdoc-ui/deny-missing-docs-macro.stderr delete mode 100644 src/test/rustdoc-ui/deprecated-attrs.rs delete mode 100644 src/test/rustdoc-ui/deprecated-attrs.stderr delete mode 100644 src/test/rustdoc-ui/deref-generic.rs delete mode 100644 src/test/rustdoc-ui/diagnostic-width.rs delete mode 100644 src/test/rustdoc-ui/diagnostic-width.stderr delete mode 100644 src/test/rustdoc-ui/display-output.rs delete mode 100644 src/test/rustdoc-ui/display-output.stdout delete mode 100644 src/test/rustdoc-ui/doc-alias-assoc-const.rs delete mode 100644 src/test/rustdoc-ui/doc-alias-assoc-const.stderr delete mode 100644 src/test/rustdoc-ui/doc-alias-crate-level.rs delete mode 100644 src/test/rustdoc-ui/doc-alias-crate-level.stderr delete mode 100644 src/test/rustdoc-ui/doc-alias-same-name.rs delete mode 100644 src/test/rustdoc-ui/doc-alias-same-name.stderr delete mode 100644 src/test/rustdoc-ui/doc-attr.rs delete mode 100644 src/test/rustdoc-ui/doc-attr.stderr delete mode 100644 src/test/rustdoc-ui/doc-cfg.rs delete mode 100644 src/test/rustdoc-ui/doc-cfg.stderr delete mode 100644 src/test/rustdoc-ui/doc-comment-multi-line-attr.rs delete mode 100644 src/test/rustdoc-ui/doc-comment-multi-line-attr.stdout delete mode 100644 src/test/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs delete mode 100644 src/test/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout delete mode 100644 src/test/rustdoc-ui/doc-include-suggestion.rs delete mode 100644 src/test/rustdoc-ui/doc-include-suggestion.stderr delete mode 100644 src/test/rustdoc-ui/doc-spotlight.fixed delete mode 100644 src/test/rustdoc-ui/doc-spotlight.rs delete mode 100644 src/test/rustdoc-ui/doc-spotlight.stderr delete mode 100644 src/test/rustdoc-ui/doc-test-attr-pass.rs delete mode 100644 src/test/rustdoc-ui/doc-test-attr.rs delete mode 100644 src/test/rustdoc-ui/doc-test-attr.stderr delete mode 100644 src/test/rustdoc-ui/doc-test-doctest-feature.rs delete mode 100644 src/test/rustdoc-ui/doc-test-doctest-feature.stdout delete mode 100644 src/test/rustdoc-ui/doc-test-rustdoc-feature.rs delete mode 100644 src/test/rustdoc-ui/doc-test-rustdoc-feature.stdout delete mode 100644 src/test/rustdoc-ui/doc-without-codeblock.rs delete mode 100644 src/test/rustdoc-ui/doc-without-codeblock.stderr delete mode 100644 src/test/rustdoc-ui/doc_cfg_hide.rs delete mode 100644 src/test/rustdoc-ui/doc_cfg_hide.stderr delete mode 100644 src/test/rustdoc-ui/doctest-edition.rs delete mode 100644 src/test/rustdoc-ui/doctest-edition.stderr delete mode 100644 src/test/rustdoc-ui/doctest-multiline-crate-attribute.rs delete mode 100644 src/test/rustdoc-ui/doctest-multiline-crate-attribute.stdout delete mode 100644 src/test/rustdoc-ui/doctest-output.rs delete mode 100644 src/test/rustdoc-ui/doctest-output.stdout delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/README.md delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/async.rs delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/closure.rs delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/generic-argument.rs delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/impl-keyword.rs delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs delete mode 100644 src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs delete mode 100644 src/test/rustdoc-ui/expect-tool-lint-rfc-2383.rs delete mode 100644 src/test/rustdoc-ui/expect-tool-lint-rfc-2383.stderr delete mode 100644 src/test/rustdoc-ui/failed-doctest-compile-fail.rs delete mode 100644 src/test/rustdoc-ui/failed-doctest-compile-fail.stdout delete mode 100644 src/test/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs delete mode 100644 src/test/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout delete mode 100644 src/test/rustdoc-ui/failed-doctest-missing-codes.rs delete mode 100644 src/test/rustdoc-ui/failed-doctest-missing-codes.stdout delete mode 100644 src/test/rustdoc-ui/failed-doctest-output-windows.rs delete mode 100644 src/test/rustdoc-ui/failed-doctest-output-windows.stdout delete mode 100644 src/test/rustdoc-ui/failed-doctest-output.rs delete mode 100644 src/test/rustdoc-ui/failed-doctest-output.stdout delete mode 100644 src/test/rustdoc-ui/failed-doctest-should-panic.rs delete mode 100644 src/test/rustdoc-ui/failed-doctest-should-panic.stdout delete mode 100644 src/test/rustdoc-ui/feature-gate-doc_cfg_hide.rs delete mode 100644 src/test/rustdoc-ui/feature-gate-doc_cfg_hide.stderr delete mode 100644 src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs delete mode 100644 src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr delete mode 100644 src/test/rustdoc-ui/generate-link-to-definition-opt-unstable.rs delete mode 100644 src/test/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr delete mode 100644 src/test/rustdoc-ui/generate-link-to-definition-opt.rs delete mode 100644 src/test/rustdoc-ui/generate-link-to-definition-opt.stderr delete mode 100644 src/test/rustdoc-ui/generate-link-to-definition-opt2.rs delete mode 100644 src/test/rustdoc-ui/generate-link-to-definition-opt2.stderr delete mode 100644 src/test/rustdoc-ui/ignore-block-help.rs delete mode 100644 src/test/rustdoc-ui/ignore-block-help.stderr delete mode 100644 src/test/rustdoc-ui/impl-fn-nesting.rs delete mode 100644 src/test/rustdoc-ui/impl-fn-nesting.stderr delete mode 100644 src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs delete mode 100644 src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs delete mode 100644 src/test/rustdoc-ui/infinite-recursive-type.rs delete mode 100644 src/test/rustdoc-ui/infinite-recursive-type.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/alias-ice.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/alias-ice.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/ambiguity.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/ambiguity.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/anchors.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/anchors.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/assoc-field.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/assoc-mod-inner-outer.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/auxiliary/assoc-field-dep.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/auxiliary/assoc-mod-inner-outer-dep.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/auxiliary/dep1.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/auxiliary/dep2.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/auxiliary/dep3.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/auxiliary/dep4.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/auxiliary/intra-doc-broken.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/auxiliary/pointer-reexports-allowed.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/broken-reexport.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/crate-nonexistent.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/crate-nonexistent.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/double-anchor.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/double-anchor.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/email-address-localhost.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/errors.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/errors.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/extern-crate-load.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/field-ice.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/field-ice.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/global-path.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/global-path.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/macro-rules-error.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/macro-rules-error.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/macro-rules.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/malformed-generics.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/malformed-generics.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/non-path-primitives.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/non-path-primitives.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/pointer-reexports-allowed.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/prim-conflict.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/prim-conflict.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/private-from-crate-level.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/private-from-crate-level.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/private.private.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/private.public.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/private.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/span-ice-55723.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/through-proc-macro.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/through-proc-macro.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/unknown-disambiguator.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/unresolved-import-recovery.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/unused-extern-crate.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/unused-extern-crate.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/warning-crlf.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/warning-crlf.stderr delete mode 100644 src/test/rustdoc-ui/intra-doc/warning.rs delete mode 100644 src/test/rustdoc-ui/intra-doc/warning.stderr delete mode 100644 src/test/rustdoc-ui/invalid-cfg.rs delete mode 100644 src/test/rustdoc-ui/invalid-cfg.stderr delete mode 100644 src/test/rustdoc-ui/invalid-doc-attr.rs delete mode 100644 src/test/rustdoc-ui/invalid-doc-attr.stderr delete mode 100644 src/test/rustdoc-ui/invalid-html-self-closing-tag.rs delete mode 100644 src/test/rustdoc-ui/invalid-html-self-closing-tag.stderr delete mode 100644 src/test/rustdoc-ui/invalid-html-tags.rs delete mode 100644 src/test/rustdoc-ui/invalid-html-tags.stderr delete mode 100644 src/test/rustdoc-ui/invalid-keyword.rs delete mode 100644 src/test/rustdoc-ui/invalid-keyword.stderr delete mode 100644 src/test/rustdoc-ui/invalid-syntax.rs delete mode 100644 src/test/rustdoc-ui/invalid-syntax.stderr delete mode 100644 src/test/rustdoc-ui/invalid-theme-name.rs delete mode 100644 src/test/rustdoc-ui/invalid-theme-name.stderr delete mode 100644 src/test/rustdoc-ui/issue-101076.rs delete mode 100644 src/test/rustdoc-ui/issue-102986.rs delete mode 100644 src/test/rustdoc-ui/issue-102986.stderr delete mode 100644 src/test/rustdoc-ui/issue-103997.rs delete mode 100644 src/test/rustdoc-ui/issue-103997.stderr delete mode 100644 src/test/rustdoc-ui/issue-58473-2.rs delete mode 100644 src/test/rustdoc-ui/issue-58473.rs delete mode 100644 src/test/rustdoc-ui/issue-61592-2.rs delete mode 100644 src/test/rustdoc-ui/issue-61592-2.stderr delete mode 100644 src/test/rustdoc-ui/issue-61592.rs delete mode 100644 src/test/rustdoc-ui/issue-61592.stderr delete mode 100644 src/test/rustdoc-ui/issue-61732.rs delete mode 100644 src/test/rustdoc-ui/issue-61732.stderr delete mode 100644 src/test/rustdoc-ui/issue-74134.private.stderr delete mode 100644 src/test/rustdoc-ui/issue-74134.public.stderr delete mode 100644 src/test/rustdoc-ui/issue-74134.rs delete mode 100644 src/test/rustdoc-ui/issue-79465.rs delete mode 100644 src/test/rustdoc-ui/issue-79465.stderr delete mode 100644 src/test/rustdoc-ui/issue-79467.rs delete mode 100644 src/test/rustdoc-ui/issue-79467.stderr delete mode 100644 src/test/rustdoc-ui/issue-79494.rs delete mode 100644 src/test/rustdoc-ui/issue-79494.stderr delete mode 100644 src/test/rustdoc-ui/issue-80992.rs delete mode 100644 src/test/rustdoc-ui/issue-80992.stdout delete mode 100644 src/test/rustdoc-ui/issue-81662-shortness.rs delete mode 100644 src/test/rustdoc-ui/issue-81662-shortness.stdout delete mode 100644 src/test/rustdoc-ui/issue-83883-describe-lints.rs delete mode 100644 src/test/rustdoc-ui/issue-83883-describe-lints.stdout delete mode 100644 src/test/rustdoc-ui/issue-91134.rs delete mode 100644 src/test/rustdoc-ui/issue-91134.stdout delete mode 100644 src/test/rustdoc-ui/issue-91713.rs delete mode 100644 src/test/rustdoc-ui/issue-91713.stderr delete mode 100644 src/test/rustdoc-ui/issue-91713.stdout delete mode 100644 src/test/rustdoc-ui/issue-98690.rs delete mode 100644 src/test/rustdoc-ui/issue-98690.stderr delete mode 100644 src/test/rustdoc-ui/lint-group.rs delete mode 100644 src/test/rustdoc-ui/lint-group.stderr delete mode 100644 src/test/rustdoc-ui/lint-missing-doc-code-example.rs delete mode 100644 src/test/rustdoc-ui/lint-missing-doc-code-example.stderr delete mode 100644 src/test/rustdoc-ui/macro-docs.rs delete mode 100644 src/test/rustdoc-ui/macro-docs.stderr delete mode 100644 src/test/rustdoc-ui/macro-docs.stdout delete mode 100644 src/test/rustdoc-ui/no-crate-level-doc-lint.rs delete mode 100644 src/test/rustdoc-ui/no-crate-level-doc-lint.stderr delete mode 100644 src/test/rustdoc-ui/no-run-flag-error.rs delete mode 100644 src/test/rustdoc-ui/no-run-flag-error.stderr delete mode 100644 src/test/rustdoc-ui/no-run-flag.rs delete mode 100644 src/test/rustdoc-ui/no-run-flag.stdout delete mode 100644 src/test/rustdoc-ui/nocapture-fail.rs delete mode 100644 src/test/rustdoc-ui/nocapture-fail.stderr delete mode 100644 src/test/rustdoc-ui/nocapture-fail.stdout delete mode 100644 src/test/rustdoc-ui/nocapture.rs delete mode 100644 src/test/rustdoc-ui/nocapture.stderr delete mode 100644 src/test/rustdoc-ui/nocapture.stdout delete mode 100644 src/test/rustdoc-ui/normalize-cycle.rs delete mode 100644 src/test/rustdoc-ui/normalize-overflow.rs delete mode 100644 src/test/rustdoc-ui/output-format-html-stable.rs delete mode 100644 src/test/rustdoc-ui/private-doc-test.rs delete mode 100644 src/test/rustdoc-ui/private-item-doc-test.rs delete mode 100644 src/test/rustdoc-ui/private-item-doc-test.stderr delete mode 100644 src/test/rustdoc-ui/private-public-item-doc-test.rs delete mode 100644 src/test/rustdoc-ui/private-public-item-doc-test.stderr delete mode 100644 src/test/rustdoc-ui/pub-export-lint.rs delete mode 100644 src/test/rustdoc-ui/pub-export-lint.stderr delete mode 100644 src/test/rustdoc-ui/public-reexported-item-doc-test.rs delete mode 100644 src/test/rustdoc-ui/range-pattern.rs delete mode 100644 src/test/rustdoc-ui/recursive-deref-ice.rs delete mode 100644 src/test/rustdoc-ui/reference-link-reports-error-once.rs delete mode 100644 src/test/rustdoc-ui/reference-link-reports-error-once.stderr delete mode 100644 src/test/rustdoc-ui/reference-links.rs delete mode 100644 src/test/rustdoc-ui/reference-links.stderr delete mode 100644 src/test/rustdoc-ui/renamed-lint-still-applies.rs delete mode 100644 src/test/rustdoc-ui/renamed-lint-still-applies.stderr delete mode 100644 src/test/rustdoc-ui/run-directory.correct.stdout delete mode 100644 src/test/rustdoc-ui/run-directory.incorrect.stdout delete mode 100644 src/test/rustdoc-ui/run-directory.rs delete mode 100644 src/test/rustdoc-ui/rustc-check-passes.rs delete mode 100644 src/test/rustdoc-ui/rustc-check-passes.stderr delete mode 100644 src/test/rustdoc-ui/scrape-examples-fail-if-type-error.rs delete mode 100644 src/test/rustdoc-ui/scrape-examples-fail-if-type-error.stderr delete mode 100644 src/test/rustdoc-ui/scrape-examples-ice.rs delete mode 100644 src/test/rustdoc-ui/scrape-examples-wrong-options-1.rs delete mode 100644 src/test/rustdoc-ui/scrape-examples-wrong-options-1.stderr delete mode 100644 src/test/rustdoc-ui/scrape-examples-wrong-options-2.rs delete mode 100644 src/test/rustdoc-ui/scrape-examples-wrong-options-2.stderr delete mode 100644 src/test/rustdoc-ui/search-index-generics-recursion-bug-issue-59502.rs delete mode 100644 src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.rs delete mode 100644 src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.stderr delete mode 100644 src/test/rustdoc-ui/suggestions/html-as-generics.fixed delete mode 100644 src/test/rustdoc-ui/suggestions/html-as-generics.rs delete mode 100644 src/test/rustdoc-ui/suggestions/html-as-generics.stderr delete mode 100644 src/test/rustdoc-ui/test-compile-fail1.rs delete mode 100644 src/test/rustdoc-ui/test-compile-fail1.stderr delete mode 100644 src/test/rustdoc-ui/test-compile-fail2.rs delete mode 100644 src/test/rustdoc-ui/test-compile-fail2.stderr delete mode 100644 src/test/rustdoc-ui/test-compile-fail3.rs delete mode 100644 src/test/rustdoc-ui/test-compile-fail3.stderr delete mode 100644 src/test/rustdoc-ui/test-no_std.rs delete mode 100644 src/test/rustdoc-ui/test-no_std.stdout delete mode 100644 src/test/rustdoc-ui/test-type.rs delete mode 100644 src/test/rustdoc-ui/test-type.stdout delete mode 100644 src/test/rustdoc-ui/track-diagnostics.rs delete mode 100644 src/test/rustdoc-ui/track-diagnostics.stderr delete mode 100644 src/test/rustdoc-ui/tuple-variadic-check.rs delete mode 100644 src/test/rustdoc-ui/tuple-variadic-check.stderr delete mode 100644 src/test/rustdoc-ui/unknown-renamed-lints.rs delete mode 100644 src/test/rustdoc-ui/unknown-renamed-lints.stderr delete mode 100644 src/test/rustdoc-ui/unparseable-doc-test.rs delete mode 100644 src/test/rustdoc-ui/unparseable-doc-test.stdout delete mode 100644 src/test/rustdoc-ui/unused-braces-lint.rs delete mode 100644 src/test/rustdoc-ui/unused-extern-crate.rs delete mode 100644 src/test/rustdoc-ui/unused.rs delete mode 100644 src/test/rustdoc-ui/use_both_out_dir_and_output_options.rs delete mode 100644 src/test/rustdoc-ui/use_both_out_dir_and_output_options.stderr delete mode 100644 src/test/rustdoc-ui/wasm-safe.rs delete mode 100644 src/test/rustdoc-ui/z-help.rs delete mode 100644 src/test/rustdoc-ui/z-help.stdout (limited to 'src/test/rustdoc-ui') diff --git a/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs b/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs deleted file mode 100644 index 94ea0e93b..000000000 --- a/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs +++ /dev/null @@ -1,13 +0,0 @@ -// check-pass -// This test ensures that rustdoc does not panic on inherented associated types -// that are referred to without fully-qualified syntax. - -#![feature(inherent_associated_types)] -#![allow(incomplete_features)] - -pub struct Struct; - -impl Struct { - pub type AssocTy = usize; - pub const AssocConst: Self::AssocTy = 42; -} diff --git a/src/test/rustdoc-ui/assoc-item-not-in-scope.rs b/src/test/rustdoc-ui/assoc-item-not-in-scope.rs deleted file mode 100644 index 0976515f4..000000000 --- a/src/test/rustdoc-ui/assoc-item-not-in-scope.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] - -#[derive(Debug)] -/// Link to [`S::fmt`] -//~^ ERROR unresolved link -pub struct S; - -pub mod inner { - use std::fmt::Debug; - use super::S; - - /// Link to [`S::fmt`] - pub fn f() {} -} - -pub mod ambiguous { - use std::fmt::{Display, Debug}; - use super::S; - - /// Link to [`S::fmt`] - pub fn f() {} -} diff --git a/src/test/rustdoc-ui/assoc-item-not-in-scope.stderr b/src/test/rustdoc-ui/assoc-item-not-in-scope.stderr deleted file mode 100644 index 04594ad41..000000000 --- a/src/test/rustdoc-ui/assoc-item-not-in-scope.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: unresolved link to `S::fmt` - --> $DIR/assoc-item-not-in-scope.rs:4:15 - | -LL | /// Link to [`S::fmt`] - | ^^^^^^ the struct `S` has no field or associated item named `fmt` - | -note: the lint level is defined here - --> $DIR/assoc-item-not-in-scope.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/auxiliary/empty-fn.rs b/src/test/rustdoc-ui/auxiliary/empty-fn.rs deleted file mode 100644 index 877810f15..000000000 --- a/src/test/rustdoc-ui/auxiliary/empty-fn.rs +++ /dev/null @@ -1,3 +0,0 @@ -// no-prefer-dynamic -#![crate_type = "lib"] -pub fn empty() {} diff --git a/src/test/rustdoc-ui/auxiliary/extern_macros.rs b/src/test/rustdoc-ui/auxiliary/extern_macros.rs deleted file mode 100644 index ee1fec4c5..000000000 --- a/src/test/rustdoc-ui/auxiliary/extern_macros.rs +++ /dev/null @@ -1,7 +0,0 @@ -#[macro_export] -macro_rules! attrs_on_struct { - ( $( #[$attr:meta] )* ) => { - $( #[$attr] )* - pub struct ExpandedStruct; - } -} diff --git a/src/test/rustdoc-ui/auxiliary/issue-61592.rs b/src/test/rustdoc-ui/auxiliary/issue-61592.rs deleted file mode 100644 index 57a365b3f..000000000 --- a/src/test/rustdoc-ui/auxiliary/issue-61592.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![crate_name = "foo"] - -pub trait Foo {} diff --git a/src/test/rustdoc-ui/auxiliary/module_macro_doc.rs b/src/test/rustdoc-ui/auxiliary/module_macro_doc.rs deleted file mode 100644 index 9d6b52b95..000000000 --- a/src/test/rustdoc-ui/auxiliary/module_macro_doc.rs +++ /dev/null @@ -1 +0,0 @@ -//! [`long_cat`] is really long diff --git a/src/test/rustdoc-ui/auxiliary/overflow.rs b/src/test/rustdoc-ui/auxiliary/overflow.rs deleted file mode 100644 index ff65936be..000000000 --- a/src/test/rustdoc-ui/auxiliary/overflow.rs +++ /dev/null @@ -1,20 +0,0 @@ -pub struct B0; -pub struct B1; -use std::ops::Shl; -use std::ops::Sub; -pub type Shleft = >::Output; -pub type Sub1 = >::Output; -pub struct UInt { - pub(crate) msb: U, - pub(crate) lsb: B, -} -impl Shl> for UInt -where - UInt: Sub, - UInt, B0>: Shl>>, -{ - type Output = Shleft, B0>, Sub1>>; - fn shl(self, rhs: UInt) -> Self::Output { - unimplemented!() - } -} diff --git a/src/test/rustdoc-ui/auxiliary/panic-item.rs b/src/test/rustdoc-ui/auxiliary/panic-item.rs deleted file mode 100644 index 17b26850d..000000000 --- a/src/test/rustdoc-ui/auxiliary/panic-item.rs +++ /dev/null @@ -1,17 +0,0 @@ -// no-prefer-dynamic -#![crate_type = "lib"] -#![no_std] -#![feature(lang_items)] - -use core::panic::PanicInfo; -use core::sync::atomic::{self, Ordering}; - -#[panic_handler] -fn panic(_info: &PanicInfo) -> ! { - loop { - atomic::compiler_fence(Ordering::SeqCst); - } -} - -#[lang = "eh_personality"] -fn foo() {} diff --git a/src/test/rustdoc-ui/bare-urls.fixed b/src/test/rustdoc-ui/bare-urls.fixed deleted file mode 100644 index 23aa5c44c..000000000 --- a/src/test/rustdoc-ui/bare-urls.fixed +++ /dev/null @@ -1,60 +0,0 @@ -// run-rustfix - -#![deny(rustdoc::bare_urls)] - -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// hey! -//~^ ERROR this URL is not a hyperlink -pub fn c() {} - -/// -/// [a](http://a.com) -/// [b] -/// -/// [b]: http://b.com -/// -/// ``` -/// This link should not be linted: http://example.com -/// -/// Nor this one: or this one: [x](http://example.com) -/// ``` -/// -/// [should_not.lint](should_not.lint) -pub fn everything_is_fine_here() {} - -#[allow(rustdoc::bare_urls)] -pub mod foo { - /// https://somewhere.com/a?hello=12&bye=11#xyz - pub fn bar() {} -} diff --git a/src/test/rustdoc-ui/bare-urls.rs b/src/test/rustdoc-ui/bare-urls.rs deleted file mode 100644 index 592f57343..000000000 --- a/src/test/rustdoc-ui/bare-urls.rs +++ /dev/null @@ -1,60 +0,0 @@ -// run-rustfix - -#![deny(rustdoc::bare_urls)] - -/// https://somewhere.com -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com/a -//~^ ERROR this URL is not a hyperlink -/// https://www.somewhere.com -//~^ ERROR this URL is not a hyperlink -/// https://www.somewhere.com/a -//~^ ERROR this URL is not a hyperlink -/// https://subdomain.example.com -//~^ ERROR not a hyperlink -/// https://somewhere.com? -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com/a? -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com?hello=12 -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com/a?hello=12 -//~^ ERROR this URL is not a hyperlink -/// https://example.com?hello=12#xyz -//~^ ERROR this URL is not a hyperlink -/// https://example.com/a?hello=12#xyz -//~^ ERROR this URL is not a hyperlink -/// https://example.com#xyz -//~^ ERROR this URL is not a hyperlink -/// https://example.com/a#xyz -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com?hello=12&bye=11 -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com/a?hello=12&bye=11 -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com?hello=12&bye=11#xyz -//~^ ERROR this URL is not a hyperlink -/// hey! https://somewhere.com/a?hello=12&bye=11#xyz -//~^ ERROR this URL is not a hyperlink -pub fn c() {} - -/// -/// [a](http://a.com) -/// [b] -/// -/// [b]: http://b.com -/// -/// ``` -/// This link should not be linted: http://example.com -/// -/// Nor this one: or this one: [x](http://example.com) -/// ``` -/// -/// [should_not.lint](should_not.lint) -pub fn everything_is_fine_here() {} - -#[allow(rustdoc::bare_urls)] -pub mod foo { - /// https://somewhere.com/a?hello=12&bye=11#xyz - pub fn bar() {} -} diff --git a/src/test/rustdoc-ui/bare-urls.stderr b/src/test/rustdoc-ui/bare-urls.stderr deleted file mode 100644 index ccf52cd0b..000000000 --- a/src/test/rustdoc-ui/bare-urls.stderr +++ /dev/null @@ -1,143 +0,0 @@ -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:5:5 - | -LL | /// https://somewhere.com - | ^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links -note: the lint level is defined here - --> $DIR/bare-urls.rs:3:9 - | -LL | #![deny(rustdoc::bare_urls)] - | ^^^^^^^^^^^^^^^^^^ - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:7:5 - | -LL | /// https://somewhere.com/a - | ^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:9:5 - | -LL | /// https://www.somewhere.com - | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:11:5 - | -LL | /// https://www.somewhere.com/a - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:13:5 - | -LL | /// https://subdomain.example.com - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:15:5 - | -LL | /// https://somewhere.com? - | ^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:17:5 - | -LL | /// https://somewhere.com/a? - | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:19:5 - | -LL | /// https://somewhere.com?hello=12 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:21:5 - | -LL | /// https://somewhere.com/a?hello=12 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:23:5 - | -LL | /// https://example.com?hello=12#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:25:5 - | -LL | /// https://example.com/a?hello=12#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:27:5 - | -LL | /// https://example.com#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:29:5 - | -LL | /// https://example.com/a#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:31:5 - | -LL | /// https://somewhere.com?hello=12&bye=11 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:33:5 - | -LL | /// https://somewhere.com/a?hello=12&bye=11 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:35:5 - | -LL | /// https://somewhere.com?hello=12&bye=11#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:37:10 - | -LL | /// hey! https://somewhere.com/a?hello=12&bye=11#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: aborting due to 17 previous errors - diff --git a/src/test/rustdoc-ui/block-doc-comment.rs b/src/test/rustdoc-ui/block-doc-comment.rs deleted file mode 100644 index ce529916e..000000000 --- a/src/test/rustdoc-ui/block-doc-comment.rs +++ /dev/null @@ -1,17 +0,0 @@ -// check-pass -// compile-flags:--test -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" - -// This test ensures that no code block is detected in the doc comments. - -pub mod Wormhole { - /** # Returns - * - */ - pub fn foofoo() {} - /** - * # Returns - * - */ - pub fn barbar() {} -} diff --git a/src/test/rustdoc-ui/block-doc-comment.stdout b/src/test/rustdoc-ui/block-doc-comment.stdout deleted file mode 100644 index 7326c0a25..000000000 --- a/src/test/rustdoc-ui/block-doc-comment.stdout +++ /dev/null @@ -1,5 +0,0 @@ - -running 0 tests - -test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/bounded-hr-lifetime.rs b/src/test/rustdoc-ui/bounded-hr-lifetime.rs deleted file mode 100644 index b2e000b97..000000000 --- a/src/test/rustdoc-ui/bounded-hr-lifetime.rs +++ /dev/null @@ -1,9 +0,0 @@ -// This test ensures that rustdoc doesn't panic on higher-ranked lifetimes -// with bounds, because an error should have already been emitted by rustc. - -pub fn hrlt<'b, 'c>() -where - for<'a: 'b + 'c> &'a (): std::fmt::Debug, - //~^ ERROR lifetime bounds cannot be used in this context -{ -} diff --git a/src/test/rustdoc-ui/bounded-hr-lifetime.stderr b/src/test/rustdoc-ui/bounded-hr-lifetime.stderr deleted file mode 100644 index d8fcd6cb4..000000000 --- a/src/test/rustdoc-ui/bounded-hr-lifetime.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: lifetime bounds cannot be used in this context - --> $DIR/bounded-hr-lifetime.rs:6:13 - | -LL | for<'a: 'b + 'c> &'a (): std::fmt::Debug, - | ^^ ^^ - -error: Compilation failed, aborting rustdoc - -error: aborting due to 2 previous errors - diff --git a/src/test/rustdoc-ui/c-help.rs b/src/test/rustdoc-ui/c-help.rs deleted file mode 100644 index e166edf8b..000000000 --- a/src/test/rustdoc-ui/c-help.rs +++ /dev/null @@ -1,6 +0,0 @@ -// check-pass -// compile-flags: -Chelp -// check-stdout -// regex-error-pattern: -C\s+incremental - -pub struct Foo; diff --git a/src/test/rustdoc-ui/c-help.stdout b/src/test/rustdoc-ui/c-help.stdout deleted file mode 100644 index 75b2e2a2a..000000000 --- a/src/test/rustdoc-ui/c-help.stdout +++ /dev/null @@ -1,51 +0,0 @@ - -C ar=val -- this option is deprecated and does nothing - -C code-model=val -- choose the code model to use (`rustc --print code-models` for details) - -C codegen-units=val -- divide crate into N units to optimize in parallel - -C control-flow-guard=val -- use Windows Control Flow Guard (default: no) - -C debug-assertions=val -- explicitly enable the `cfg(debug_assertions)` directive - -C debuginfo=val -- debug info emission level (0 = no debug info, 1 = line tables only, 2 = full debug info with variable and type information; default: 0) - -C default-linker-libraries=val -- allow the linker to link its default libraries (default: no) - -C embed-bitcode=val -- emit bitcode in rlibs (default: yes) - -C extra-filename=val -- extra data to put in each output filename - -C force-frame-pointers=val -- force use of the frame pointers - -C force-unwind-tables=val -- force use of unwind tables - -C incremental=val -- enable incremental compilation - -C inline-threshold=val -- set the threshold for inlining a function - -C instrument-coverage=val -- instrument the generated code to support LLVM source-based code coverage reports (note, the compiler build config must include `profiler = true`); implies `-C symbol-mangling-version=v0`. Optional values are: - `=all` (implicit value) - `=except-unused-generics` - `=except-unused-functions` - `=off` (default) - -C link-arg=val -- a single extra argument to append to the linker invocation (can be used several times) - -C link-args=val -- extra arguments to append to the linker invocation (space separated) - -C link-dead-code=val -- keep dead code at link time (useful for code coverage) (default: no) - -C link-self-contained=val -- control whether to link Rust provided C objects/libraries or rely - on C toolchain installed in the system - -C linker=val -- system linker to link outputs with - -C linker-flavor=val -- linker flavor - -C linker-plugin-lto=val -- generate build artifacts that are compatible with linker-based LTO - -C llvm-args=val -- a list of arguments to pass to LLVM (space separated) - -C lto=val -- perform LLVM link-time optimizations - -C metadata=val -- metadata to mangle symbol names with - -C no-prepopulate-passes=val -- give an empty list of passes to the pass manager - -C no-redzone=val -- disable the use of the redzone - -C no-stack-check=val -- this option is deprecated and does nothing - -C no-vectorize-loops=val -- disable loop vectorization optimization passes - -C no-vectorize-slp=val -- disable LLVM's SLP vectorization pass - -C opt-level=val -- optimization level (0-3, s, or z; default: 0) - -C overflow-checks=val -- use overflow checks for integer arithmetic - -C panic=val -- panic strategy to compile crate with - -C passes=val -- a list of extra LLVM passes to run (space separated) - -C prefer-dynamic=val -- prefer dynamic linking to static linking (default: no) - -C profile-generate=val -- compile the program with profiling instrumentation - -C profile-use=val -- use the given `.profdata` file for profile-guided optimization - -C relocation-model=val -- control generation of position-independent code (PIC) (`rustc --print relocation-models` for details) - -C remark=val -- print remarks for these optimization passes (space separated, or "all") - -C rpath=val -- set rpath values in libs/exes (default: no) - -C save-temps=val -- save all temporary output files during compilation (default: no) - -C soft-float=val -- use soft float ABI (*eabihf targets only) (default: no) - -C split-debuginfo=val -- how to handle split-debuginfo, a platform-specific option - -C strip=val -- tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`) - -C symbol-mangling-version=val -- which mangling version to use for symbol names ('legacy' (default) or 'v0') - -C target-cpu=val -- select target processor (`rustc --print target-cpus` for details) - -C target-feature=val -- target specific attributes. (`rustc --print target-features` for details). This feature is unsafe. diff --git a/src/test/rustdoc-ui/cfg-test.rs b/src/test/rustdoc-ui/cfg-test.rs deleted file mode 100644 index d4ca92585..000000000 --- a/src/test/rustdoc-ui/cfg-test.rs +++ /dev/null @@ -1,31 +0,0 @@ -// check-pass -// compile-flags:--test --test-args --test-threads=1 -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" - -// Crates like core have doctests gated on `cfg(not(test))` so we need to make -// sure `cfg(test)` is not active when running `rustdoc --test`. - -/// this doctest will be ignored: -/// -/// ``` -/// assert!(false); -/// ``` -#[cfg(test)] -pub struct Foo; - -/// this doctest will be tested: -/// -/// ``` -/// assert!(true); -/// ``` -#[cfg(not(test))] -pub struct Foo; - -/// this doctest will be tested, but will not appear in documentation: -/// -/// ``` -/// assert!(true) -/// ``` -#[cfg(doctest)] -pub struct Bar; diff --git a/src/test/rustdoc-ui/cfg-test.stdout b/src/test/rustdoc-ui/cfg-test.stdout deleted file mode 100644 index 2960ff8d3..000000000 --- a/src/test/rustdoc-ui/cfg-test.stdout +++ /dev/null @@ -1,7 +0,0 @@ - -running 2 tests -test $DIR/cfg-test.rs - Bar (line 27) ... ok -test $DIR/cfg-test.rs - Foo (line 19) ... ok - -test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/check-attr-test.rs b/src/test/rustdoc-ui/check-attr-test.rs deleted file mode 100644 index e95547014..000000000 --- a/src/test/rustdoc-ui/check-attr-test.rs +++ /dev/null @@ -1,31 +0,0 @@ -// compile-flags:--test - -#![deny(rustdoc::invalid_codeblock_attributes)] - -/// foo -/// -/// ```compile-fail,compilefail,comPile_fail -/// boo -/// ``` -pub fn foo() {} - -/// bar -/// -/// ```should-panic,shouldpanic,shOuld_panic -/// boo -/// ``` -pub fn bar() {} - -/// foobar -/// -/// ```no-run,norun,nO_run -/// boo -/// ``` -pub fn foobar() {} - -/// b -/// -/// ```test-harness,testharness,tesT_harness -/// boo -/// ``` -pub fn b() {} diff --git a/src/test/rustdoc-ui/check-attr-test.stderr b/src/test/rustdoc-ui/check-attr-test.stderr deleted file mode 100644 index 01beba1ff..000000000 --- a/src/test/rustdoc-ui/check-attr-test.stderr +++ /dev/null @@ -1,151 +0,0 @@ -error: unknown attribute `compile-fail`. Did you mean `compile_fail`? - --> $DIR/check-attr-test.rs:5:1 - | -5 | / /// foo -6 | | /// -7 | | /// ```compile-fail,compilefail,comPile_fail -8 | | /// boo -9 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully -note: the lint level is defined here - --> $DIR/check-attr-test.rs:3:9 - | -3 | #![deny(rustdoc::invalid_codeblock_attributes)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unknown attribute `compilefail`. Did you mean `compile_fail`? - --> $DIR/check-attr-test.rs:5:1 - | -5 | / /// foo -6 | | /// -7 | | /// ```compile-fail,compilefail,comPile_fail -8 | | /// boo -9 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully - -error: unknown attribute `comPile_fail`. Did you mean `compile_fail`? - --> $DIR/check-attr-test.rs:5:1 - | -5 | / /// foo -6 | | /// -7 | | /// ```compile-fail,compilefail,comPile_fail -8 | | /// boo -9 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully - -error: unknown attribute `should-panic`. Did you mean `should_panic`? - --> $DIR/check-attr-test.rs:12:1 - | -12 | / /// bar -13 | | /// -14 | | /// ```should-panic,shouldpanic,shOuld_panic -15 | | /// boo -16 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running - -error: unknown attribute `shouldpanic`. Did you mean `should_panic`? - --> $DIR/check-attr-test.rs:12:1 - | -12 | / /// bar -13 | | /// -14 | | /// ```should-panic,shouldpanic,shOuld_panic -15 | | /// boo -16 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running - -error: unknown attribute `shOuld_panic`. Did you mean `should_panic`? - --> $DIR/check-attr-test.rs:12:1 - | -12 | / /// bar -13 | | /// -14 | | /// ```should-panic,shouldpanic,shOuld_panic -15 | | /// boo -16 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running - -error: unknown attribute `no-run`. Did you mean `no_run`? - --> $DIR/check-attr-test.rs:19:1 - | -19 | / /// foobar -20 | | /// -21 | | /// ```no-run,norun,nO_run -22 | | /// boo -23 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want) - -error: unknown attribute `norun`. Did you mean `no_run`? - --> $DIR/check-attr-test.rs:19:1 - | -19 | / /// foobar -20 | | /// -21 | | /// ```no-run,norun,nO_run -22 | | /// boo -23 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want) - -error: unknown attribute `nO_run`. Did you mean `no_run`? - --> $DIR/check-attr-test.rs:19:1 - | -19 | / /// foobar -20 | | /// -21 | | /// ```no-run,norun,nO_run -22 | | /// boo -23 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want) - -error: unknown attribute `test-harness`. Did you mean `test_harness`? - --> $DIR/check-attr-test.rs:26:1 - | -26 | / /// b -27 | | /// -28 | | /// ```test-harness,testharness,tesT_harness -29 | | /// boo -30 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: unknown attribute `testharness`. Did you mean `test_harness`? - --> $DIR/check-attr-test.rs:26:1 - | -26 | / /// b -27 | | /// -28 | | /// ```test-harness,testharness,tesT_harness -29 | | /// boo -30 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: unknown attribute `tesT_harness`. Did you mean `test_harness`? - --> $DIR/check-attr-test.rs:26:1 - | -26 | / /// b -27 | | /// -28 | | /// ```test-harness,testharness,tesT_harness -29 | | /// boo -30 | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: aborting due to 12 previous errors - diff --git a/src/test/rustdoc-ui/check-attr.rs b/src/test/rustdoc-ui/check-attr.rs deleted file mode 100644 index 0b3f7bedd..000000000 --- a/src/test/rustdoc-ui/check-attr.rs +++ /dev/null @@ -1,41 +0,0 @@ -#![deny(rustdoc::invalid_codeblock_attributes)] - -/// foo -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -/// -/// ```compile-fail,compilefail,comPile_fail -/// boo -/// ``` -pub fn foo() {} - -/// bar -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -/// -/// ```should-panic,shouldpanic,sHould_panic -/// boo -/// ``` -pub fn bar() {} - -/// foobar -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -/// -/// ```no-run,norun,no_Run -/// boo -/// ``` -pub fn foobar() {} - -/// b -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -/// -/// ```test-harness,testharness,teSt_harness -/// boo -/// ``` -pub fn b() {} diff --git a/src/test/rustdoc-ui/check-attr.stderr b/src/test/rustdoc-ui/check-attr.stderr deleted file mode 100644 index f66e63ab7..000000000 --- a/src/test/rustdoc-ui/check-attr.stderr +++ /dev/null @@ -1,175 +0,0 @@ -error: unknown attribute `compile-fail`. Did you mean `compile_fail`? - --> $DIR/check-attr.rs:3:1 - | -LL | / /// foo -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully -note: the lint level is defined here - --> $DIR/check-attr.rs:1:9 - | -LL | #![deny(rustdoc::invalid_codeblock_attributes)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unknown attribute `compilefail`. Did you mean `compile_fail`? - --> $DIR/check-attr.rs:3:1 - | -LL | / /// foo -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully - -error: unknown attribute `comPile_fail`. Did you mean `compile_fail`? - --> $DIR/check-attr.rs:3:1 - | -LL | / /// foo -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully - -error: unknown attribute `should-panic`. Did you mean `should_panic`? - --> $DIR/check-attr.rs:13:1 - | -LL | / /// bar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running - -error: unknown attribute `shouldpanic`. Did you mean `should_panic`? - --> $DIR/check-attr.rs:13:1 - | -LL | / /// bar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running - -error: unknown attribute `sHould_panic`. Did you mean `should_panic`? - --> $DIR/check-attr.rs:13:1 - | -LL | / /// bar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running - -error: unknown attribute `no-run`. Did you mean `no_run`? - --> $DIR/check-attr.rs:23:1 - | -LL | / /// foobar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want) - -error: unknown attribute `norun`. Did you mean `no_run`? - --> $DIR/check-attr.rs:23:1 - | -LL | / /// foobar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want) - -error: unknown attribute `no_Run`. Did you mean `no_run`? - --> $DIR/check-attr.rs:23:1 - | -LL | / /// foobar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want) - -error: unknown attribute `test-harness`. Did you mean `test_harness`? - --> $DIR/check-attr.rs:33:1 - | -LL | / /// b -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: unknown attribute `testharness`. Did you mean `test_harness`? - --> $DIR/check-attr.rs:33:1 - | -LL | / /// b -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: unknown attribute `teSt_harness`. Did you mean `test_harness`? - --> $DIR/check-attr.rs:33:1 - | -LL | / /// b -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: aborting due to 12 previous errors - diff --git a/src/test/rustdoc-ui/check-cfg-test.rs b/src/test/rustdoc-ui/check-cfg-test.rs deleted file mode 100644 index 626cc8387..000000000 --- a/src/test/rustdoc-ui/check-cfg-test.rs +++ /dev/null @@ -1,12 +0,0 @@ -// check-pass -// compile-flags: --test --nocapture --check-cfg=values(feature,"test") -Z unstable-options -// normalize-stderr-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" - -/// The doctest will produce a warning because feature invalid is unexpected -/// ``` -/// #[cfg(feature = "invalid")] -/// assert!(false); -/// ``` -pub struct Foo; diff --git a/src/test/rustdoc-ui/check-cfg-test.stderr b/src/test/rustdoc-ui/check-cfg-test.stderr deleted file mode 100644 index 9770be2f1..000000000 --- a/src/test/rustdoc-ui/check-cfg-test.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: unexpected `cfg` condition value - --> $DIR/check-cfg-test.rs:9:7 - | -LL | #[cfg(feature = "invalid")] - | ^^^^^^^^^^^^^^^^^^^ - | - = note: expected values for `feature` are: test - = note: `#[warn(unexpected_cfgs)]` on by default - -warning: 1 warning emitted - diff --git a/src/test/rustdoc-ui/check-cfg-test.stdout b/src/test/rustdoc-ui/check-cfg-test.stdout deleted file mode 100644 index b7db49bcf..000000000 --- a/src/test/rustdoc-ui/check-cfg-test.stdout +++ /dev/null @@ -1,6 +0,0 @@ - -running 1 test -test $DIR/check-cfg-test.rs - Foo (line 8) ... ok - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/check-cfg-unstable.rs b/src/test/rustdoc-ui/check-cfg-unstable.rs deleted file mode 100644 index 5c500ce6c..000000000 --- a/src/test/rustdoc-ui/check-cfg-unstable.rs +++ /dev/null @@ -1,2 +0,0 @@ -// check-fail -// compile-flags: --check-cfg=names() diff --git a/src/test/rustdoc-ui/check-cfg-unstable.stderr b/src/test/rustdoc-ui/check-cfg-unstable.stderr deleted file mode 100644 index 9b27c2bc0..000000000 --- a/src/test/rustdoc-ui/check-cfg-unstable.stderr +++ /dev/null @@ -1,2 +0,0 @@ -error: the `-Z unstable-options` flag must also be passed to enable the flag `check-cfg` - diff --git a/src/test/rustdoc-ui/check-cfg.rs b/src/test/rustdoc-ui/check-cfg.rs deleted file mode 100644 index fa8789ad3..000000000 --- a/src/test/rustdoc-ui/check-cfg.rs +++ /dev/null @@ -1,7 +0,0 @@ -// check-pass -// compile-flags: --check-cfg=names() -Z unstable-options - -/// uniz is nor a builtin nor pass as arguments so is unexpected -#[cfg(uniz)] -//~^ WARNING unexpected `cfg` condition name -pub struct Bar; diff --git a/src/test/rustdoc-ui/check-cfg.stderr b/src/test/rustdoc-ui/check-cfg.stderr deleted file mode 100644 index 1db8e1d91..000000000 --- a/src/test/rustdoc-ui/check-cfg.stderr +++ /dev/null @@ -1,10 +0,0 @@ -warning: unexpected `cfg` condition name - --> $DIR/check-cfg.rs:5:7 - | -LL | #[cfg(uniz)] - | ^^^^ help: did you mean: `unix` - | - = note: `#[warn(unexpected_cfgs)]` on by default - -warning: 1 warning emitted - diff --git a/src/test/rustdoc-ui/check-doc-alias-attr-location.rs b/src/test/rustdoc-ui/check-doc-alias-attr-location.rs deleted file mode 100644 index 6de1960e2..000000000 --- a/src/test/rustdoc-ui/check-doc-alias-attr-location.rs +++ /dev/null @@ -1,23 +0,0 @@ -pub struct Bar; -pub trait Foo { - type X; - fn foo() -> Self::X; -} - -#[doc(alias = "foo")] //~ ERROR -extern "C" {} - -#[doc(alias = "bar")] //~ ERROR -impl Bar { - #[doc(alias = "const")] - pub const A: u32 = 0; -} - -#[doc(alias = "foobar")] //~ ERROR -impl Foo for Bar { - #[doc(alias = "assoc")] //~ ERROR - type X = i32; - fn foo() -> Self::X { - 0 - } -} diff --git a/src/test/rustdoc-ui/check-doc-alias-attr-location.stderr b/src/test/rustdoc-ui/check-doc-alias-attr-location.stderr deleted file mode 100644 index 85c951623..000000000 --- a/src/test/rustdoc-ui/check-doc-alias-attr-location.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: `#[doc(alias = "...")]` isn't allowed on foreign module - --> $DIR/check-doc-alias-attr-location.rs:7:7 - | -LL | #[doc(alias = "foo")] - | ^^^^^^^^^^^^^ - -error: `#[doc(alias = "...")]` isn't allowed on implementation block - --> $DIR/check-doc-alias-attr-location.rs:10:7 - | -LL | #[doc(alias = "bar")] - | ^^^^^^^^^^^^^ - -error: `#[doc(alias = "...")]` isn't allowed on implementation block - --> $DIR/check-doc-alias-attr-location.rs:16:7 - | -LL | #[doc(alias = "foobar")] - | ^^^^^^^^^^^^^^^^ - -error: `#[doc(alias = "...")]` isn't allowed on type alias in implementation block - --> $DIR/check-doc-alias-attr-location.rs:18:11 - | -LL | #[doc(alias = "assoc")] - | ^^^^^^^^^^^^^^^ - -error: aborting due to 4 previous errors - diff --git a/src/test/rustdoc-ui/check-doc-alias-attr.rs b/src/test/rustdoc-ui/check-doc-alias-attr.rs deleted file mode 100644 index 719b98604..000000000 --- a/src/test/rustdoc-ui/check-doc-alias-attr.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![crate_type = "lib"] - -#[doc(alias = "foo")] // ok! -#[doc(alias("bar", "baz"))] // ok! -pub struct Bar; - -#[doc(alias)] //~ ERROR -#[doc(alias = 0)] //~ ERROR -#[doc(alias = "\"")] //~ ERROR -#[doc(alias = "\n")] //~ ERROR -#[doc(alias = " -")] //~^ ERROR -#[doc(alias = "\t")] //~ ERROR -#[doc(alias = " hello")] //~ ERROR -#[doc(alias = "hello ")] //~ ERROR -#[doc(alias = "")] //~ ERROR -pub struct Foo; - -#[doc(alias(0))] //~ ERROR -#[doc(alias("\""))] //~ ERROR -#[doc(alias("\n"))] //~ ERROR -#[doc(alias(" -"))] //~^ ERROR -#[doc(alias("\t"))] //~ ERROR -#[doc(alias(" hello"))] //~ ERROR -#[doc(alias("hello "))] //~ ERROR -#[doc(alias(""))] //~ ERROR -pub struct Foo2; diff --git a/src/test/rustdoc-ui/check-doc-alias-attr.stderr b/src/test/rustdoc-ui/check-doc-alias-attr.stderr deleted file mode 100644 index 250568be3..000000000 --- a/src/test/rustdoc-ui/check-doc-alias-attr.stderr +++ /dev/null @@ -1,108 +0,0 @@ -error: doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]` - --> $DIR/check-doc-alias-attr.rs:7:7 - | -LL | #[doc(alias)] - | ^^^^^ - -error: doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]` - --> $DIR/check-doc-alias-attr.rs:8:7 - | -LL | #[doc(alias = 0)] - | ^^^^^^^^^ - -error: '"' character isn't allowed in `#[doc(alias = "...")]` - --> $DIR/check-doc-alias-attr.rs:9:15 - | -LL | #[doc(alias = "\"")] - | ^^^^ - -error: '\n' character isn't allowed in `#[doc(alias = "...")]` - --> $DIR/check-doc-alias-attr.rs:10:15 - | -LL | #[doc(alias = "\n")] - | ^^^^ - -error: '\n' character isn't allowed in `#[doc(alias = "...")]` - --> $DIR/check-doc-alias-attr.rs:11:15 - | -LL | #[doc(alias = " - | _______________^ -LL | | ")] - | |_^ - -error: '\t' character isn't allowed in `#[doc(alias = "...")]` - --> $DIR/check-doc-alias-attr.rs:13:15 - | -LL | #[doc(alias = "\t")] - | ^^^^ - -error: `#[doc(alias = "...")]` cannot start or end with ' ' - --> $DIR/check-doc-alias-attr.rs:14:15 - | -LL | #[doc(alias = " hello")] - | ^^^^^^^^ - -error: `#[doc(alias = "...")]` cannot start or end with ' ' - --> $DIR/check-doc-alias-attr.rs:15:15 - | -LL | #[doc(alias = "hello ")] - | ^^^^^^^^ - -error: `#[doc(alias = "...")]` attribute cannot have empty value - --> $DIR/check-doc-alias-attr.rs:16:15 - | -LL | #[doc(alias = "")] - | ^^ - -error: `#[doc(alias("a"))]` expects string literals - --> $DIR/check-doc-alias-attr.rs:19:13 - | -LL | #[doc(alias(0))] - | ^ - -error: '"' character isn't allowed in `#[doc(alias("..."))]` - --> $DIR/check-doc-alias-attr.rs:20:13 - | -LL | #[doc(alias("\""))] - | ^^^^ - -error: '\n' character isn't allowed in `#[doc(alias("..."))]` - --> $DIR/check-doc-alias-attr.rs:21:13 - | -LL | #[doc(alias("\n"))] - | ^^^^ - -error: '\n' character isn't allowed in `#[doc(alias("..."))]` - --> $DIR/check-doc-alias-attr.rs:22:13 - | -LL | #[doc(alias(" - | _____________^ -LL | | "))] - | |_^ - -error: '\t' character isn't allowed in `#[doc(alias("..."))]` - --> $DIR/check-doc-alias-attr.rs:24:13 - | -LL | #[doc(alias("\t"))] - | ^^^^ - -error: `#[doc(alias("..."))]` cannot start or end with ' ' - --> $DIR/check-doc-alias-attr.rs:25:13 - | -LL | #[doc(alias(" hello"))] - | ^^^^^^^^ - -error: `#[doc(alias("..."))]` cannot start or end with ' ' - --> $DIR/check-doc-alias-attr.rs:26:13 - | -LL | #[doc(alias("hello "))] - | ^^^^^^^^ - -error: `#[doc(alias("..."))]` attribute cannot have empty value - --> $DIR/check-doc-alias-attr.rs:27:13 - | -LL | #[doc(alias(""))] - | ^^ - -error: aborting due to 17 previous errors - diff --git a/src/test/rustdoc-ui/check-fail.rs b/src/test/rustdoc-ui/check-fail.rs deleted file mode 100644 index c5e1759ee..000000000 --- a/src/test/rustdoc-ui/check-fail.rs +++ /dev/null @@ -1,22 +0,0 @@ -// compile-flags: -Z unstable-options --check - -#![feature(rustdoc_missing_doc_code_examples)] -#![deny(missing_docs)] -#![deny(rustdoc::all)] - -//! ```rust,testharness -//~^ ERROR -//! let x = 12; -//! ``` - -pub fn foo() {} -//~^ ERROR -//~^^ ERROR - -/// hello -//~^ ERROR -/// -/// ```rust,testharness -/// let x = 12; -/// ``` -pub fn bar() {} diff --git a/src/test/rustdoc-ui/check-fail.stderr b/src/test/rustdoc-ui/check-fail.stderr deleted file mode 100644 index d8aeccbfc..000000000 --- a/src/test/rustdoc-ui/check-fail.stderr +++ /dev/null @@ -1,52 +0,0 @@ -error: missing documentation for a function - --> $DIR/check-fail.rs:12:1 - | -LL | pub fn foo() {} - | ^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/check-fail.rs:4:9 - | -LL | #![deny(missing_docs)] - | ^^^^^^^^^^^^ - -error: missing code example in this documentation - --> $DIR/check-fail.rs:12:1 - | -LL | pub fn foo() {} - | ^^^^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/check-fail.rs:5:9 - | -LL | #![deny(rustdoc::all)] - | ^^^^^^^^^^^^ - = note: `#[deny(rustdoc::missing_doc_code_examples)]` implied by `#[deny(rustdoc::all)]` - -error: unknown attribute `testharness`. Did you mean `test_harness`? - --> $DIR/check-fail.rs:7:1 - | -LL | / //! ```rust,testharness -LL | | -LL | | //! let x = 12; -LL | | //! ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - = note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(rustdoc::all)]` - -error: unknown attribute `testharness`. Did you mean `test_harness`? - --> $DIR/check-fail.rs:16:1 - | -LL | / /// hello -LL | | -LL | | /// -LL | | /// ```rust,testharness -LL | | /// let x = 12; -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: aborting due to 4 previous errors - diff --git a/src/test/rustdoc-ui/check.rs b/src/test/rustdoc-ui/check.rs deleted file mode 100644 index f70b03361..000000000 --- a/src/test/rustdoc-ui/check.rs +++ /dev/null @@ -1,14 +0,0 @@ -// check-pass -// compile-flags: -Z unstable-options --check -// normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" - -#![feature(rustdoc_missing_doc_code_examples)] -//~^ WARN -//~^^ WARN - -#![warn(missing_docs)] -#![warn(rustdoc::all)] - -pub fn foo() {} -//~^ WARN -//~^^ WARN diff --git a/src/test/rustdoc-ui/check.stderr b/src/test/rustdoc-ui/check.stderr deleted file mode 100644 index d379f33f2..000000000 --- a/src/test/rustdoc-ui/check.stderr +++ /dev/null @@ -1,57 +0,0 @@ -warning: missing documentation for the crate - --> $DIR/check.rs:5:1 - | -LL | / #![feature(rustdoc_missing_doc_code_examples)] -LL | | -LL | | -LL | | -... | -LL | | -LL | | pub fn foo() {} - | |_______________^ - | -note: the lint level is defined here - --> $DIR/check.rs:9:9 - | -LL | #![warn(missing_docs)] - | ^^^^^^^^^^^^ - -warning: missing documentation for a function - --> $DIR/check.rs:12:1 - | -LL | pub fn foo() {} - | ^^^^^^^^^^^^ - -warning: no documentation found for this crate's top-level module - | - = help: The following guide may be of use: - https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html -note: the lint level is defined here - --> $DIR/check.rs:10:9 - | -LL | #![warn(rustdoc::all)] - | ^^^^^^^^^^^^ - = note: `#[warn(rustdoc::missing_crate_level_docs)]` implied by `#[warn(rustdoc::all)]` - -warning: missing code example in this documentation - --> $DIR/check.rs:5:1 - | -LL | / #![feature(rustdoc_missing_doc_code_examples)] -LL | | -LL | | -LL | | -... | -LL | | -LL | | pub fn foo() {} - | |_______________^ - | - = note: `#[warn(rustdoc::missing_doc_code_examples)]` implied by `#[warn(rustdoc::all)]` - -warning: missing code example in this documentation - --> $DIR/check.rs:12:1 - | -LL | pub fn foo() {} - | ^^^^^^^^^^^^^^^ - -warning: 5 warnings emitted - diff --git a/src/test/rustdoc-ui/commandline-argfile-badutf8.args b/src/test/rustdoc-ui/commandline-argfile-badutf8.args deleted file mode 100644 index c070b0c24..000000000 --- a/src/test/rustdoc-ui/commandline-argfile-badutf8.args +++ /dev/null @@ -1,2 +0,0 @@ ---cfg -unbroken€ \ No newline at end of file diff --git a/src/test/rustdoc-ui/commandline-argfile-badutf8.rs b/src/test/rustdoc-ui/commandline-argfile-badutf8.rs deleted file mode 100644 index e2984e3ca..000000000 --- a/src/test/rustdoc-ui/commandline-argfile-badutf8.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Check to see if we can get parameters from an @argsfile file -// -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-badutf8.args - -#[cfg(not(cmdline_set))] -compile_error!("cmdline_set not set"); - -#[cfg(not(unbroken))] -compile_error!("unbroken not set"); - -fn main() { -} diff --git a/src/test/rustdoc-ui/commandline-argfile-badutf8.stderr b/src/test/rustdoc-ui/commandline-argfile-badutf8.stderr deleted file mode 100644 index 9af6fc0a5..000000000 --- a/src/test/rustdoc-ui/commandline-argfile-badutf8.stderr +++ /dev/null @@ -1,2 +0,0 @@ -error: Failed to load argument file: Utf8 error in $DIR/commandline-argfile-badutf8.args - diff --git a/src/test/rustdoc-ui/commandline-argfile-missing.rs b/src/test/rustdoc-ui/commandline-argfile-missing.rs deleted file mode 100644 index 5a6465bd0..000000000 --- a/src/test/rustdoc-ui/commandline-argfile-missing.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Check to see if we can get parameters from an @argsfile file -// -// normalize-stderr-test: "os error \d+" -> "os error $$ERR" -// normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-missing.args - -#[cfg(not(cmdline_set))] -compile_error!("cmdline_set not set"); - -#[cfg(not(unbroken))] -compile_error!("unbroken not set"); - -fn main() { -} diff --git a/src/test/rustdoc-ui/commandline-argfile-missing.stderr b/src/test/rustdoc-ui/commandline-argfile-missing.stderr deleted file mode 100644 index 179ad8310..000000000 --- a/src/test/rustdoc-ui/commandline-argfile-missing.stderr +++ /dev/null @@ -1,2 +0,0 @@ -error: Failed to load argument file: IO Error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) - diff --git a/src/test/rustdoc-ui/commandline-argfile.args b/src/test/rustdoc-ui/commandline-argfile.args deleted file mode 100644 index 972938bf6..000000000 --- a/src/test/rustdoc-ui/commandline-argfile.args +++ /dev/null @@ -1,2 +0,0 @@ ---cfg -unbroken \ No newline at end of file diff --git a/src/test/rustdoc-ui/commandline-argfile.rs b/src/test/rustdoc-ui/commandline-argfile.rs deleted file mode 100644 index cc8c8722c..000000000 --- a/src/test/rustdoc-ui/commandline-argfile.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Check to see if we can get parameters from an @argsfile file -// -// check-pass -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile.args - -#[cfg(not(cmdline_set))] -compile_error!("cmdline_set not set"); - -#[cfg(not(unbroken))] -compile_error!("unbroken not set"); - -fn main() { -} diff --git a/src/test/rustdoc-ui/const-evalutation-ice.rs b/src/test/rustdoc-ui/const-evalutation-ice.rs deleted file mode 100644 index 0dd3bcaa2..000000000 --- a/src/test/rustdoc-ui/const-evalutation-ice.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Just check we don't get an ICE for `N`. - -use std::cell::Cell; -use std::mem; - -pub struct S { - s: Cell -} - -pub const N: usize = 0 - (mem::size_of::() != 400) as usize; -//~^ ERROR evaluation of constant value failed diff --git a/src/test/rustdoc-ui/const-evalutation-ice.stderr b/src/test/rustdoc-ui/const-evalutation-ice.stderr deleted file mode 100644 index 5d9c16c07..000000000 --- a/src/test/rustdoc-ui/const-evalutation-ice.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0080]: evaluation of constant value failed - --> $DIR/const-evalutation-ice.rs:10:22 - | -LL | pub const N: usize = 0 - (mem::size_of::() != 400) as usize; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0080`. diff --git a/src/test/rustdoc-ui/coverage/allow_missing_docs.rs b/src/test/rustdoc-ui/coverage/allow_missing_docs.rs deleted file mode 100644 index c771c09da..000000000 --- a/src/test/rustdoc-ui/coverage/allow_missing_docs.rs +++ /dev/null @@ -1,41 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -//! Make sure to have some docs on your crate root - -#[allow(missing_docs)] -pub mod mod_foo { - pub struct Bar; -} - -/// This is a struct with an `#[allow(missing_docs)]` -pub struct AllowTheMissingDocs { - #[allow(missing_docs)] - pub empty_str: String, - - /// This has - #[allow(missing_docs)] - /// but also has documentation comments - pub hello: usize, - - /// The doc id just to create a boilerplate comment - pub doc_id: Vec, -} - -/// A function that has a documentation -pub fn this_is_func() {} - -#[allow(missing_docs)] -pub struct DemoStruct { - something: usize, -} - -#[allow(missing_docs)] -pub mod bar { - #[warn(missing_docs)] - pub struct Bar { //~ WARN - pub f: u32, //~ WARN - } - - pub struct NeedsNoDocs; -} diff --git a/src/test/rustdoc-ui/coverage/allow_missing_docs.stderr b/src/test/rustdoc-ui/coverage/allow_missing_docs.stderr deleted file mode 100644 index 3d5b512d1..000000000 --- a/src/test/rustdoc-ui/coverage/allow_missing_docs.stderr +++ /dev/null @@ -1,20 +0,0 @@ -warning: missing documentation for a struct - --> $DIR/allow_missing_docs.rs:36:5 - | -LL | pub struct Bar { - | ^^^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/allow_missing_docs.rs:35:12 - | -LL | #[warn(missing_docs)] - | ^^^^^^^^^^^^ - -warning: missing documentation for a struct field - --> $DIR/allow_missing_docs.rs:37:9 - | -LL | pub f: u32, - | ^^^^^^^^^^ - -warning: 2 warnings emitted - diff --git a/src/test/rustdoc-ui/coverage/allow_missing_docs.stdout b/src/test/rustdoc-ui/coverage/allow_missing_docs.stdout deleted file mode 100644 index 17e8ee9e2..000000000 --- a/src/test/rustdoc-ui/coverage/allow_missing_docs.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...i/coverage/allow_missing_docs.rs | 5 | 71.4% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 5 | 71.4% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/basic.rs b/src/test/rustdoc-ui/coverage/basic.rs deleted file mode 100644 index 6c26b751c..000000000 --- a/src/test/rustdoc-ui/coverage/basic.rs +++ /dev/null @@ -1,50 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -#![feature(extern_types)] - -//! Make sure to have some docs on your crate root - -/// This struct is documented, but its fields are not. -/// -/// However, one field is private, so it shouldn't show in the total. -pub struct SomeStruct { - pub some_field: usize, - other_field: usize, -} - -impl SomeStruct { - /// Method with docs - pub fn this_fn(&self) {} - - // Method without docs - pub fn other_method(&self) {} -} - -// struct without docs -pub struct OtherStruct; - -// function with no docs -pub fn some_fn() {} - -/// Function with docs -pub fn other_fn() {} - -pub enum SomeEnum { - /// Some of these variants are documented... - VarOne, - /// ...but some of them are not. - VarTwo, - // (like this one) - VarThree, -} - -/// There's a macro here, too -#[macro_export] -macro_rules! some_macro { - () => {}; -} - -extern "C" { - pub type ExternType; -} diff --git a/src/test/rustdoc-ui/coverage/basic.stdout b/src/test/rustdoc-ui/coverage/basic.stdout deleted file mode 100644 index 3c602b3da..000000000 --- a/src/test/rustdoc-ui/coverage/basic.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...est/rustdoc-ui/coverage/basic.rs | 7 | 50.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 7 | 50.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/doc-examples-json.rs b/src/test/rustdoc-ui/coverage/doc-examples-json.rs deleted file mode 100644 index 1da181379..000000000 --- a/src/test/rustdoc-ui/coverage/doc-examples-json.rs +++ /dev/null @@ -1,13 +0,0 @@ -// check-pass -// compile-flags:-Z unstable-options --output-format json --show-coverage - -// This check ensures that only one doc example is counted since they're "optional" on -// certain items. - -/// ``` -/// let x = 12; -/// ``` -pub const Foo: u32 = 0; - -/// doc -pub const Bar: u32 = 0; diff --git a/src/test/rustdoc-ui/coverage/doc-examples-json.stdout b/src/test/rustdoc-ui/coverage/doc-examples-json.stdout deleted file mode 100644 index 92f585569..000000000 --- a/src/test/rustdoc-ui/coverage/doc-examples-json.stdout +++ /dev/null @@ -1 +0,0 @@ -{"$DIR/doc-examples-json.rs":{"total":3,"with_docs":2,"total_examples":2,"with_examples":1}} diff --git a/src/test/rustdoc-ui/coverage/doc-examples.rs b/src/test/rustdoc-ui/coverage/doc-examples.rs deleted file mode 100644 index cd718f8a3..000000000 --- a/src/test/rustdoc-ui/coverage/doc-examples.rs +++ /dev/null @@ -1,27 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -//! This test ensure that only rust code examples are counted. - -/// Doc -/// -/// ``` -/// let x = 2; -/// ``` -pub struct Foo; - -/// Doc -/// -/// ```text -/// yolo -/// ``` -pub trait Bar {} - -/// Doc -/// -/// ```ignore (just for the sake of this test) -/// let x = 2; -/// ``` -pub fn foo(a: Foo, b: u32, c: T, d: D) -> u32 { - 0 -} diff --git a/src/test/rustdoc-ui/coverage/doc-examples.stdout b/src/test/rustdoc-ui/coverage/doc-examples.stdout deleted file mode 100644 index 8188740f8..000000000 --- a/src/test/rustdoc-ui/coverage/doc-examples.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...tdoc-ui/coverage/doc-examples.rs | 4 | 100.0% | 1 | 25.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 4 | 100.0% | 1 | 25.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/empty.rs b/src/test/rustdoc-ui/coverage/empty.rs deleted file mode 100644 index 55a87e9d9..000000000 --- a/src/test/rustdoc-ui/coverage/empty.rs +++ /dev/null @@ -1,4 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -// an empty crate still has one item to document: the crate root diff --git a/src/test/rustdoc-ui/coverage/empty.stdout b/src/test/rustdoc-ui/coverage/empty.stdout deleted file mode 100644 index 890a7d56e..000000000 --- a/src/test/rustdoc-ui/coverage/empty.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...est/rustdoc-ui/coverage/empty.rs | 0 | 0.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 0 | 0.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/enum-tuple-documented.rs b/src/test/rustdoc-ui/coverage/enum-tuple-documented.rs deleted file mode 100644 index e9c165b19..000000000 --- a/src/test/rustdoc-ui/coverage/enum-tuple-documented.rs +++ /dev/null @@ -1,37 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -// The point of this test is to ensure that the number of "documented" items -// is higher than in `enum-tuple.rs`. - -//! (remember the crate root is still a module) - -/// so check out this enum here -pub enum ThisEnum { - /// VarOne. - VarOne( - /// hello! - String, - ), - /// Var Two. - VarTwo( - /// Hello - String, - /// Bis repetita. - String, - ), -} - -/// Struct. -pub struct ThisStruct( - /// hello - u32, -); - -/// Struct. -pub struct ThisStruct2( - /// hello - u32, - /// Bis repetita. - u8, -); diff --git a/src/test/rustdoc-ui/coverage/enum-tuple-documented.stdout b/src/test/rustdoc-ui/coverage/enum-tuple-documented.stdout deleted file mode 100644 index 82c98f43f..000000000 --- a/src/test/rustdoc-ui/coverage/enum-tuple-documented.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...overage/enum-tuple-documented.rs | 9 | 100.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 9 | 100.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/enum-tuple.rs b/src/test/rustdoc-ui/coverage/enum-tuple.rs deleted file mode 100644 index 5fb205450..000000000 --- a/src/test/rustdoc-ui/coverage/enum-tuple.rs +++ /dev/null @@ -1,18 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -//! (remember the crate root is still a module) - -/// so check out this enum here -pub enum ThisEnum { - /// No need to document the field if there is only one in a tuple variant! - VarOne(String), - /// But if there is more than one... still fine! - VarTwo(String, String), -} - -/// Struct. -pub struct ThisStruct(u32); - -/// Struct. -pub struct ThisStruct2(u32, u8); diff --git a/src/test/rustdoc-ui/coverage/enum-tuple.stdout b/src/test/rustdoc-ui/coverage/enum-tuple.stdout deleted file mode 100644 index a3377d59c..000000000 --- a/src/test/rustdoc-ui/coverage/enum-tuple.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...ustdoc-ui/coverage/enum-tuple.rs | 6 | 100.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 6 | 100.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/enums.rs b/src/test/rustdoc-ui/coverage/enums.rs deleted file mode 100644 index a4ae36d68..000000000 --- a/src/test/rustdoc-ui/coverage/enums.rs +++ /dev/null @@ -1,22 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -//! (remember the crate root is still a module) - -/// so check out this enum here -pub enum ThisEnum { - /// this variant has some weird stuff going on - VarOne { - /// like, it has some named fields inside - field_one: usize, - // (these show up as struct fields) - field_two: usize, - }, - /// here's another variant for you - VarTwo(String), - // but not all of them need to be documented as thoroughly - VarThree, -} - -/// uninhabited enums? sure, let's throw one of those around -pub enum OtherEnum {} diff --git a/src/test/rustdoc-ui/coverage/enums.stdout b/src/test/rustdoc-ui/coverage/enums.stdout deleted file mode 100644 index 64c012c1f..000000000 --- a/src/test/rustdoc-ui/coverage/enums.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...est/rustdoc-ui/coverage/enums.rs | 6 | 75.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 6 | 75.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/exotic.rs b/src/test/rustdoc-ui/coverage/exotic.rs deleted file mode 100644 index 72b70d698..000000000 --- a/src/test/rustdoc-ui/coverage/exotic.rs +++ /dev/null @@ -1,15 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -#![feature(rustdoc_internals)] - -//! the features only used in std also have entries in the table, so make sure those get pulled out -//! properly as well - -/// woo, check it out, we can write our own primitive docs lol -#[doc(primitive="unit")] -mod prim_unit {} - -/// keywords? sure, pile them on -#[doc(keyword="where")] -mod where_keyword {} diff --git a/src/test/rustdoc-ui/coverage/exotic.stdout b/src/test/rustdoc-ui/coverage/exotic.stdout deleted file mode 100644 index 27798b813..000000000 --- a/src/test/rustdoc-ui/coverage/exotic.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...st/rustdoc-ui/coverage/exotic.rs | 3 | 100.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 3 | 100.0% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/html.rs b/src/test/rustdoc-ui/coverage/html.rs deleted file mode 100644 index 181cb4c50..000000000 --- a/src/test/rustdoc-ui/coverage/html.rs +++ /dev/null @@ -1,4 +0,0 @@ -// compile-flags:-Z unstable-options --output-format html --show-coverage - -/// Foo -pub struct Xo; diff --git a/src/test/rustdoc-ui/coverage/html.stderr b/src/test/rustdoc-ui/coverage/html.stderr deleted file mode 100644 index adca375d4..000000000 --- a/src/test/rustdoc-ui/coverage/html.stderr +++ /dev/null @@ -1,2 +0,0 @@ -error: html output format isn't supported for the --show-coverage option - diff --git a/src/test/rustdoc-ui/coverage/json.rs b/src/test/rustdoc-ui/coverage/json.rs deleted file mode 100644 index a591cd5db..000000000 --- a/src/test/rustdoc-ui/coverage/json.rs +++ /dev/null @@ -1,65 +0,0 @@ -// check-pass -// compile-flags:-Z unstable-options --output-format json --show-coverage - -pub mod foo { - /// Hello! - pub struct Foo; - /// Bar - pub enum Bar { A } -} - -/// X -pub struct X; - -/// Bar -/// -/// ``` -/// let x = 12; -/// ``` -pub mod bar { - /// bar - pub struct Bar; - /// X - pub enum X { - /// ``` - /// let x = "should be ignored!"; - /// ``` - Y - } -} - -/// yolo -/// -/// ```text -/// should not be counted as a code example! -/// ``` -pub enum Yolo { X } - -impl Yolo { - /// ``` - /// let x = "should be ignored!"; - /// ``` - pub const Const: u32 = 0; -} - -pub struct Xo { - /// ``` - /// let x = "should be ignored!"; - /// ``` - x: T, -} - -/// ``` -/// let x = "should be ignored!"; -/// ``` -pub static StaticFoo: u32 = 0; - -/// ``` -/// let x = "should be ignored!"; -/// ``` -pub const ConstFoo: u32 = 0; - -/// ``` -/// let x = "should be ignored!"; -/// ``` -pub type TypeFoo = u32; diff --git a/src/test/rustdoc-ui/coverage/json.stdout b/src/test/rustdoc-ui/coverage/json.stdout deleted file mode 100644 index c2be73ce3..000000000 --- a/src/test/rustdoc-ui/coverage/json.stdout +++ /dev/null @@ -1 +0,0 @@ -{"$DIR/json.rs":{"total":17,"with_docs":12,"total_examples":15,"with_examples":6}} diff --git a/src/test/rustdoc-ui/coverage/private.rs b/src/test/rustdoc-ui/coverage/private.rs deleted file mode 100644 index 2a0271727..000000000 --- a/src/test/rustdoc-ui/coverage/private.rs +++ /dev/null @@ -1,21 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage --document-private-items -// check-pass - -#![allow(unused)] - -//! when `--document-private-items` is passed, nothing is safe. everything must have docs or your -//! score will suffer the consequences - -mod this_mod { - fn private_fn() {} -} - -/// See, our public items have docs! -pub struct SomeStruct { - /// Look, all perfectly documented! - pub field: usize, - other: usize, -} - -/// Nothing shady going on here. Just a bunch of well-documented code. (cough) -pub fn public_fn() {} diff --git a/src/test/rustdoc-ui/coverage/private.stdout b/src/test/rustdoc-ui/coverage/private.stdout deleted file mode 100644 index 37a0f5187..000000000 --- a/src/test/rustdoc-ui/coverage/private.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...t/rustdoc-ui/coverage/private.rs | 4 | 57.1% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 4 | 57.1% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/statics-consts.rs b/src/test/rustdoc-ui/coverage/statics-consts.rs deleted file mode 100644 index 5a35260fa..000000000 --- a/src/test/rustdoc-ui/coverage/statics-consts.rs +++ /dev/null @@ -1,23 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -//! gotta make sure we can count statics and consts correctly, too - -/// static like electricity, right? -pub static THIS_STATIC: usize = 0; - -/// (it's not electricity, is it) -pub const THIS_CONST: usize = 1; - -/// associated consts show up separately, but let's throw them in as well -pub trait SomeTrait { - /// just like that, yeah - const ASSOC_CONST: usize; -} - -pub struct SomeStruct; - -impl SomeStruct { - /// wait, structs can have them too, can't forget those - pub const ASSOC_CONST: usize = 100; -} diff --git a/src/test/rustdoc-ui/coverage/statics-consts.stdout b/src/test/rustdoc-ui/coverage/statics-consts.stdout deleted file mode 100644 index dbea3a3ea..000000000 --- a/src/test/rustdoc-ui/coverage/statics-consts.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...oc-ui/coverage/statics-consts.rs | 6 | 85.7% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 6 | 85.7% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/coverage/traits.rs b/src/test/rustdoc-ui/coverage/traits.rs deleted file mode 100644 index daa08ec25..000000000 --- a/src/test/rustdoc-ui/coverage/traits.rs +++ /dev/null @@ -1,38 +0,0 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass - -#![feature(trait_alias)] -#![feature(type_alias_impl_trait)] - -/// look at this trait right here -pub trait ThisTrait { - /// that's a trait all right - fn right_here(&self); - - /// even the provided functions show up as trait methods - fn aww_yeah(&self) {} - - /// gotta check those associated types, they're slippery - type SomeType; -} - -/// so what happens if we take some struct... -#[derive(Clone)] -pub struct SomeStruct; - -/// ...and slap this trait on it? -impl ThisTrait for SomeStruct { - /// nothing! trait impls are totally ignored in this calculation, sorry. - fn right_here(&self) {} - - type SomeType = String; -} - -/// but what about those aliases? i hear they're pretty exotic -pub trait MyAlias = ThisTrait + Send + Sync; - -/// woah, getting all opaque in here -pub type ThisExists = impl ThisTrait; - -/// why don't we get a little more concrete -pub fn defines() -> ThisExists { SomeStruct {} } diff --git a/src/test/rustdoc-ui/coverage/traits.stdout b/src/test/rustdoc-ui/coverage/traits.stdout deleted file mode 100644 index 5053d0209..000000000 --- a/src/test/rustdoc-ui/coverage/traits.stdout +++ /dev/null @@ -1,7 +0,0 @@ -+-------------------------------------+------------+------------+------------+------------+ -| File | Documented | Percentage | Examples | Percentage | -+-------------------------------------+------------+------------+------------+------------+ -| ...st/rustdoc-ui/coverage/traits.rs | 8 | 88.9% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ -| Total | 8 | 88.9% | 0 | 0.0% | -+-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.rs b/src/test/rustdoc-ui/deny-intra-link-resolution-failure.rs deleted file mode 100644 index 09da124b1..000000000 --- a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.rs +++ /dev/null @@ -1,4 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] - -/// [v2] //~ ERROR -pub fn foo() {} diff --git a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr b/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr deleted file mode 100644 index 3e08354a6..000000000 --- a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: unresolved link to `v2` - --> $DIR/deny-intra-link-resolution-failure.rs:3:6 - | -LL | /// [v2] - | ^^ no item named `v2` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` -note: the lint level is defined here - --> $DIR/deny-intra-link-resolution-failure.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/deny-missing-docs-crate.rs b/src/test/rustdoc-ui/deny-missing-docs-crate.rs deleted file mode 100644 index b74eba3f6..000000000 --- a/src/test/rustdoc-ui/deny-missing-docs-crate.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![deny(missing_docs)] //~ ERROR - -pub struct Foo; //~ ERROR diff --git a/src/test/rustdoc-ui/deny-missing-docs-crate.stderr b/src/test/rustdoc-ui/deny-missing-docs-crate.stderr deleted file mode 100644 index 5025b0b0c..000000000 --- a/src/test/rustdoc-ui/deny-missing-docs-crate.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: missing documentation for the crate - --> $DIR/deny-missing-docs-crate.rs:1:1 - | -LL | / #![deny(missing_docs)] -LL | | -LL | | pub struct Foo; - | |_______________^ - | -note: the lint level is defined here - --> $DIR/deny-missing-docs-crate.rs:1:9 - | -LL | #![deny(missing_docs)] - | ^^^^^^^^^^^^ - -error: missing documentation for a struct - --> $DIR/deny-missing-docs-crate.rs:3:1 - | -LL | pub struct Foo; - | ^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/rustdoc-ui/deny-missing-docs-macro.rs b/src/test/rustdoc-ui/deny-missing-docs-macro.rs deleted file mode 100644 index b1c125317..000000000 --- a/src/test/rustdoc-ui/deny-missing-docs-macro.rs +++ /dev/null @@ -1,8 +0,0 @@ -//! foo - -#![deny(missing_docs)] - -#[macro_export] -macro_rules! foo { //~ ERROR - () => {} -} diff --git a/src/test/rustdoc-ui/deny-missing-docs-macro.stderr b/src/test/rustdoc-ui/deny-missing-docs-macro.stderr deleted file mode 100644 index 0867b0818..000000000 --- a/src/test/rustdoc-ui/deny-missing-docs-macro.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: missing documentation for a macro - --> $DIR/deny-missing-docs-macro.rs:6:1 - | -LL | macro_rules! foo { - | ^^^^^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/deny-missing-docs-macro.rs:3:9 - | -LL | #![deny(missing_docs)] - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/deprecated-attrs.rs b/src/test/rustdoc-ui/deprecated-attrs.rs deleted file mode 100644 index 4f6a14fc2..000000000 --- a/src/test/rustdoc-ui/deprecated-attrs.rs +++ /dev/null @@ -1,16 +0,0 @@ -// check-pass -// compile-flags: --passes unknown-pass -// error-pattern: the `passes` flag no longer functions - -#![doc(no_default_passes)] -//~^ WARNING attribute is deprecated -//~| NOTE see issue #44136 -//~| HELP no longer functions; you may want to use `#![doc(document_private_items)]` -#![doc(passes = "collapse-docs unindent-comments")] -//~^ WARNING attribute is deprecated -//~| NOTE see issue #44136 -//~| HELP no longer functions; you may want to use `#![doc(document_private_items)]` -#![doc(plugins = "xxx")] -//~^ WARNING attribute is deprecated -//~| NOTE see issue #44136 -//~| WARNING no longer functions; see CVE diff --git a/src/test/rustdoc-ui/deprecated-attrs.stderr b/src/test/rustdoc-ui/deprecated-attrs.stderr deleted file mode 100644 index 45b20ce70..000000000 --- a/src/test/rustdoc-ui/deprecated-attrs.stderr +++ /dev/null @@ -1,34 +0,0 @@ -warning: the `passes` flag no longer functions - | - = note: see issue #44136 for more information - = help: you may want to use --document-private-items - -warning: the `#![doc(no_default_passes)]` attribute is deprecated - --> $DIR/deprecated-attrs.rs:5:8 - | -LL | #![doc(no_default_passes)] - | ^^^^^^^^^^^^^^^^^ - | - = note: see issue #44136 for more information - = help: `#![doc(no_default_passes)]` no longer functions; you may want to use `#![doc(document_private_items)]` - -warning: the `#![doc(passes = "...")]` attribute is deprecated - --> $DIR/deprecated-attrs.rs:9:8 - | -LL | #![doc(passes = "collapse-docs unindent-comments")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44136 for more information - = help: `#![doc(passes = "...")]` no longer functions; you may want to use `#![doc(document_private_items)]` - -warning: the `#![doc(plugins = "...")]` attribute is deprecated - --> $DIR/deprecated-attrs.rs:13:8 - | -LL | #![doc(plugins = "xxx")] - | ^^^^^^^^^^^^^^^ - | - = note: see issue #44136 for more information - = warning: `#![doc(plugins = "...")]` no longer functions; see CVE-2018-1000622 - -warning: 3 warnings emitted - diff --git a/src/test/rustdoc-ui/deref-generic.rs b/src/test/rustdoc-ui/deref-generic.rs deleted file mode 100644 index bc64beb1b..000000000 --- a/src/test/rustdoc-ui/deref-generic.rs +++ /dev/null @@ -1,15 +0,0 @@ -// check-pass -// #81395: Fix ICE when recursing into Deref target only differing in type args - -pub struct Generic(T); - -impl<'a> std::ops::Deref for Generic<&'a mut ()> { - type Target = Generic<&'a ()>; - fn deref(&self) -> &Self::Target { - unimplemented!() - } -} - -impl<'a> Generic<&'a ()> { - pub fn some_method(&self) {} -} diff --git a/src/test/rustdoc-ui/diagnostic-width.rs b/src/test/rustdoc-ui/diagnostic-width.rs deleted file mode 100644 index 290d9db77..000000000 --- a/src/test/rustdoc-ui/diagnostic-width.rs +++ /dev/null @@ -1,5 +0,0 @@ -// compile-flags: --diagnostic-width=10 -#![deny(rustdoc::bare_urls)] - -/// This is a long line that contains a http://link.com -pub struct Foo; //~^ ERROR diff --git a/src/test/rustdoc-ui/diagnostic-width.stderr b/src/test/rustdoc-ui/diagnostic-width.stderr deleted file mode 100644 index 1a00d10d3..000000000 --- a/src/test/rustdoc-ui/diagnostic-width.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: this URL is not a hyperlink - --> $DIR/diagnostic-width.rs:4:41 - | -LL | ... a http://link.com - | ^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links -note: the lint level is defined here - --> $DIR/diagnostic-width.rs:2:9 - | -LL | ...ny(rustdoc::bare_url... - | ^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/display-output.rs b/src/test/rustdoc-ui/display-output.rs deleted file mode 100644 index ec27a9f6b..000000000 --- a/src/test/rustdoc-ui/display-output.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Test that `--show-output` has an effect and `allow(unused)` can be overridden. - -// check-pass -// edition:2018 -// compile-flags:--test --test-args=--show-output -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" - -/// ``` -/// #![warn(unused)] -/// let x = 12; -/// -/// fn foo(x: &dyn std::fmt::Display) {} -/// ``` -pub fn foo() {} diff --git a/src/test/rustdoc-ui/display-output.stdout b/src/test/rustdoc-ui/display-output.stdout deleted file mode 100644 index ad25d1ce5..000000000 --- a/src/test/rustdoc-ui/display-output.stdout +++ /dev/null @@ -1,43 +0,0 @@ - -running 1 test -test $DIR/display-output.rs - foo (line 9) ... ok - -successes: - ----- $DIR/display-output.rs - foo (line 9) stdout ---- -warning: unused variable: `x` - --> $DIR/display-output.rs:11:5 - | -LL | let x = 12; - | ^ help: if this is intentional, prefix it with an underscore: `_x` - | -note: the lint level is defined here - --> $DIR/display-output.rs:9:9 - | -LL | #![warn(unused)] - | ^^^^^^ - = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` - -warning: unused variable: `x` - --> $DIR/display-output.rs:13:8 - | -LL | fn foo(x: &dyn std::fmt::Display) {} - | ^ help: if this is intentional, prefix it with an underscore: `_x` - -warning: function `foo` is never used - --> $DIR/display-output.rs:13:4 - | -LL | fn foo(x: &dyn std::fmt::Display) {} - | ^^^ - | - = note: `#[warn(dead_code)]` implied by `#[warn(unused)]` - -warning: 3 warnings emitted - - - -successes: - $DIR/display-output.rs - foo (line 9) - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/doc-alias-assoc-const.rs b/src/test/rustdoc-ui/doc-alias-assoc-const.rs deleted file mode 100644 index d95324734..000000000 --- a/src/test/rustdoc-ui/doc-alias-assoc-const.rs +++ /dev/null @@ -1,21 +0,0 @@ -#![feature(trait_alias)] - -pub struct Foo; - -pub trait Bar { - const BAZ: u8; -} - -impl Bar for Foo { - #[doc(alias = "CONST_BAZ")] //~ ERROR - const BAZ: u8 = 0; -} - -impl Foo { - #[doc(alias = "CONST_FOO")] // ok! - pub const FOO: u8 = 0; - - pub fn bar() -> u8 { - Self::FOO - } -} diff --git a/src/test/rustdoc-ui/doc-alias-assoc-const.stderr b/src/test/rustdoc-ui/doc-alias-assoc-const.stderr deleted file mode 100644 index cbca40e13..000000000 --- a/src/test/rustdoc-ui/doc-alias-assoc-const.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: `#[doc(alias = "...")]` isn't allowed on associated constant in trait implementation block - --> $DIR/doc-alias-assoc-const.rs:10:11 - | -LL | #[doc(alias = "CONST_BAZ")] - | ^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/doc-alias-crate-level.rs b/src/test/rustdoc-ui/doc-alias-crate-level.rs deleted file mode 100644 index 70618ac01..000000000 --- a/src/test/rustdoc-ui/doc-alias-crate-level.rs +++ /dev/null @@ -1,4 +0,0 @@ -#![doc(alias = "crate-level-not-working")] //~ ERROR - -#[doc(alias = "shouldn't work!")] //~ ERROR -pub fn foo() {} diff --git a/src/test/rustdoc-ui/doc-alias-crate-level.stderr b/src/test/rustdoc-ui/doc-alias-crate-level.stderr deleted file mode 100644 index fc8095e03..000000000 --- a/src/test/rustdoc-ui/doc-alias-crate-level.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: '\'' character isn't allowed in `#[doc(alias = "...")]` - --> $DIR/doc-alias-crate-level.rs:3:15 - | -LL | #[doc(alias = "shouldn't work!")] - | ^^^^^^^^^^^^^^^^^ - -error: `#![doc(alias = "...")]` isn't allowed as a crate-level attribute - --> $DIR/doc-alias-crate-level.rs:1:8 - | -LL | #![doc(alias = "crate-level-not-working")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/rustdoc-ui/doc-alias-same-name.rs b/src/test/rustdoc-ui/doc-alias-same-name.rs deleted file mode 100644 index da97c2676..000000000 --- a/src/test/rustdoc-ui/doc-alias-same-name.rs +++ /dev/null @@ -1,4 +0,0 @@ -#![crate_type = "lib"] - -#[doc(alias = "Foo")] //~ ERROR -pub struct Foo; diff --git a/src/test/rustdoc-ui/doc-alias-same-name.stderr b/src/test/rustdoc-ui/doc-alias-same-name.stderr deleted file mode 100644 index 5ba09a2ea..000000000 --- a/src/test/rustdoc-ui/doc-alias-same-name.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: `#[doc(alias = "...")]` is the same as the item's name - --> $DIR/doc-alias-same-name.rs:3:7 - | -LL | #[doc(alias = "Foo")] - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/doc-attr.rs b/src/test/rustdoc-ui/doc-attr.rs deleted file mode 100644 index 980d1c0e2..000000000 --- a/src/test/rustdoc-ui/doc-attr.rs +++ /dev/null @@ -1,25 +0,0 @@ -#![crate_type = "lib"] -#![deny(warnings)] -#![doc(as_ptr)] -//~^ ERROR unknown `doc` attribute -//~^^ WARN - -#[doc(as_ptr)] -//~^ ERROR unknown `doc` attribute -//~^^ WARN -pub fn foo() {} - -#[doc(123)] -//~^ ERROR invalid `doc` attribute -//~| WARN -#[doc("hello", "bar")] -//~^ ERROR invalid `doc` attribute -//~| WARN -//~| ERROR invalid `doc` attribute -//~| WARN -#[doc(foo::bar, crate::bar::baz = "bye")] -//~^ ERROR unknown `doc` attribute -//~| WARN -//~| ERROR unknown `doc` attribute -//~| WARN -fn bar() {} diff --git a/src/test/rustdoc-ui/doc-attr.stderr b/src/test/rustdoc-ui/doc-attr.stderr deleted file mode 100644 index 68df2771f..000000000 --- a/src/test/rustdoc-ui/doc-attr.stderr +++ /dev/null @@ -1,71 +0,0 @@ -error: unknown `doc` attribute `as_ptr` - --> $DIR/doc-attr.rs:7:7 - | -LL | #[doc(as_ptr)] - | ^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 -note: the lint level is defined here - --> $DIR/doc-attr.rs:2:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]` - -error: invalid `doc` attribute - --> $DIR/doc-attr.rs:12:7 - | -LL | #[doc(123)] - | ^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: invalid `doc` attribute - --> $DIR/doc-attr.rs:15:7 - | -LL | #[doc("hello", "bar")] - | ^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: invalid `doc` attribute - --> $DIR/doc-attr.rs:15:16 - | -LL | #[doc("hello", "bar")] - | ^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: unknown `doc` attribute `foo::bar` - --> $DIR/doc-attr.rs:20:7 - | -LL | #[doc(foo::bar, crate::bar::baz = "bye")] - | ^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: unknown `doc` attribute `crate::bar::baz` - --> $DIR/doc-attr.rs:20:17 - | -LL | #[doc(foo::bar, crate::bar::baz = "bye")] - | ^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: unknown `doc` attribute `as_ptr` - --> $DIR/doc-attr.rs:3:8 - | -LL | #![doc(as_ptr)] - | ^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: aborting due to 7 previous errors - diff --git a/src/test/rustdoc-ui/doc-cfg.rs b/src/test/rustdoc-ui/doc-cfg.rs deleted file mode 100644 index 354d76bc3..000000000 --- a/src/test/rustdoc-ui/doc-cfg.rs +++ /dev/null @@ -1,9 +0,0 @@ -#![feature(doc_cfg)] - -#[doc(cfg(), cfg(foo, bar))] -//~^ ERROR -//~^^ ERROR -#[doc(cfg(foo), cfg(bar))] // ok! -#[doc(cfg())] //~ ERROR -#[doc(cfg(foo, bar))] //~ ERROR -pub fn foo() {} diff --git a/src/test/rustdoc-ui/doc-cfg.stderr b/src/test/rustdoc-ui/doc-cfg.stderr deleted file mode 100644 index b379f6feb..000000000 --- a/src/test/rustdoc-ui/doc-cfg.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: `cfg` predicate is not specified - --> $DIR/doc-cfg.rs:3:7 - | -LL | #[doc(cfg(), cfg(foo, bar))] - | ^^^^^ - -error: multiple `cfg` predicates are specified - --> $DIR/doc-cfg.rs:3:23 - | -LL | #[doc(cfg(), cfg(foo, bar))] - | ^^^ - -error: `cfg` predicate is not specified - --> $DIR/doc-cfg.rs:7:7 - | -LL | #[doc(cfg())] - | ^^^^^ - -error: multiple `cfg` predicates are specified - --> $DIR/doc-cfg.rs:8:16 - | -LL | #[doc(cfg(foo, bar))] - | ^^^ - -error: aborting due to 4 previous errors - diff --git a/src/test/rustdoc-ui/doc-comment-multi-line-attr.rs b/src/test/rustdoc-ui/doc-comment-multi-line-attr.rs deleted file mode 100644 index 97259f782..000000000 --- a/src/test/rustdoc-ui/doc-comment-multi-line-attr.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Regression test for #97440: Multiline inner attribute triggers ICE during doctest -// compile-flags:--test -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// check-pass - -//! ```rust -//! #![deny( -//! unused_parens, -//! )] -//! ``` diff --git a/src/test/rustdoc-ui/doc-comment-multi-line-attr.stdout b/src/test/rustdoc-ui/doc-comment-multi-line-attr.stdout deleted file mode 100644 index e47edbd2a..000000000 --- a/src/test/rustdoc-ui/doc-comment-multi-line-attr.stdout +++ /dev/null @@ -1,6 +0,0 @@ - -running 1 test -test $DIR/doc-comment-multi-line-attr.rs - (line 7) ... ok - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs b/src/test/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs deleted file mode 100644 index b2a8133c9..000000000 --- a/src/test/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs +++ /dev/null @@ -1,12 +0,0 @@ -// compile-flags:--test -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// check-pass - -/// ``` -/// # #![cfg_attr(not(dox), deny(missing_abi, -/// # non_ascii_idents))] -/// -/// pub struct Bar; -/// ``` -pub struct Bar; diff --git a/src/test/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout b/src/test/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout deleted file mode 100644 index bf3521e4f..000000000 --- a/src/test/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout +++ /dev/null @@ -1,6 +0,0 @@ - -running 1 test -test $DIR/doc-comment-multi-line-cfg-attr.rs - Bar (line 6) ... ok - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/doc-include-suggestion.rs b/src/test/rustdoc-ui/doc-include-suggestion.rs deleted file mode 100644 index 0c0100735..000000000 --- a/src/test/rustdoc-ui/doc-include-suggestion.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass - -#[doc(include = "external-cross-doc.md")] -//~^ WARNING unknown `doc` attribute `include` -//~| HELP use `doc = include_str!` instead -// FIXME(#85497): make this a deny instead so it's more clear what's happening -//~| NOTE on by default -//~| WARNING previously accepted -//~| NOTE see issue #82730 -pub struct NeedMoreDocs; diff --git a/src/test/rustdoc-ui/doc-include-suggestion.stderr b/src/test/rustdoc-ui/doc-include-suggestion.stderr deleted file mode 100644 index fcc93d053..000000000 --- a/src/test/rustdoc-ui/doc-include-suggestion.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: unknown `doc` attribute `include` - --> $DIR/doc-include-suggestion.rs:3:7 - | -LL | #[doc(include = "external-cross-doc.md")] - | ------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-- help: use `doc = include_str!` instead: `#[doc = include_str!("external-cross-doc.md")]` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: `#[warn(invalid_doc_attributes)]` on by default - -warning: 1 warning emitted - diff --git a/src/test/rustdoc-ui/doc-spotlight.fixed b/src/test/rustdoc-ui/doc-spotlight.fixed deleted file mode 100644 index 4b58778ea..000000000 --- a/src/test/rustdoc-ui/doc-spotlight.fixed +++ /dev/null @@ -1,8 +0,0 @@ -// run-rustfix -#![deny(warnings)] -#![feature(doc_notable_trait)] - -#[doc(notable_trait)] -//~^ ERROR unknown `doc` attribute `spotlight` -//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! -trait MyTrait {} diff --git a/src/test/rustdoc-ui/doc-spotlight.rs b/src/test/rustdoc-ui/doc-spotlight.rs deleted file mode 100644 index 16e387245..000000000 --- a/src/test/rustdoc-ui/doc-spotlight.rs +++ /dev/null @@ -1,8 +0,0 @@ -// run-rustfix -#![deny(warnings)] -#![feature(doc_notable_trait)] - -#[doc(spotlight)] -//~^ ERROR unknown `doc` attribute `spotlight` -//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! -trait MyTrait {} diff --git a/src/test/rustdoc-ui/doc-spotlight.stderr b/src/test/rustdoc-ui/doc-spotlight.stderr deleted file mode 100644 index 58612327f..000000000 --- a/src/test/rustdoc-ui/doc-spotlight.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error: unknown `doc` attribute `spotlight` - --> $DIR/doc-spotlight.rs:5:7 - | -LL | #[doc(spotlight)] - | ^^^^^^^^^ help: use `notable_trait` instead - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: `doc(spotlight)` was renamed to `doc(notable_trait)` - = note: `doc(spotlight)` is now a no-op -note: the lint level is defined here - --> $DIR/doc-spotlight.rs:2:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]` - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/doc-test-attr-pass.rs b/src/test/rustdoc-ui/doc-test-attr-pass.rs deleted file mode 100644 index 12608f244..000000000 --- a/src/test/rustdoc-ui/doc-test-attr-pass.rs +++ /dev/null @@ -1,8 +0,0 @@ -// check-pass - -#![crate_type = "lib"] -#![deny(invalid_doc_attributes)] -#![doc(test(no_crate_inject))] -#![doc(test(attr(deny(warnings))))] - -pub fn foo() {} diff --git a/src/test/rustdoc-ui/doc-test-attr.rs b/src/test/rustdoc-ui/doc-test-attr.rs deleted file mode 100644 index 46178ad86..000000000 --- a/src/test/rustdoc-ui/doc-test-attr.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![crate_type = "lib"] -#![deny(invalid_doc_attributes)] - -#![doc(test)] -//~^ ERROR `#[doc(test(...)]` takes a list of attributes -//~^^ WARN this was previously accepted by the compiler -#![doc(test = "hello")] -//~^ ERROR `#[doc(test(...)]` takes a list of attributes -//~^^ WARN this was previously accepted by the compiler -#![doc(test(a))] -//~^ ERROR unknown `doc(test)` attribute `a` -//~^^ WARN this was previously accepted by the compiler - -pub fn foo() {} diff --git a/src/test/rustdoc-ui/doc-test-attr.stderr b/src/test/rustdoc-ui/doc-test-attr.stderr deleted file mode 100644 index 5e6014954..000000000 --- a/src/test/rustdoc-ui/doc-test-attr.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error: `#[doc(test(...)]` takes a list of attributes - --> $DIR/doc-test-attr.rs:4:8 - | -LL | #![doc(test)] - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 -note: the lint level is defined here - --> $DIR/doc-test-attr.rs:2:9 - | -LL | #![deny(invalid_doc_attributes)] - | ^^^^^^^^^^^^^^^^^^^^^^ - -error: `#[doc(test(...)]` takes a list of attributes - --> $DIR/doc-test-attr.rs:7:8 - | -LL | #![doc(test = "hello")] - | ^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: unknown `doc(test)` attribute `a` - --> $DIR/doc-test-attr.rs:10:13 - | -LL | #![doc(test(a))] - | ^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: aborting due to 3 previous errors - diff --git a/src/test/rustdoc-ui/doc-test-doctest-feature.rs b/src/test/rustdoc-ui/doc-test-doctest-feature.rs deleted file mode 100644 index 0b79aaece..000000000 --- a/src/test/rustdoc-ui/doc-test-doctest-feature.rs +++ /dev/null @@ -1,13 +0,0 @@ -// check-pass -// compile-flags:--test -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" - -// Make sure `cfg(doctest)` is set when finding doctests but not inside -// the doctests. - -/// ``` -/// assert!(!cfg!(doctest)); -/// ``` -#[cfg(doctest)] -pub struct Foo; diff --git a/src/test/rustdoc-ui/doc-test-doctest-feature.stdout b/src/test/rustdoc-ui/doc-test-doctest-feature.stdout deleted file mode 100644 index d7de1f105..000000000 --- a/src/test/rustdoc-ui/doc-test-doctest-feature.stdout +++ /dev/null @@ -1,6 +0,0 @@ - -running 1 test -test $DIR/doc-test-doctest-feature.rs - Foo (line 9) ... ok - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/doc-test-rustdoc-feature.rs b/src/test/rustdoc-ui/doc-test-rustdoc-feature.rs deleted file mode 100644 index bf334c67e..000000000 --- a/src/test/rustdoc-ui/doc-test-rustdoc-feature.rs +++ /dev/null @@ -1,15 +0,0 @@ -// check-pass -// compile-flags:--test -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" - -#![feature(doc_cfg)] - -// Make sure `cfg(doc)` is set when finding doctests but not inside the doctests. - -/// ``` -/// #![feature(doc_cfg)] -/// assert!(!cfg!(doc)); -/// ``` -#[cfg(doc)] -pub struct Foo; diff --git a/src/test/rustdoc-ui/doc-test-rustdoc-feature.stdout b/src/test/rustdoc-ui/doc-test-rustdoc-feature.stdout deleted file mode 100644 index 5b07fc4c8..000000000 --- a/src/test/rustdoc-ui/doc-test-rustdoc-feature.stdout +++ /dev/null @@ -1,6 +0,0 @@ - -running 1 test -test $DIR/doc-test-rustdoc-feature.rs - Foo (line 10) ... ok - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/doc-without-codeblock.rs b/src/test/rustdoc-ui/doc-without-codeblock.rs deleted file mode 100644 index 86d7c83d3..000000000 --- a/src/test/rustdoc-ui/doc-without-codeblock.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![feature(rustdoc_missing_doc_code_examples)] //~ ERROR missing code example in this documentation -#![deny(rustdoc::missing_doc_code_examples)] - -/// Some docs. -//~^ ERROR missing code example in this documentation -pub struct Foo; - -/// And then, the princess died. -//~^ ERROR missing code example in this documentation -pub mod foo { - /// Or maybe not because she saved herself! - //~^ ERROR missing code example in this documentation - pub fn bar() {} -} - -// This impl is here to ensure the lint isn't emitted for foreign traits implementations. -impl std::ops::Neg for Foo { - type Output = Self; - - fn neg(self) -> Self::Output { - Self - } -} diff --git a/src/test/rustdoc-ui/doc-without-codeblock.stderr b/src/test/rustdoc-ui/doc-without-codeblock.stderr deleted file mode 100644 index ebf2a2d54..000000000 --- a/src/test/rustdoc-ui/doc-without-codeblock.stderr +++ /dev/null @@ -1,38 +0,0 @@ -error: missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:1:1 - | -LL | / #![feature(rustdoc_missing_doc_code_examples)] -LL | | #![deny(rustdoc::missing_doc_code_examples)] -LL | | -LL | | /// Some docs. -... | -LL | | } -LL | | } - | |_^ - | -note: the lint level is defined here - --> $DIR/doc-without-codeblock.rs:2:9 - | -LL | #![deny(rustdoc::missing_doc_code_examples)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:8:1 - | -LL | /// And then, the princess died. - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:11:5 - | -LL | /// Or maybe not because she saved herself! - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:4:1 - | -LL | /// Some docs. - | ^^^^^^^^^^^^^^ - -error: aborting due to 4 previous errors - diff --git a/src/test/rustdoc-ui/doc_cfg_hide.rs b/src/test/rustdoc-ui/doc_cfg_hide.rs deleted file mode 100644 index 5d8791748..000000000 --- a/src/test/rustdoc-ui/doc_cfg_hide.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![feature(doc_cfg_hide)] -#![deny(warnings)] - -#![doc(cfg_hide = "test")] //~ ERROR -//~^ WARN -#![doc(cfg_hide)] //~ ERROR -//~^ WARN - -#[doc(cfg_hide(doc))] //~ ERROR -//~^ WARN -pub fn foo() {} diff --git a/src/test/rustdoc-ui/doc_cfg_hide.stderr b/src/test/rustdoc-ui/doc_cfg_hide.stderr deleted file mode 100644 index 03623368c..000000000 --- a/src/test/rustdoc-ui/doc_cfg_hide.stderr +++ /dev/null @@ -1,40 +0,0 @@ -error: this attribute can only be applied at the crate level - --> $DIR/doc_cfg_hide.rs:9:7 - | -LL | #[doc(cfg_hide(doc))] - | ^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information -note: the lint level is defined here - --> $DIR/doc_cfg_hide.rs:2:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]` -help: to apply to the crate, use an inner attribute - | -LL | #![doc(cfg_hide(doc))] - | ~~~~~~~~~~~~~~~~~~~~~~ - -error: `#[doc(cfg_hide(...)]` takes a list of attributes - --> $DIR/doc_cfg_hide.rs:4:8 - | -LL | #![doc(cfg_hide = "test")] - | ^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: `#[doc(cfg_hide(...)]` takes a list of attributes - --> $DIR/doc_cfg_hide.rs:6:8 - | -LL | #![doc(cfg_hide)] - | ^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: aborting due to 3 previous errors - diff --git a/src/test/rustdoc-ui/doctest-edition.rs b/src/test/rustdoc-ui/doctest-edition.rs deleted file mode 100644 index b0787be97..000000000 --- a/src/test/rustdoc-ui/doctest-edition.rs +++ /dev/null @@ -1,16 +0,0 @@ -// edition:2021 - -#![deny(rustdoc::invalid_rust_codeblocks)] -//~^ NOTE lint level is defined here - -// By default, rustdoc should use the edition of the crate. -//! ``` -//! foo'b' -//! ``` -//~^^^ ERROR could not parse -//~| NOTE prefix `foo` is unknown - -// Rustdoc should respect `edition2018` when highlighting syntax. -//! ```edition2018 -//! foo'b' -//! ``` diff --git a/src/test/rustdoc-ui/doctest-edition.stderr b/src/test/rustdoc-ui/doctest-edition.stderr deleted file mode 100644 index 8a3329aa3..000000000 --- a/src/test/rustdoc-ui/doctest-edition.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: could not parse code block as Rust code - --> $DIR/doctest-edition.rs:7:5 - | -LL | //! ``` - | _____^ -LL | | //! foo'b' -LL | | //! ``` - | |_______^ - | - = note: error from rustc: prefix `foo` is unknown -note: the lint level is defined here - --> $DIR/doctest-edition.rs:3:9 - | -LL | #![deny(rustdoc::invalid_rust_codeblocks)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: mark blocks that do not contain Rust code as text - | -LL | //! ```text - | ++++ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/doctest-multiline-crate-attribute.rs b/src/test/rustdoc-ui/doctest-multiline-crate-attribute.rs deleted file mode 100644 index a30472ac5..000000000 --- a/src/test/rustdoc-ui/doctest-multiline-crate-attribute.rs +++ /dev/null @@ -1,10 +0,0 @@ -// compile-flags:--test --test-args=--test-threads=1 -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// check-pass - -/// ``` -/// #![deprecated(since = "5.2", note = "foo was rarely used. \ -/// Users should instead use bar")] -/// ``` -pub fn f() {} diff --git a/src/test/rustdoc-ui/doctest-multiline-crate-attribute.stdout b/src/test/rustdoc-ui/doctest-multiline-crate-attribute.stdout deleted file mode 100644 index 07a4f657d..000000000 --- a/src/test/rustdoc-ui/doctest-multiline-crate-attribute.stdout +++ /dev/null @@ -1,6 +0,0 @@ - -running 1 test -test $DIR/doctest-multiline-crate-attribute.rs - f (line 6) ... ok - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/doctest-output.rs b/src/test/rustdoc-ui/doctest-output.rs deleted file mode 100644 index 2670fa572..000000000 --- a/src/test/rustdoc-ui/doctest-output.rs +++ /dev/null @@ -1,28 +0,0 @@ -// edition:2018 -// aux-build:extern_macros.rs -// compile-flags:--test --test-args=--test-threads=1 -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// check-pass - -//! ``` -//! assert_eq!(1 + 1, 2); -//! ``` - -extern crate extern_macros as macros; - -use macros::attrs_on_struct; - -pub mod foo { - - /// ``` - /// assert_eq!(1 + 1, 2); - /// ``` - pub fn bar() {} -} - -attrs_on_struct! { - /// ``` - /// assert!(true); - /// ``` -} diff --git a/src/test/rustdoc-ui/doctest-output.stdout b/src/test/rustdoc-ui/doctest-output.stdout deleted file mode 100644 index 35b0e366f..000000000 --- a/src/test/rustdoc-ui/doctest-output.stdout +++ /dev/null @@ -1,8 +0,0 @@ - -running 3 tests -test $DIR/doctest-output.rs - (line 8) ... ok -test $DIR/doctest-output.rs - ExpandedStruct (line 24) ... ok -test $DIR/doctest-output.rs - foo::bar (line 18) ... ok - -test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/error-in-impl-trait/README.md b/src/test/rustdoc-ui/error-in-impl-trait/README.md deleted file mode 100644 index 1176a4a8c..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Each of these needs to be in a separate file, -because the `delay_span_bug` ICE in rustdoc won't be triggerred -if even a single other error was emitted. - -However, conceptually they are all testing basically the same thing. -See https://github.com/rust-lang/rust/pull/73566#issuecomment-653689128 -for more details. diff --git a/src/test/rustdoc-ui/error-in-impl-trait/async.rs b/src/test/rustdoc-ui/error-in-impl-trait/async.rs deleted file mode 100644 index cda53bff0..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/async.rs +++ /dev/null @@ -1,7 +0,0 @@ -// edition:2018 -// check-pass - -/// Should compile fine -pub async fn a() -> u32 { - error::_in::async_fn() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/closure.rs b/src/test/rustdoc-ui/error-in-impl-trait/closure.rs deleted file mode 100644 index f1fd85bb2..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/closure.rs +++ /dev/null @@ -1,5 +0,0 @@ -// check-pass -// manually desugared version of an `async fn` (but with a closure instead of a generator) -pub fn a() -> impl Fn() -> u32 { - || content::doesnt::matter() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs b/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs deleted file mode 100644 index ed62f0208..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs +++ /dev/null @@ -1,23 +0,0 @@ -// check-pass -// edition:2018 -trait ValidTrait {} - -/// This has docs -pub fn extern_fn() -> impl Iterator { - loop {} -} - -pub trait Trait {} -impl Trait<1> for u8 {} -impl Trait<2> for u8 {} -impl Trait for [u8; N] {} - -/// This also has docs -pub fn test() -> impl Trait where u8: Trait { - loop {} -} - -/// Document all the functions -pub async fn a_sink(v: [u8; N]) -> impl Trait { - loop {} -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/generic-argument.rs b/src/test/rustdoc-ui/error-in-impl-trait/generic-argument.rs deleted file mode 100644 index dcec379d4..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/generic-argument.rs +++ /dev/null @@ -1,7 +0,0 @@ -// check-pass -trait ValidTrait {} - -/// This has docs -pub fn f() -> impl ValidTrait { - Vec::::new() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs b/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs deleted file mode 100644 index b935b0832..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs +++ /dev/null @@ -1,6 +0,0 @@ -// check-pass -pub trait ValidTrait {} -/// This returns impl trait -pub fn g() -> impl ValidTrait { - (|| error::_in::impl_trait::alias::nested::closure())() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword.rs b/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword.rs deleted file mode 100644 index 701126f87..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword.rs +++ /dev/null @@ -1,6 +0,0 @@ -// check-pass -pub trait ValidTrait {} -/// This returns impl trait -pub fn g() -> impl ValidTrait { - error::_in::impl_trait() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs b/src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs deleted file mode 100644 index 248575d35..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs +++ /dev/null @@ -1,28 +0,0 @@ -// edition:2018 -// check-pass - -mod windows { - pub trait WinFoo { - fn foo(&self) {} - } - - impl WinFoo for () {} -} - -#[cfg(any(windows, doc))] -use windows::*; - -mod unix { - pub trait UnixFoo { - fn foo(&self) {} - } - - impl UnixFoo for () {} -} - -#[cfg(any(unix, doc))] -use unix::*; - -async fn bar() { - ().foo() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs b/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs deleted file mode 100644 index 31dd786cb..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass -#![feature(type_alias_impl_trait)] - -pub trait ValidTrait {} -type ImplTrait = impl ValidTrait; - -/// This returns impl trait, but using a type alias -pub fn h() -> ImplTrait { - (|| error::_in::impl_trait::alias::nested::closure())() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs b/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs deleted file mode 100644 index c18a024af..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass -#![feature(type_alias_impl_trait)] - -pub trait ValidTrait {} -type ImplTrait = impl ValidTrait; - -/// This returns impl trait, but using a type alias -pub fn h() -> ImplTrait { - error::_in::impl_trait::alias() -} diff --git a/src/test/rustdoc-ui/expect-tool-lint-rfc-2383.rs b/src/test/rustdoc-ui/expect-tool-lint-rfc-2383.rs deleted file mode 100644 index 0901ac364..000000000 --- a/src/test/rustdoc-ui/expect-tool-lint-rfc-2383.rs +++ /dev/null @@ -1,157 +0,0 @@ -// check-pass -#![feature(lint_reasons)] - -//! This file tests the `#[expect]` attribute implementation for tool lints. The same -//! file is used to test clippy and rustdoc. Any changes to this file should be synced -//! to the other test files as well. -//! -//! Expectations: -//! * rustc: only rustc lint expectations are emitted -//! * clippy: rustc and Clippy's expectations are emitted -//! * rustdoc: only rustdoc lint expectations are emitted -//! -//! This test can't cover every lint from Clippy, rustdoc and potentially other -//! tools that will be developed. This therefore only tests a small subset of lints - -#![expect(rustdoc::missing_crate_level_docs)] -//~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations] -//~| NOTE `#[warn(unfulfilled_lint_expectations)]` on by default - -mod rustc_ok { - //! See - - #[expect(dead_code)] - pub fn rustc_lints() { - let x = 42.0; - - #[expect(illegal_floating_point_literal_pattern)] - match x { - 5.0 => {} - 6.0 => {} - _ => {} - } - } -} - -mod rustc_warn { - //! See - - #[expect(dead_code)] - pub fn rustc_lints() { - let x = 42; - - #[expect(illegal_floating_point_literal_pattern)] - match x { - 5 => {} - 6 => {} - _ => {} - } - } -} - -pub mod rustdoc_ok { - //! See - - #[expect(rustdoc::broken_intra_doc_links)] - /// I want to link to [`Nonexistent`] but it doesn't exist! - pub fn foo() {} - - #[expect(rustdoc::invalid_html_tags)] - ///

- pub fn bar() {} - - #[expect(rustdoc::bare_urls)] - /// http://example.org - pub fn baz() {} -} - -pub mod rustdoc_warn { - //! See - - #[expect(rustdoc::broken_intra_doc_links)] - //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations] - /// I want to link to [`bar`] but it doesn't exist! - pub fn foo() {} - - #[expect(rustdoc::invalid_html_tags)] - //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations] - ///

- pub fn bar() {} - - #[expect(rustdoc::bare_urls)] - //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations] - /// - pub fn baz() {} -} - -mod clippy_ok { - //! See - - #[expect(clippy::almost_swapped)] - fn foo() { - let mut a = 0; - let mut b = 9; - a = b; - b = a; - } - - #[expect(clippy::bytes_nth)] - fn bar() { - let _ = "Hello".bytes().nth(3); - } - - #[expect(clippy::if_same_then_else)] - fn baz() { - let _ = if true { - 42 - } else { - 42 - }; - } - - #[expect(clippy::logic_bug)] - fn burger() { - let a = false; - let b = true; - - if a && b || a {} - } -} - -mod clippy_warn { - //! See - - #[expect(clippy::almost_swapped)] - fn foo() { - let mut a = 0; - let mut b = 9; - a = b; - } - - #[expect(clippy::bytes_nth)] - fn bar() { - let _ = "Hello".as_bytes().get(3); - } - - #[expect(clippy::if_same_then_else)] - fn baz() { - let _ = if true { - 33 - } else { - 42 - }; - } - - #[expect(clippy::logic_bug)] - fn burger() { - let a = false; - let b = true; - let c = false; - - if a && b || c {} - } -} - -fn main() { - rustc_warn::rustc_lints(); -} diff --git a/src/test/rustdoc-ui/expect-tool-lint-rfc-2383.stderr b/src/test/rustdoc-ui/expect-tool-lint-rfc-2383.stderr deleted file mode 100644 index efc5f349f..000000000 --- a/src/test/rustdoc-ui/expect-tool-lint-rfc-2383.stderr +++ /dev/null @@ -1,28 +0,0 @@ -warning: this lint expectation is unfulfilled - --> $DIR/expect-tool-lint-rfc-2383.rs:16:11 - | -LL | #![expect(rustdoc::missing_crate_level_docs)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(unfulfilled_lint_expectations)]` on by default - -warning: this lint expectation is unfulfilled - --> $DIR/expect-tool-lint-rfc-2383.rs:71:14 - | -LL | #[expect(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: this lint expectation is unfulfilled - --> $DIR/expect-tool-lint-rfc-2383.rs:76:14 - | -LL | #[expect(rustdoc::invalid_html_tags)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: this lint expectation is unfulfilled - --> $DIR/expect-tool-lint-rfc-2383.rs:81:14 - | -LL | #[expect(rustdoc::bare_urls)] - | ^^^^^^^^^^^^^^^^^^ - -warning: 4 warnings emitted - diff --git a/src/test/rustdoc-ui/failed-doctest-compile-fail.rs b/src/test/rustdoc-ui/failed-doctest-compile-fail.rs deleted file mode 100644 index 6f2ff5d70..000000000 --- a/src/test/rustdoc-ui/failed-doctest-compile-fail.rs +++ /dev/null @@ -1,12 +0,0 @@ -// FIXME: if/when the output of the test harness can be tested on its own, this test should be -// adapted to use that, and that normalize line can go away - -// compile-flags:--test -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 - -/// ```compile_fail -/// println!("Hello"); -/// ``` -pub struct Foo; diff --git a/src/test/rustdoc-ui/failed-doctest-compile-fail.stdout b/src/test/rustdoc-ui/failed-doctest-compile-fail.stdout deleted file mode 100644 index af3a90a74..000000000 --- a/src/test/rustdoc-ui/failed-doctest-compile-fail.stdout +++ /dev/null @@ -1,14 +0,0 @@ - -running 1 test -test $DIR/failed-doctest-compile-fail.rs - Foo (line 9) - compile fail ... FAILED - -failures: - ----- $DIR/failed-doctest-compile-fail.rs - Foo (line 9) stdout ---- -Test compiled successfully, but it's marked `compile_fail`. - -failures: - $DIR/failed-doctest-compile-fail.rs - Foo (line 9) - -test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs b/src/test/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs deleted file mode 100644 index 16d737106..000000000 --- a/src/test/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs +++ /dev/null @@ -1,18 +0,0 @@ -// FIXME: if/when the output of the test harness can be tested on its own, this test should be -// adapted to use that, and that normalize line can go away - -// compile-flags:--test -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 - -/// -/// -/// ```rust -/// struct S {}; // unexpected semicolon after struct def -/// -/// fn main() { -/// assert_eq!(0, 1); -/// } -/// ``` -mod m {} diff --git a/src/test/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout b/src/test/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout deleted file mode 100644 index 61468b6c7..000000000 --- a/src/test/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout +++ /dev/null @@ -1,24 +0,0 @@ - -running 1 test -test $DIR/failed-doctest-extra-semicolon-on-item.rs - m (line 11) ... FAILED - -failures: - ----- $DIR/failed-doctest-extra-semicolon-on-item.rs - m (line 11) stdout ---- -error: expected item, found `;` - --> $DIR/failed-doctest-extra-semicolon-on-item.rs:12:12 - | -LL | struct S {}; // unexpected semicolon after struct def - | ^ help: remove this semicolon - | - = help: braced struct declarations are not followed by a semicolon - -error: aborting due to previous error - -Couldn't compile the test. - -failures: - $DIR/failed-doctest-extra-semicolon-on-item.rs - m (line 11) - -test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/failed-doctest-missing-codes.rs b/src/test/rustdoc-ui/failed-doctest-missing-codes.rs deleted file mode 100644 index 57b70b478..000000000 --- a/src/test/rustdoc-ui/failed-doctest-missing-codes.rs +++ /dev/null @@ -1,12 +0,0 @@ -// FIXME: if/when the output of the test harness can be tested on its own, this test should be -// adapted to use that, and that normalize line can go away - -// compile-flags:--test -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 - -/// ```compile_fail,E0004 -/// let x: () = 5i32; -/// ``` -pub struct Foo; diff --git a/src/test/rustdoc-ui/failed-doctest-missing-codes.stdout b/src/test/rustdoc-ui/failed-doctest-missing-codes.stdout deleted file mode 100644 index bacbb47b5..000000000 --- a/src/test/rustdoc-ui/failed-doctest-missing-codes.stdout +++ /dev/null @@ -1,25 +0,0 @@ - -running 1 test -test $DIR/failed-doctest-missing-codes.rs - Foo (line 9) - compile fail ... FAILED - -failures: - ----- $DIR/failed-doctest-missing-codes.rs - Foo (line 9) stdout ---- -error[E0308]: mismatched types - --> $DIR/failed-doctest-missing-codes.rs:10:13 - | -LL | let x: () = 5i32; - | -- ^^^^ expected `()`, found `i32` - | | - | expected due to this - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0308`. -Some expected error codes were not found: ["E0004"] - -failures: - $DIR/failed-doctest-missing-codes.rs - Foo (line 9) - -test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/failed-doctest-output-windows.rs b/src/test/rustdoc-ui/failed-doctest-output-windows.rs deleted file mode 100644 index 4cd9993d8..000000000 --- a/src/test/rustdoc-ui/failed-doctest-output-windows.rs +++ /dev/null @@ -1,28 +0,0 @@ -// only-windows -// There's a parallel generic version of this test for non-windows platforms. - -// Issue #51162: A failed doctest was not printing its stdout/stderr -// FIXME: if/when the output of the test harness can be tested on its own, this test should be -// adapted to use that, and that normalize line can go away - -// compile-flags:--test --test-args --test-threads=1 -// rustc-env:RUST_BACKTRACE=0 -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 - -// doctest fails at runtime -/// ``` -/// println!("stdout 1"); -/// eprintln!("stderr 1"); -/// println!("stdout 2"); -/// eprintln!("stderr 2"); -/// panic!("oh no"); -/// ``` -pub struct SomeStruct; - -// doctest fails at compile time -/// ``` -/// no -/// ``` -pub struct OtherStruct; diff --git a/src/test/rustdoc-ui/failed-doctest-output-windows.stdout b/src/test/rustdoc-ui/failed-doctest-output-windows.stdout deleted file mode 100644 index 6c147054d..000000000 --- a/src/test/rustdoc-ui/failed-doctest-output-windows.stdout +++ /dev/null @@ -1,39 +0,0 @@ - -running 2 tests -test $DIR/failed-doctest-output-windows.rs - OtherStruct (line 25) ... FAILED -test $DIR/failed-doctest-output-windows.rs - SomeStruct (line 15) ... FAILED - -failures: - ----- $DIR/failed-doctest-output-windows.rs - OtherStruct (line 25) stdout ---- -error[E0425]: cannot find value `no` in this scope - --> $DIR/failed-doctest-output-windows.rs:26:1 - | -LL | no - | ^^ not found in this scope - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0425`. -Couldn't compile the test. ----- $DIR/failed-doctest-output-windows.rs - SomeStruct (line 15) stdout ---- -Test executable failed (exit code: 101). - -stdout: -stdout 1 -stdout 2 - -stderr: -stderr 1 -stderr 2 -thread 'main' panicked at 'oh no', $DIR/failed-doctest-output-windows.rs:7:1 -note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace - - - -failures: - $DIR/failed-doctest-output-windows.rs - OtherStruct (line 25) - $DIR/failed-doctest-output-windows.rs - SomeStruct (line 15) - -test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/failed-doctest-output.rs b/src/test/rustdoc-ui/failed-doctest-output.rs deleted file mode 100644 index 42de954d0..000000000 --- a/src/test/rustdoc-ui/failed-doctest-output.rs +++ /dev/null @@ -1,28 +0,0 @@ -// ignore-windows -// There's a parallel version of this test for Windows. - -// Issue #51162: A failed doctest was not printing its stdout/stderr -// FIXME: if/when the output of the test harness can be tested on its own, this test should be -// adapted to use that, and that normalize line can go away - -// compile-flags:--test --test-args --test-threads=1 -// rustc-env:RUST_BACKTRACE=0 -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 - -// doctest fails at runtime -/// ``` -/// println!("stdout 1"); -/// eprintln!("stderr 1"); -/// println!("stdout 2"); -/// eprintln!("stderr 2"); -/// panic!("oh no"); -/// ``` -pub struct SomeStruct; - -// doctest fails at compile time -/// ``` -/// no -/// ``` -pub struct OtherStruct; diff --git a/src/test/rustdoc-ui/failed-doctest-output.stdout b/src/test/rustdoc-ui/failed-doctest-output.stdout deleted file mode 100644 index 630198a56..000000000 --- a/src/test/rustdoc-ui/failed-doctest-output.stdout +++ /dev/null @@ -1,39 +0,0 @@ - -running 2 tests -test $DIR/failed-doctest-output.rs - OtherStruct (line 25) ... FAILED -test $DIR/failed-doctest-output.rs - SomeStruct (line 15) ... FAILED - -failures: - ----- $DIR/failed-doctest-output.rs - OtherStruct (line 25) stdout ---- -error[E0425]: cannot find value `no` in this scope - --> $DIR/failed-doctest-output.rs:26:1 - | -LL | no - | ^^ not found in this scope - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0425`. -Couldn't compile the test. ----- $DIR/failed-doctest-output.rs - SomeStruct (line 15) stdout ---- -Test executable failed (exit status: 101). - -stdout: -stdout 1 -stdout 2 - -stderr: -stderr 1 -stderr 2 -thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:7:1 -note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace - - - -failures: - $DIR/failed-doctest-output.rs - OtherStruct (line 25) - $DIR/failed-doctest-output.rs - SomeStruct (line 15) - -test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/failed-doctest-should-panic.rs b/src/test/rustdoc-ui/failed-doctest-should-panic.rs deleted file mode 100644 index 2b8bb3168..000000000 --- a/src/test/rustdoc-ui/failed-doctest-should-panic.rs +++ /dev/null @@ -1,12 +0,0 @@ -// FIXME: if/when the output of the test harness can be tested on its own, this test should be -// adapted to use that, and that normalize line can go away - -// compile-flags:--test -// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 - -/// ```should_panic -/// println!("Hello, world!"); -/// ``` -pub struct Foo; diff --git a/src/test/rustdoc-ui/failed-doctest-should-panic.stdout b/src/test/rustdoc-ui/failed-doctest-should-panic.stdout deleted file mode 100644 index 57a20092a..000000000 --- a/src/test/rustdoc-ui/failed-doctest-should-panic.stdout +++ /dev/null @@ -1,14 +0,0 @@ - -running 1 test -test $DIR/failed-doctest-should-panic.rs - Foo (line 9) ... FAILED - -failures: - ----- $DIR/failed-doctest-should-panic.rs - Foo (line 9) stdout ---- -Test executable succeeded, but it's marked `should_panic`. - -failures: - $DIR/failed-doctest-should-panic.rs - Foo (line 9) - -test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME - diff --git a/src/test/rustdoc-ui/feature-gate-doc_cfg_hide.rs b/src/test/rustdoc-ui/feature-gate-doc_cfg_hide.rs deleted file mode 100644 index 17812018b..000000000 --- a/src/test/rustdoc-ui/feature-gate-doc_cfg_hide.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![doc(cfg_hide(test))] -//~^ ERROR `#[doc(cfg_hide)]` is experimental - -#[cfg(not(test))] -pub fn public_fn() {} -#[cfg(test)] -pub fn internal_use_only() {} diff --git a/src/test/rustdoc-ui/feature-gate-doc_cfg_hide.stderr b/src/test/rustdoc-ui/feature-gate-doc_cfg_hide.stderr deleted file mode 100644 index ba42c7bbb..000000000 --- a/src/test/rustdoc-ui/feature-gate-doc_cfg_hide.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0658]: `#[doc(cfg_hide)]` is experimental - --> $DIR/feature-gate-doc_cfg_hide.rs:1:1 - | -LL | #![doc(cfg_hide(test))] - | ^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #43781 for more information - = help: add `#![feature(doc_cfg_hide)]` to the crate attributes to enable - -error: Compilation failed, aborting rustdoc - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs b/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs deleted file mode 100644 index daba69868..000000000 --- a/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![deny(unknown_lints)] -//~^ NOTE defined here - -#![allow(rustdoc::missing_doc_code_examples)] -//~^ ERROR unknown lint -//~| ERROR unknown lint -//~| NOTE lint is unstable -//~| NOTE lint is unstable -//~| NOTE see issue -//~| NOTE see issue diff --git a/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr b/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr deleted file mode 100644 index cbe9a3d14..000000000 --- a/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error: unknown lint: `rustdoc::missing_doc_code_examples` - --> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:4:1 - | -LL | #![allow(rustdoc::missing_doc_code_examples)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the `rustdoc::missing_doc_code_examples` lint is unstable - = note: see issue #101730 for more information - = help: add `#![feature(rustdoc_missing_doc_code_examples)]` to the crate attributes to enable -note: the lint level is defined here - --> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:1:9 - | -LL | #![deny(unknown_lints)] - | ^^^^^^^^^^^^^ - -error: unknown lint: `rustdoc::missing_doc_code_examples` - --> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:4:1 - | -LL | #![allow(rustdoc::missing_doc_code_examples)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the `rustdoc::missing_doc_code_examples` lint is unstable - = note: see issue #101730 for more information - = help: add `#![feature(rustdoc_missing_doc_code_examples)]` to the crate attributes to enable - -error: Compilation failed, aborting rustdoc - -error: aborting due to 3 previous errors - diff --git a/src/test/rustdoc-ui/generate-link-to-definition-opt-unstable.rs b/src/test/rustdoc-ui/generate-link-to-definition-opt-unstable.rs deleted file mode 100644 index 87620d74e..000000000 --- a/src/test/rustdoc-ui/generate-link-to-definition-opt-unstable.rs +++ /dev/null @@ -1,6 +0,0 @@ -// This test purpose is to check that the "--generate-link-to-definition" -// option can only be used on nightly. - -// compile-flags: --generate-link-to-definition - -pub fn f() {} diff --git a/src/test/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr b/src/test/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr deleted file mode 100644 index a8ddf91bc..000000000 --- a/src/test/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr +++ /dev/null @@ -1,2 +0,0 @@ -error: the `-Z unstable-options` flag must also be passed to enable the flag `generate-link-to-definition` - diff --git a/src/test/rustdoc-ui/generate-link-to-definition-opt.rs b/src/test/rustdoc-ui/generate-link-to-definition-opt.rs deleted file mode 100644 index 8f4f561b4..000000000 --- a/src/test/rustdoc-ui/generate-link-to-definition-opt.rs +++ /dev/null @@ -1,6 +0,0 @@ -// This test purpose is to check that the "--generate-link-to-definition" -// option can only be used with HTML generation. - -// compile-flags: -Zunstable-options --generate-link-to-definition --output-format json - -pub fn f() {} diff --git a/src/test/rustdoc-ui/generate-link-to-definition-opt.stderr b/src/test/rustdoc-ui/generate-link-to-definition-opt.stderr deleted file mode 100644 index 4c8c607e7..000000000 --- a/src/test/rustdoc-ui/generate-link-to-definition-opt.stderr +++ /dev/null @@ -1,2 +0,0 @@ -error: --generate-link-to-definition option can only be used with HTML output format - diff --git a/src/test/rustdoc-ui/generate-link-to-definition-opt2.rs b/src/test/rustdoc-ui/generate-link-to-definition-opt2.rs deleted file mode 100644 index da5142087..000000000 --- a/src/test/rustdoc-ui/generate-link-to-definition-opt2.rs +++ /dev/null @@ -1,6 +0,0 @@ -// This test purpose is to check that the "--generate-link-to-definition" -// option can only be used with HTML generation. - -// compile-flags: -Zunstable-options --generate-link-to-definition --show-coverage - -pub fn f() {} diff --git a/src/test/rustdoc-ui/generate-link-to-definition-opt2.stderr b/src/test/rustdoc-ui/generate-link-to-definition-opt2.stderr deleted file mode 100644 index 4c8c607e7..000000000 --- a/src/test/rustdoc-ui/generate-link-to-definition-opt2.stderr +++ /dev/null @@ -1,2 +0,0 @@ -error: --generate-link-to-definition option can only be used with HTML output format - diff --git a/src/test/rustdoc-ui/ignore-block-help.rs b/src/test/rustdoc-ui/ignore-block-help.rs deleted file mode 100644 index 86f6a2868..000000000 --- a/src/test/rustdoc-ui/ignore-block-help.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass - -/// ```ignore (to-prevent-tidy-error) -/// let heart = 'â¤ï¸'; -/// ``` -//~^^^ WARNING could not parse code block -//~| NOTE on by default -//~| NOTE character literal may only contain one codepoint -//~| HELP `ignore` code blocks require valid Rust code -pub struct X; diff --git a/src/test/rustdoc-ui/ignore-block-help.stderr b/src/test/rustdoc-ui/ignore-block-help.stderr deleted file mode 100644 index a30ea51dd..000000000 --- a/src/test/rustdoc-ui/ignore-block-help.stderr +++ /dev/null @@ -1,19 +0,0 @@ -warning: could not parse code block as Rust code - --> $DIR/ignore-block-help.rs:3:5 - | -LL | /// ```ignore (to-prevent-tidy-error) - | _____^ -LL | | /// let heart = 'â¤ï¸'; -LL | | /// ``` - | |_______^ - | -help: `ignore` code blocks require valid Rust code for syntax highlighting; mark blocks that do not contain Rust code as text: ```text - --> $DIR/ignore-block-help.rs:3:5 - | -LL | /// ```ignore (to-prevent-tidy-error) - | ^^^ - = note: error from rustc: character literal may only contain one codepoint - = note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default - -warning: 1 warning emitted - diff --git a/src/test/rustdoc-ui/impl-fn-nesting.rs b/src/test/rustdoc-ui/impl-fn-nesting.rs deleted file mode 100644 index a927f6bd7..000000000 --- a/src/test/rustdoc-ui/impl-fn-nesting.rs +++ /dev/null @@ -1,49 +0,0 @@ -// Ensure that rustdoc gives errors for trait impls inside function bodies that don't resolve. -// See https://github.com/rust-lang/rust/pull/73566 -pub struct ValidType; -pub trait ValidTrait {} -pub trait NeedsBody { - type Item; - fn f(); -} - -/// This function has docs -pub fn f(a: UnknownType, b: B) { -//~^ ERROR cannot find trait `UnknownBound` in this scope -//~| ERROR cannot find type `UnknownType` in this scope - impl UnknownTrait for ValidType {} //~ ERROR cannot find trait `UnknownTrait` - impl UnknownTrait for T {} - //~^ ERROR cannot find trait `UnknownBound` in this scope - //~| ERROR cannot find trait `UnknownTrait` in this scope - impl ValidTrait for UnknownType {} - //~^ ERROR cannot find type `UnknownType` in this scope - impl ValidTrait for ValidType where ValidTrait: UnknownBound {} - //~^ ERROR cannot find trait `UnknownBound` in this scope - - /// This impl has documentation - impl NeedsBody for ValidType { - type Item = UnknownType; - //~^ ERROR cannot find type `UnknownType` in this scope - - /// This function has documentation - fn f() { - ::a(); - content::shouldnt::matter(); - unknown_macro!(); - //~^ ERROR cannot find macro `unknown_macro` in this scope - - /// This is documentation for a macro - macro_rules! can_define_macros_here_too { - () => { - this::content::should::also::be::ignored() - } - } - can_define_macros_here_too!(); - - /// This also is documented. - pub fn doubly_nested(c: UnknownType) { - //~^ ERROR cannot find type `UnknownType` in this scope - } - } - } -} diff --git a/src/test/rustdoc-ui/impl-fn-nesting.stderr b/src/test/rustdoc-ui/impl-fn-nesting.stderr deleted file mode 100644 index 608749af8..000000000 --- a/src/test/rustdoc-ui/impl-fn-nesting.stderr +++ /dev/null @@ -1,66 +0,0 @@ -error: cannot find macro `unknown_macro` in this scope - --> $DIR/impl-fn-nesting.rs:32:13 - | -LL | unknown_macro!(); - | ^^^^^^^^^^^^^ - -error[E0405]: cannot find trait `UnknownBound` in this scope - --> $DIR/impl-fn-nesting.rs:11:13 - | -LL | pub fn f(a: UnknownType, b: B) { - | ^^^^^^^^^^^^ not found in this scope - -error[E0412]: cannot find type `UnknownType` in this scope - --> $DIR/impl-fn-nesting.rs:11:30 - | -LL | pub fn f(a: UnknownType, b: B) { - | ^^^^^^^^^^^ not found in this scope - -error[E0405]: cannot find trait `UnknownTrait` in this scope - --> $DIR/impl-fn-nesting.rs:14:10 - | -LL | impl UnknownTrait for ValidType {} - | ^^^^^^^^^^^^ not found in this scope - -error[E0405]: cannot find trait `UnknownTrait` in this scope - --> $DIR/impl-fn-nesting.rs:15:27 - | -LL | impl UnknownTrait for T {} - | ^^^^^^^^^^^^ not found in this scope - -error[E0405]: cannot find trait `UnknownBound` in this scope - --> $DIR/impl-fn-nesting.rs:15:13 - | -LL | impl UnknownTrait for T {} - | ^^^^^^^^^^^^ not found in this scope - -error[E0412]: cannot find type `UnknownType` in this scope - --> $DIR/impl-fn-nesting.rs:18:25 - | -LL | impl ValidTrait for UnknownType {} - | ^^^^^^^^^^^ not found in this scope - -error[E0405]: cannot find trait `UnknownBound` in this scope - --> $DIR/impl-fn-nesting.rs:20:53 - | -LL | impl ValidTrait for ValidType where ValidTrait: UnknownBound {} - | ^^^^^^^^^^^^ not found in this scope - -error[E0412]: cannot find type `UnknownType` in this scope - --> $DIR/impl-fn-nesting.rs:25:21 - | -LL | type Item = UnknownType; - | ^^^^^^^^^^^ not found in this scope - -error[E0412]: cannot find type `UnknownType` in this scope - --> $DIR/impl-fn-nesting.rs:44:37 - | -LL | pub fn doubly_nested(c: UnknownType) { - | ^^^^^^^^^^^ not found in this scope - -error: Compilation failed, aborting rustdoc - -error: aborting due to 11 previous errors - -Some errors have detailed explanations: E0405, E0412. -For more information about an error, try `rustc --explain E0405`. diff --git a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs deleted file mode 100644 index 4b1e04234..000000000 --- a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs +++ /dev/null @@ -1,16 +0,0 @@ -// check-pass -// normalize-stderr-test: "`.*`" -> "`DEF_ID`" -// normalize-stdout-test: "`.*`" -> "`DEF_ID`" -// edition:2018 - -pub async fn f() -> impl std::fmt::Debug { - // rustdoc doesn't care that this is infinitely sized - #[derive(Debug)] - enum E { - This(E), - Unit, - } - E::Unit -} - -fn main() {} diff --git a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs deleted file mode 100644 index ac79582fb..000000000 --- a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs +++ /dev/null @@ -1,9 +0,0 @@ -// check-pass - -fn f() -> impl Sized { - // rustdoc doesn't care that this is infinitely sized - enum E { - V(E), - } - unimplemented!() -} diff --git a/src/test/rustdoc-ui/infinite-recursive-type.rs b/src/test/rustdoc-ui/infinite-recursive-type.rs deleted file mode 100644 index 32793fc4f..000000000 --- a/src/test/rustdoc-ui/infinite-recursive-type.rs +++ /dev/null @@ -1,4 +0,0 @@ -enum E { -//~^ ERROR recursive type `E` has infinite size - V(E), -} diff --git a/src/test/rustdoc-ui/infinite-recursive-type.stderr b/src/test/rustdoc-ui/infinite-recursive-type.stderr deleted file mode 100644 index 9e2c3ff16..000000000 --- a/src/test/rustdoc-ui/infinite-recursive-type.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0072]: recursive type `E` has infinite size - --> $DIR/infinite-recursive-type.rs:1:1 - | -LL | enum E { - | ^^^^^^ -LL | -LL | V(E), - | - recursive without indirection - | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle - | -LL | V(Box), - | ++++ + - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0072`. diff --git a/src/test/rustdoc-ui/intra-doc/alias-ice.rs b/src/test/rustdoc-ui/intra-doc/alias-ice.rs deleted file mode 100644 index 51922caeb..000000000 --- a/src/test/rustdoc-ui/intra-doc/alias-ice.rs +++ /dev/null @@ -1,6 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] - -pub type TypeAlias = usize; - -/// [broken cross-reference](TypeAlias::hoge) //~ ERROR -pub fn some_public_item() {} diff --git a/src/test/rustdoc-ui/intra-doc/alias-ice.stderr b/src/test/rustdoc-ui/intra-doc/alias-ice.stderr deleted file mode 100644 index 5e7ffeeb8..000000000 --- a/src/test/rustdoc-ui/intra-doc/alias-ice.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: unresolved link to `TypeAlias::hoge` - --> $DIR/alias-ice.rs:5:30 - | -LL | /// [broken cross-reference](TypeAlias::hoge) - | ^^^^^^^^^^^^^^^ the type alias `TypeAlias` has no associated item named `hoge` - | -note: the lint level is defined here - --> $DIR/alias-ice.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/intra-doc/ambiguity.rs b/src/test/rustdoc-ui/intra-doc/ambiguity.rs deleted file mode 100644 index 1f3dc722e..000000000 --- a/src/test/rustdoc-ui/intra-doc/ambiguity.rs +++ /dev/null @@ -1,40 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] -#![allow(non_camel_case_types)] -#![allow(non_upper_case_globals)] - -pub fn ambiguous() {} - -pub struct ambiguous {} - -#[macro_export] -macro_rules! multi_conflict { () => {} } - -#[allow(non_camel_case_types)] -pub struct multi_conflict {} - -pub fn multi_conflict() {} - -pub mod type_and_value {} - -pub const type_and_value: i32 = 0; - -pub mod foo { - pub enum bar {} - - pub fn bar() {} -} - -/// [`ambiguous`] is ambiguous. //~ERROR `ambiguous` -/// -/// [ambiguous] is ambiguous. //~ERROR ambiguous -/// -/// [`multi_conflict`] is a three-way conflict. //~ERROR `multi_conflict` -/// -/// Ambiguous [type_and_value]. //~ERROR type_and_value -/// -/// Ambiguous non-implied shortcut link [`foo::bar`]. //~ERROR `foo::bar` -pub struct Docs {} - -/// [true] //~ ERROR `true` is both a module and a builtin type -/// [primitive@true] -pub mod r#true {} diff --git a/src/test/rustdoc-ui/intra-doc/ambiguity.stderr b/src/test/rustdoc-ui/intra-doc/ambiguity.stderr deleted file mode 100644 index 7974796e4..000000000 --- a/src/test/rustdoc-ui/intra-doc/ambiguity.stderr +++ /dev/null @@ -1,101 +0,0 @@ -error: `true` is both a module and a builtin type - --> $DIR/ambiguity.rs:38:6 - | -LL | /// [true] - | ^^^^ ambiguous link - | -note: the lint level is defined here - --> $DIR/ambiguity.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: to link to the module, prefix with `mod@` - | -LL | /// [mod@true] - | ++++ -help: to link to the builtin type, prefix with `prim@` - | -LL | /// [prim@true] - | +++++ - -error: `ambiguous` is both a struct and a function - --> $DIR/ambiguity.rs:27:7 - | -LL | /// [`ambiguous`] is ambiguous. - | ^^^^^^^^^ ambiguous link - | -help: to link to the struct, prefix with `struct@` - | -LL | /// [`struct@ambiguous`] is ambiguous. - | +++++++ -help: to link to the function, add parentheses - | -LL | /// [`ambiguous()`] is ambiguous. - | ++ - -error: `ambiguous` is both a struct and a function - --> $DIR/ambiguity.rs:29:6 - | -LL | /// [ambiguous] is ambiguous. - | ^^^^^^^^^ ambiguous link - | -help: to link to the struct, prefix with `struct@` - | -LL | /// [struct@ambiguous] is ambiguous. - | +++++++ -help: to link to the function, add parentheses - | -LL | /// [ambiguous()] is ambiguous. - | ++ - -error: `multi_conflict` is a struct, a function, and a macro - --> $DIR/ambiguity.rs:31:7 - | -LL | /// [`multi_conflict`] is a three-way conflict. - | ^^^^^^^^^^^^^^ ambiguous link - | -help: to link to the struct, prefix with `struct@` - | -LL | /// [`struct@multi_conflict`] is a three-way conflict. - | +++++++ -help: to link to the function, add parentheses - | -LL | /// [`multi_conflict()`] is a three-way conflict. - | ++ -help: to link to the macro, add an exclamation mark - | -LL | /// [`multi_conflict!`] is a three-way conflict. - | + - -error: `type_and_value` is both a module and a constant - --> $DIR/ambiguity.rs:33:16 - | -LL | /// Ambiguous [type_and_value]. - | ^^^^^^^^^^^^^^ ambiguous link - | -help: to link to the module, prefix with `mod@` - | -LL | /// Ambiguous [mod@type_and_value]. - | ++++ -help: to link to the constant, prefix with `const@` - | -LL | /// Ambiguous [const@type_and_value]. - | ++++++ - -error: `foo::bar` is both an enum and a function - --> $DIR/ambiguity.rs:35:43 - | -LL | /// Ambiguous non-implied shortcut link [`foo::bar`]. - | ^^^^^^^^ ambiguous link - | -help: to link to the enum, prefix with `enum@` - | -LL | /// Ambiguous non-implied shortcut link [`enum@foo::bar`]. - | +++++ -help: to link to the function, add parentheses - | -LL | /// Ambiguous non-implied shortcut link [`foo::bar()`]. - | ++ - -error: aborting due to 6 previous errors - diff --git a/src/test/rustdoc-ui/intra-doc/anchors.rs b/src/test/rustdoc-ui/intra-doc/anchors.rs deleted file mode 100644 index 34e11c7c7..000000000 --- a/src/test/rustdoc-ui/intra-doc/anchors.rs +++ /dev/null @@ -1,39 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] - -// A few tests on anchors. - -/// Hello people. -/// -/// You can anchors? Here's one! -/// -/// # hola -/// -/// Isn't it amazing? -pub struct Foo { - pub f: u8, -} - -pub enum Enum { - A, - B, -} - -/// Have you heard about stuff? -/// -/// Like [Foo#hola]. -/// -/// Or maybe [Foo::f#hola]. -//~^ ERROR `Foo::f#hola` contains an anchor -pub fn foo() {} - -/// Empty. -/// -/// Another anchor error: [hello#people#!]. -//~^ ERROR `hello#people#!` contains multiple anchors -pub fn bar() {} - -/// Empty? -/// -/// Damn enum's variants: [Enum::A#whatever]. -//~^ ERROR `Enum::A#whatever` contains an anchor -pub fn enum_link() {} diff --git a/src/test/rustdoc-ui/intra-doc/anchors.stderr b/src/test/rustdoc-ui/intra-doc/anchors.stderr deleted file mode 100644 index 0d226b277..000000000 --- a/src/test/rustdoc-ui/intra-doc/anchors.stderr +++ /dev/null @@ -1,32 +0,0 @@ -error: `Foo::f#hola` contains an anchor, but links to fields are already anchored - --> $DIR/anchors.rs:25:15 - | -LL | /// Or maybe [Foo::f#hola]. - | ^^^^^^----- - | | - | invalid anchor - | -note: the lint level is defined here - --> $DIR/anchors.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: `hello#people#!` contains multiple anchors - --> $DIR/anchors.rs:31:28 - | -LL | /// Another anchor error: [hello#people#!]. - | ^^^^^^^^^^^^-- - | | - | invalid anchor - -error: `Enum::A#whatever` contains an anchor, but links to variants are already anchored - --> $DIR/anchors.rs:37:28 - | -LL | /// Damn enum's variants: [Enum::A#whatever]. - | ^^^^^^^--------- - | | - | invalid anchor - -error: aborting due to 3 previous errors - diff --git a/src/test/rustdoc-ui/intra-doc/assoc-field.rs b/src/test/rustdoc-ui/intra-doc/assoc-field.rs deleted file mode 100644 index e18404e44..000000000 --- a/src/test/rustdoc-ui/intra-doc/assoc-field.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Traits in scope are collected for doc links in field attributes. - -// check-pass -// aux-build: assoc-field-dep.rs - -extern crate assoc_field_dep; -pub use assoc_field_dep::*; - -#[derive(Clone)] -pub struct Struct; - -pub mod mod1 { - pub struct Fields { - /// [crate::Struct::clone] - pub field: u8, - } -} - -pub mod mod2 { - pub enum Fields { - V { - /// [crate::Struct::clone] - field: u8, - }, - } -} diff --git a/src/test/rustdoc-ui/intra-doc/assoc-mod-inner-outer.rs b/src/test/rustdoc-ui/intra-doc/assoc-mod-inner-outer.rs deleted file mode 100644 index b4ce3443c..000000000 --- a/src/test/rustdoc-ui/intra-doc/assoc-mod-inner-outer.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Traits in scope are collected for doc links in both outer and inner module attributes. - -// check-pass -// aux-build: assoc-mod-inner-outer-dep.rs - -extern crate assoc_mod_inner_outer_dep; -pub use assoc_mod_inner_outer_dep::*; - -#[derive(Clone)] -pub struct Struct; - -pub mod outer1 { - /// [crate::Struct::clone] - pub mod inner {} -} - -pub mod outer2 { - //! [crate::Struct::clone] -} diff --git a/src/test/rustdoc-ui/intra-doc/auxiliary/assoc-field-dep.rs b/src/test/rustdoc-ui/intra-doc/auxiliary/assoc-field-dep.rs deleted file mode 100644 index cfb24fc2c..000000000 --- a/src/test/rustdoc-ui/intra-doc/auxiliary/assoc-field-dep.rs +++ /dev/null @@ -1,18 +0,0 @@ -#[derive(Clone)] -pub struct Struct; - -pub mod dep_mod1 { - pub struct Fields { - /// [crate::Struct::clone] - pub field: u8, - } -} - -pub mod dep_mod2 { - pub enum Fields { - V { - /// [crate::Struct::clone] - field: u8, - }, - } -} diff --git a/src/test/rustdoc-ui/intra-doc/auxiliary/assoc-mod-inner-outer-dep.rs b/src/test/rustdoc-ui/intra-doc/auxiliary/assoc-mod-inner-outer-dep.rs deleted file mode 100644 index 7a11a1657..000000000 --- a/src/test/rustdoc-ui/intra-doc/auxiliary/assoc-mod-inner-outer-dep.rs +++ /dev/null @@ -1,11 +0,0 @@ -#[derive(Clone)] -pub struct Struct; - -pub mod dep_outer1 { - /// [crate::Struct::clone] - pub mod inner {} -} - -pub mod dep_outer2 { - //! [crate::Struct::clone] -} diff --git a/src/test/rustdoc-ui/intra-doc/auxiliary/dep1.rs b/src/test/rustdoc-ui/intra-doc/auxiliary/dep1.rs deleted file mode 100644 index d11c69f81..000000000 --- a/src/test/rustdoc-ui/intra-doc/auxiliary/dep1.rs +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/src/test/rustdoc-ui/intra-doc/auxiliary/dep2.rs b/src/test/rustdoc-ui/intra-doc/auxiliary/dep2.rs deleted file mode 100644 index d11c69f81..000000000 --- a/src/test/rustdoc-ui/intra-doc/auxiliary/dep2.rs +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/src/test/rustdoc-ui/intra-doc/auxiliary/dep3.rs b/src/test/rustdoc-ui/intra-doc/auxiliary/dep3.rs deleted file mode 100644 index d11c69f81..000000000 --- a/src/test/rustdoc-ui/intra-doc/auxiliary/dep3.rs +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/src/test/rustdoc-ui/intra-doc/auxiliary/dep4.rs b/src/test/rustdoc-ui/intra-doc/auxiliary/dep4.rs deleted file mode 100644 index d11c69f81..000000000 --- a/src/test/rustdoc-ui/intra-doc/auxiliary/dep4.rs +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/src/test/rustdoc-ui/intra-doc/auxiliary/intra-doc-broken.rs b/src/test/rustdoc-ui/intra-doc/auxiliary/intra-doc-broken.rs deleted file mode 100644 index 31a8310d4..000000000 --- a/src/test/rustdoc-ui/intra-doc/auxiliary/intra-doc-broken.rs +++ /dev/null @@ -1,4 +0,0 @@ -#![crate_name = "intra_doc_broken"] - -/// [not_found] -pub fn foo() {} diff --git a/src/test/rustdoc-ui/intra-doc/auxiliary/pointer-reexports-allowed.rs b/src/test/rustdoc-ui/intra-doc/auxiliary/pointer-reexports-allowed.rs deleted file mode 100644 index 0a3dc57f1..000000000 --- a/src/test/rustdoc-ui/intra-doc/auxiliary/pointer-reexports-allowed.rs +++ /dev/null @@ -1,4 +0,0 @@ -#![feature(intra_doc_pointers)] -#![crate_name = "inner"] -/// Link to [some pointer](*const::to_raw_parts) -pub fn foo() {} diff --git a/src/test/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs b/src/test/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs deleted file mode 100644 index 5c4a01ee3..000000000 --- a/src/test/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs +++ /dev/null @@ -1,20 +0,0 @@ -// force-host -// no-prefer-dynamic -#![crate_type = "proc-macro"] -#![crate_name="some_macros"] - -extern crate proc_macro; -use proc_macro::TokenStream; - -#[proc_macro_attribute] -pub fn first(_attr: TokenStream, item: TokenStream) -> TokenStream { - item // This doesn't erase the spans. -} - -#[proc_macro_attribute] -pub fn second(_attr: TokenStream, item: TokenStream) -> TokenStream { - // Make a new `TokenStream` to erase the spans: - let mut out: TokenStream = TokenStream::new(); - out.extend(item); - out -} diff --git a/src/test/rustdoc-ui/intra-doc/broken-reexport.rs b/src/test/rustdoc-ui/intra-doc/broken-reexport.rs deleted file mode 100644 index 862faa50b..000000000 --- a/src/test/rustdoc-ui/intra-doc/broken-reexport.rs +++ /dev/null @@ -1,8 +0,0 @@ -// aux-build:intra-doc-broken.rs -// check-pass - -#![deny(rustdoc::broken_intra_doc_links)] - -extern crate intra_doc_broken; - -pub use intra_doc_broken::foo; diff --git a/src/test/rustdoc-ui/intra-doc/crate-nonexistent.rs b/src/test/rustdoc-ui/intra-doc/crate-nonexistent.rs deleted file mode 100644 index ceecfa681..000000000 --- a/src/test/rustdoc-ui/intra-doc/crate-nonexistent.rs +++ /dev/null @@ -1,5 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] - -/// [crate::DoesNotExist] -//~^ ERROR unresolved link to `crate::DoesNotExist` -pub struct Item; diff --git a/src/test/rustdoc-ui/intra-doc/crate-nonexistent.stderr b/src/test/rustdoc-ui/intra-doc/crate-nonexistent.stderr deleted file mode 100644 index a69b1c52a..000000000 --- a/src/test/rustdoc-ui/intra-doc/crate-nonexistent.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: unresolved link to `crate::DoesNotExist` - --> $DIR/crate-nonexistent.rs:3:6 - | -LL | /// [crate::DoesNotExist] - | ^^^^^^^^^^^^^^^^^^^ no item named `DoesNotExist` in module `crate_nonexistent` - | -note: the lint level is defined here - --> $DIR/crate-nonexistent.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.rs b/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.rs deleted file mode 100644 index 2d6656611..000000000 --- a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.rs +++ /dev/null @@ -1,81 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] -//~^ NOTE lint level is defined -pub enum S {} -fn S() {} - -#[macro_export] -macro_rules! m { - () => {}; -} - -static s: usize = 0; -const c: usize = 0; - -trait T {} - -/// Link to [struct@S] -//~^ ERROR incompatible link kind for `S` -//~| NOTE this link resolved -//~| HELP prefix with `enum@` - -/// Link to [mod@S] -//~^ ERROR incompatible link kind for `S` -//~| NOTE this link resolved -//~| HELP prefix with `enum@` - -/// Link to [union@S] -//~^ ERROR incompatible link kind for `S` -//~| NOTE this link resolved -//~| HELP prefix with `enum@` - -/// Link to [trait@S] -//~^ ERROR incompatible link kind for `S` -//~| NOTE this link resolved -//~| HELP prefix with `enum@` - -/// Link to [struct@T] -//~^ ERROR incompatible link kind for `T` -//~| NOTE this link resolved -//~| HELP prefix with `trait@` - -/// Link to [derive@m] -//~^ ERROR incompatible link kind for `m` -//~| NOTE this link resolved -//~| HELP add an exclamation mark - -/// Link to [m()] -//~^ ERROR unresolved link to `m` -//~| NOTE this link resolves to the macro `m` -//~| HELP add an exclamation mark -/// and to [m!()] - -/// Link to [const@s] -//~^ ERROR incompatible link kind for `s` -//~| NOTE this link resolved -//~| HELP prefix with `static@` - -/// Link to [static@c] -//~^ ERROR incompatible link kind for `c` -//~| NOTE this link resolved -//~| HELP prefix with `const@` - -/// Link to [fn@c] -//~^ ERROR incompatible link kind for `c` -//~| NOTE this link resolved -//~| HELP prefix with `const@` - -/// Link to [c()] -//~^ ERROR incompatible link kind for `c` -//~| NOTE this link resolved -//~| HELP prefix with `const@` - -/// Link to [const@f] -//~^ ERROR incompatible link kind for `f` -//~| NOTE this link resolved -//~| HELP add parentheses - -/// Link to [fn@std] -//~^ ERROR unresolved link to `std` -//~| NOTE this link resolves to the crate `std` -//~| HELP to link to the crate, prefix with `mod@` -pub fn f() {} diff --git a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr b/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr deleted file mode 100644 index ee35749ce..000000000 --- a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr +++ /dev/null @@ -1,153 +0,0 @@ -error: incompatible link kind for `S` - --> $DIR/disambiguator-mismatch.rs:16:14 - | -LL | /// Link to [struct@S] - | ^^^^^^^^ this link resolved to an enum, which is not a struct - | -note: the lint level is defined here - --> $DIR/disambiguator-mismatch.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: to link to the enum, prefix with `enum@` - | -LL | /// Link to [enum@S] - | ~~~~~ - -error: incompatible link kind for `S` - --> $DIR/disambiguator-mismatch.rs:21:14 - | -LL | /// Link to [mod@S] - | ^^^^^ this link resolved to an enum, which is not a module - | -help: to link to the enum, prefix with `enum@` - | -LL | /// Link to [enum@S] - | ~~~~~ - -error: incompatible link kind for `S` - --> $DIR/disambiguator-mismatch.rs:26:14 - | -LL | /// Link to [union@S] - | ^^^^^^^ this link resolved to an enum, which is not a union - | -help: to link to the enum, prefix with `enum@` - | -LL | /// Link to [enum@S] - | ~~~~~ - -error: incompatible link kind for `S` - --> $DIR/disambiguator-mismatch.rs:31:14 - | -LL | /// Link to [trait@S] - | ^^^^^^^ this link resolved to an enum, which is not a trait - | -help: to link to the enum, prefix with `enum@` - | -LL | /// Link to [enum@S] - | ~~~~~ - -error: incompatible link kind for `T` - --> $DIR/disambiguator-mismatch.rs:36:14 - | -LL | /// Link to [struct@T] - | ^^^^^^^^ this link resolved to a trait, which is not a struct - | -help: to link to the trait, prefix with `trait@` - | -LL | /// Link to [trait@T] - | ~~~~~~ - -error: incompatible link kind for `m` - --> $DIR/disambiguator-mismatch.rs:41:14 - | -LL | /// Link to [derive@m] - | ^^^^^^^^ this link resolved to a macro, which is not a derive macro - | -help: to link to the macro, add an exclamation mark - | -LL - /// Link to [derive@m] -LL + /// Link to [m!] - | - -error: unresolved link to `m` - --> $DIR/disambiguator-mismatch.rs:46:14 - | -LL | /// Link to [m()] - | ^^^ this link resolves to the macro `m`, which is not in the value namespace - | -help: to link to the macro, add an exclamation mark - | -LL | /// Link to [m!()] - | + - -error: incompatible link kind for `s` - --> $DIR/disambiguator-mismatch.rs:52:14 - | -LL | /// Link to [const@s] - | ^^^^^^^ this link resolved to a static, which is not a constant - | -help: to link to the static, prefix with `static@` - | -LL | /// Link to [static@s] - | ~~~~~~~ - -error: incompatible link kind for `c` - --> $DIR/disambiguator-mismatch.rs:57:14 - | -LL | /// Link to [static@c] - | ^^^^^^^^ this link resolved to a constant, which is not a static - | -help: to link to the constant, prefix with `const@` - | -LL | /// Link to [const@c] - | ~~~~~~ - -error: incompatible link kind for `c` - --> $DIR/disambiguator-mismatch.rs:62:14 - | -LL | /// Link to [fn@c] - | ^^^^ this link resolved to a constant, which is not a function - | -help: to link to the constant, prefix with `const@` - | -LL | /// Link to [const@c] - | ~~~~~~ - -error: incompatible link kind for `c` - --> $DIR/disambiguator-mismatch.rs:67:14 - | -LL | /// Link to [c()] - | ^^^ this link resolved to a constant, which is not a function - | -help: to link to the constant, prefix with `const@` - | -LL - /// Link to [c()] -LL + /// Link to [const@c] - | - -error: incompatible link kind for `f` - --> $DIR/disambiguator-mismatch.rs:72:14 - | -LL | /// Link to [const@f] - | ^^^^^^^ this link resolved to a function, which is not a constant - | -help: to link to the function, add parentheses - | -LL - /// Link to [const@f] -LL + /// Link to [f()] - | - -error: unresolved link to `std` - --> $DIR/disambiguator-mismatch.rs:77:14 - | -LL | /// Link to [fn@std] - | ^^^^^^ this link resolves to the crate `std`, which is not in the value namespace - | -help: to link to the crate, prefix with `mod@` - | -LL | /// Link to [mod@std] - | ~~~~ - -error: aborting due to 13 previous errors - diff --git a/src/test/rustdoc-ui/intra-doc/double-anchor.rs b/src/test/rustdoc-ui/intra-doc/double-anchor.rs deleted file mode 100644 index a01211c4f..000000000 --- a/src/test/rustdoc-ui/intra-doc/double-anchor.rs +++ /dev/null @@ -1,7 +0,0 @@ -// check-pass - -// regression test for #73264 -// should only give one error -/// docs [label][with#anchor#error] -//~^ WARNING multiple anchors -pub struct S; diff --git a/src/test/rustdoc-ui/intra-doc/double-anchor.stderr b/src/test/rustdoc-ui/intra-doc/double-anchor.stderr deleted file mode 100644 index 6addb010e..000000000 --- a/src/test/rustdoc-ui/intra-doc/double-anchor.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: `with#anchor#error` contains multiple anchors - --> $DIR/double-anchor.rs:5:18 - | -LL | /// docs [label][with#anchor#error] - | ^^^^^^^^^^^------ - | | - | invalid anchor - | - = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default - -warning: 1 warning emitted - diff --git a/src/test/rustdoc-ui/intra-doc/email-address-localhost.rs b/src/test/rustdoc-ui/intra-doc/email-address-localhost.rs deleted file mode 100644 index 7a5156e81..000000000 --- a/src/test/rustdoc-ui/intra-doc/email-address-localhost.rs +++ /dev/null @@ -1,7 +0,0 @@ -// normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" -// check-pass -#![deny(warnings)] - -//! Email me at . - -//! This should *not* warn: . diff --git a/src/test/rustdoc-ui/intra-doc/errors.rs b/src/test/rustdoc-ui/intra-doc/errors.rs deleted file mode 100644 index b29f7c29b..000000000 --- a/src/test/rustdoc-ui/intra-doc/errors.rs +++ /dev/null @@ -1,105 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] -//~^ NOTE lint level is defined - -// FIXME: this should say that it was skipped (maybe an allowed by default lint?) -/// [invalid intra-doc syntax!!] - -/// [path::to::nonexistent::module] -//~^ ERROR unresolved link -//~| NOTE no item named `path` in scope - -/// [path::to::nonexistent::macro!] -//~^ ERROR unresolved link -//~| NOTE no item named `path` in scope - -/// [type@path::to::nonexistent::type] -//~^ ERROR unresolved link -//~| NOTE no item named `path` in scope - -/// [std::io::not::here] -//~^ ERROR unresolved link -//~| NOTE no item named `not` in module `io` - -/// [type@std::io::not::here] -//~^ ERROR unresolved link -//~| NOTE no item named `not` in module `io` - -/// [std::io::Error::x] -//~^ ERROR unresolved link -//~| NOTE the struct `Error` has no field - -/// [std::io::ErrorKind::x] -//~^ ERROR unresolved link -//~| NOTE the enum `ErrorKind` has no variant - -/// [f::A] -//~^ ERROR unresolved link -//~| NOTE `f` is a function, not a module - -/// [f::A!] -//~^ ERROR unresolved link -//~| NOTE `f` is a function, not a module - -/// [S::A] -//~^ ERROR unresolved link -//~| NOTE struct `S` has no field or associated item - -/// [S::fmt] -//~^ ERROR unresolved link -//~| NOTE struct `S` has no field or associated item - -/// [E::D] -//~^ ERROR unresolved link -//~| NOTE enum `E` has no variant or associated item - -/// [u8::not_found] -//~^ ERROR unresolved link -//~| NOTE the builtin type `u8` has no associated item named `not_found` - -/// [std::primitive::u8::not_found] -//~^ ERROR unresolved link -//~| NOTE the builtin type `u8` has no associated item named `not_found` - -/// [type@Vec::into_iter] -//~^ ERROR unresolved link -//~| HELP to link to the associated function, add parentheses -//~| NOTE this link resolves to the associated function `into_iter` - -/// [S!] -//~^ ERROR unresolved link -//~| HELP to link to the struct, prefix with `struct@` -//~| NOTE this link resolves to the struct `S` -pub fn f() {} -#[derive(Debug)] -pub struct S; - -pub enum E { A, B, C } - -/// [type@S::h] -//~^ ERROR unresolved link -//~| HELP to link to the associated function -//~| NOTE not in the type namespace -impl S { - pub fn h() {} -} - -/// [type@T::g] -//~^ ERROR unresolved link -//~| HELP to link to the associated function -//~| NOTE not in the type namespace - -/// [T::h!] -//~^ ERROR unresolved link -//~| NOTE `T` has no macro named `h` -pub trait T { - fn g() {} -} - -/// [m()] -//~^ ERROR unresolved link -//~| HELP to link to the macro -//~| NOTE not in the value namespace -#[macro_export] -macro_rules! m { - () => {}; -} diff --git a/src/test/rustdoc-ui/intra-doc/errors.stderr b/src/test/rustdoc-ui/intra-doc/errors.stderr deleted file mode 100644 index 9a1896fb0..000000000 --- a/src/test/rustdoc-ui/intra-doc/errors.stderr +++ /dev/null @@ -1,157 +0,0 @@ -error: unresolved link to `path::to::nonexistent::module` - --> $DIR/errors.rs:7:6 - | -LL | /// [path::to::nonexistent::module] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope - | -note: the lint level is defined here - --> $DIR/errors.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unresolved link to `path::to::nonexistent::macro` - --> $DIR/errors.rs:11:6 - | -LL | /// [path::to::nonexistent::macro!] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope - -error: unresolved link to `path::to::nonexistent::type` - --> $DIR/errors.rs:15:6 - | -LL | /// [type@path::to::nonexistent::type] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope - -error: unresolved link to `std::io::not::here` - --> $DIR/errors.rs:19:6 - | -LL | /// [std::io::not::here] - | ^^^^^^^^^^^^^^^^^^ no item named `not` in module `io` - -error: unresolved link to `std::io::not::here` - --> $DIR/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` - --> $DIR/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` - --> $DIR/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` - --> $DIR/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` - --> $DIR/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` - --> $DIR/errors.rs:43:6 - | -LL | /// [S::A] - | ^^^^ the struct `S` has no field or associated item named `A` - -error: unresolved link to `S::fmt` - --> $DIR/errors.rs:47:6 - | -LL | /// [S::fmt] - | ^^^^^^ the struct `S` has no field or associated item named `fmt` - -error: unresolved link to `E::D` - --> $DIR/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` - --> $DIR/errors.rs:55:6 - | -LL | /// [u8::not_found] - | ^^^^^^^^^^^^^ the builtin type `u8` has no associated item named `not_found` - -error: unresolved link to `std::primitive::u8::not_found` - --> $DIR/errors.rs:59:6 - | -LL | /// [std::primitive::u8::not_found] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the builtin type `u8` has no associated item named `not_found` - -error: unresolved link to `Vec::into_iter` - --> $DIR/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` - --> $DIR/errors.rs:68:6 - | -LL | /// [S!] - | ^^ this link resolves to the struct `S`, which is not in the macro namespace - | -help: to link to the struct, prefix with `struct@` - | -LL - /// [S!] -LL + /// [struct@S] - | - -error: unresolved link to `S::h` - --> $DIR/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` - --> $DIR/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` - --> $DIR/errors.rs:91:6 - | -LL | /// [T::h!] - | ^^^^^ the trait `T` has no macro named `h` - -error: unresolved link to `m` - --> $DIR/errors.rs:98:6 - | -LL | /// [m()] - | ^^^ this link resolves to the macro `m`, which is not in the value namespace - | -help: to link to the macro, add an exclamation mark - | -LL | /// [m!()] - | + - -error: aborting due to 20 previous errors - diff --git a/src/test/rustdoc-ui/intra-doc/extern-crate-load.rs b/src/test/rustdoc-ui/intra-doc/extern-crate-load.rs deleted file mode 100644 index 438c56aa5..000000000 --- a/src/test/rustdoc-ui/intra-doc/extern-crate-load.rs +++ /dev/null @@ -1,26 +0,0 @@ -// check-pass -// aux-crate:dep1=dep1.rs -// aux-crate:dep2=dep2.rs -// aux-crate:dep3=dep3.rs -// aux-crate:dep4=dep4.rs -#![deny(rustdoc::broken_intra_doc_links)] - -pub trait Trait { - /// [dep1] - type Item; -} - -pub struct S { - /// [dep2] - pub x: usize, -} - -extern "C" { - /// [dep3] - pub fn printf(); -} - -pub enum E { - /// [dep4] - A -} diff --git a/src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.rs b/src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.rs deleted file mode 100644 index 3cfac942c..000000000 --- a/src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.rs +++ /dev/null @@ -1,6 +0,0 @@ -//! [pointer::add] -//~^ ERROR: experimental -//! [pointer::wrapping_add] -//~^ ERROR: experimental -//! [pointer] // This is explicitly allowed -//! [reference] // This is explicitly allowed diff --git a/src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.stderr b/src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.stderr deleted file mode 100644 index 2c946ed48..000000000 --- a/src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0658]: linking to associated items of raw pointers is experimental - --> $DIR/feature-gate-intra-doc-pointers.rs:1:6 - | -LL | //! [pointer::add] - | ^^^^^^^^^^^^ - | - = note: see issue #80896 for more information - = help: add `#![feature(intra_doc_pointers)]` to the crate attributes to enable - = note: rustdoc does not allow disambiguating between `*const` and `*mut`, and pointers are unstable until it does - -error[E0658]: linking to associated items of raw pointers is experimental - --> $DIR/feature-gate-intra-doc-pointers.rs:3:6 - | -LL | //! [pointer::wrapping_add] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #80896 for more information - = help: add `#![feature(intra_doc_pointers)]` to the crate attributes to enable - = note: rustdoc does not allow disambiguating between `*const` and `*mut`, and pointers are unstable until it does - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/rustdoc-ui/intra-doc/field-ice.rs b/src/test/rustdoc-ui/intra-doc/field-ice.rs deleted file mode 100644 index c5d501e38..000000000 --- a/src/test/rustdoc-ui/intra-doc/field-ice.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] -//~^NOTE the lint level is defined here - -/// [`Foo::bar`] -/// [`Foo::bar()`] -//~^ERROR incompatible link kind for `Foo::bar` -//~|HELP to link to the field, remove the disambiguator -//~|NOTE this link resolved to a field, which is not a function -pub struct Foo { - pub bar: u8 -} diff --git a/src/test/rustdoc-ui/intra-doc/field-ice.stderr b/src/test/rustdoc-ui/intra-doc/field-ice.stderr deleted file mode 100644 index f45a3ca61..000000000 --- a/src/test/rustdoc-ui/intra-doc/field-ice.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: incompatible link kind for `Foo::bar` - --> $DIR/field-ice.rs:5:7 - | -LL | /// [`Foo::bar()`] - | ^^^^^^^^^^ this link resolved to a field, which is not a function - | -note: the lint level is defined here - --> $DIR/field-ice.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: to link to the field, remove the disambiguator - | -LL | /// [`Foo::bar`] - | ~~~~~~~~ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/intra-doc/global-path.rs b/src/test/rustdoc-ui/intra-doc/global-path.rs deleted file mode 100644 index cc7a5fa1c..000000000 --- a/src/test/rustdoc-ui/intra-doc/global-path.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Doc link path with empty prefix that resolves to "extern prelude" instead of a module. - -// check-pass -// edition:2018 - -/// [::Unresolved] -//~^ WARN unresolved link to `::Unresolved` -pub struct Item; diff --git a/src/test/rustdoc-ui/intra-doc/global-path.stderr b/src/test/rustdoc-ui/intra-doc/global-path.stderr deleted file mode 100644 index 02379cd6c..000000000 --- a/src/test/rustdoc-ui/intra-doc/global-path.stderr +++ /dev/null @@ -1,10 +0,0 @@ -warning: unresolved link to `::Unresolved` - --> $DIR/global-path.rs:6:6 - | -LL | /// [::Unresolved] - | ^^^^^^^^^^^^ no item named `` in scope - | - = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default - -warning: 1 warning emitted - diff --git a/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.rs b/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.rs deleted file mode 100644 index b5470c859..000000000 --- a/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.rs +++ /dev/null @@ -1,25 +0,0 @@ -#![deny(rustdoc::invalid_html_tags)] -#![deny(rustdoc::broken_intra_doc_links)] - -pub struct ExistentStruct(T); - -/// This [test][ExistentStruct] thing! -pub struct NoError; - -/// This [ExistentStruct] thing! -//~^ ERROR unclosed HTML tag `i32` -pub struct PartialErrorOnlyHtml; - -/// This [test][NonExistentStruct] thing! -//~^ ERROR unresolved link -pub struct PartialErrorOnlyResolve; - -/// This [NonExistentStruct2] thing! -//~^ ERROR unclosed HTML tag `i32` -//~| ERROR unresolved link -pub struct YesError; - -/// This [NonExistentStruct3][] thing! -//~^ ERROR unclosed HTML tag `i32` -//~| ERROR unresolved link -pub struct YesErrorCollapsed; diff --git a/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.stderr b/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.stderr deleted file mode 100644 index 7c81044db..000000000 --- a/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.stderr +++ /dev/null @@ -1,69 +0,0 @@ -error: unresolved link to `NonExistentStruct` - --> $DIR/html-as-generics-intra-doc.rs:13:17 - | -LL | /// This [test][NonExistentStruct] thing! - | ^^^^^^^^^^^^^^^^^^^^^^ no item named `NonExistentStruct` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` -note: the lint level is defined here - --> $DIR/html-as-generics-intra-doc.rs:2:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unresolved link to `NonExistentStruct2` - --> $DIR/html-as-generics-intra-doc.rs:17:11 - | -LL | /// This [NonExistentStruct2] thing! - | ^^^^^^^^^^^^^^^^^^^^^^^ no item named `NonExistentStruct2` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -error: unresolved link to `NonExistentStruct3` - --> $DIR/html-as-generics-intra-doc.rs:22:11 - | -LL | /// This [NonExistentStruct3][] thing! - | ^^^^^^^^^^^^^^^^^^^^^^^ no item named `NonExistentStruct3` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics-intra-doc.rs:9:25 - | -LL | /// This [ExistentStruct] thing! - | ^^^^^ - | -note: the lint level is defined here - --> $DIR/html-as-generics-intra-doc.rs:1:9 - | -LL | #![deny(rustdoc::invalid_html_tags)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: try marking as source code - | -LL | /// This [`ExistentStruct`] thing! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics-intra-doc.rs:17:29 - | -LL | /// This [NonExistentStruct2] thing! - | ^^^^^ - | -help: try marking as source code - | -LL | /// This [`NonExistentStruct2`] thing! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics-intra-doc.rs:22:29 - | -LL | /// This [NonExistentStruct3][] thing! - | ^^^^^ - | -help: try marking as source code - | -LL | /// This [`NonExistentStruct3`][] thing! - | + + - -error: aborting due to 6 previous errors - diff --git a/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.rs b/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.rs deleted file mode 100644 index 3088bcd46..000000000 --- a/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] -//! [static@u8::MIN] -//~^ ERROR incompatible link kind diff --git a/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr b/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr deleted file mode 100644 index c43cda3eb..000000000 --- a/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: incompatible link kind for `u8::MIN` - --> $DIR/incompatible-primitive-disambiguator.rs:2:6 - | -LL | //! [static@u8::MIN] - | ^^^^^^^^^^^^^^ this link resolved to an associated constant, which is not a static - | -note: the lint level is defined here - --> $DIR/incompatible-primitive-disambiguator.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: to link to the associated constant, prefix with `const@` - | -LL | //! [const@u8::MIN] - | ~~~~~~ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/intra-doc/macro-rules-error.rs b/src/test/rustdoc-ui/intra-doc/macro-rules-error.rs deleted file mode 100644 index 8490584c1..000000000 --- a/src/test/rustdoc-ui/intra-doc/macro-rules-error.rs +++ /dev/null @@ -1,26 +0,0 @@ -// `macro_rules` scopes are respected during doc link resolution. - -// compile-flags: --document-private-items - -#![deny(rustdoc::broken_intra_doc_links)] - -mod no_escape { - macro_rules! before_but_limited_to_module { - () => {}; - } -} - -/// [before_but_limited_to_module] -//~^ ERROR unresolved link to `before_but_limited_to_module` -/// [after] -//~^ ERROR unresolved link to `after` -/// [str] -fn check() {} - -macro_rules! after { - () => {}; -} - -macro_rules! str { - () => {}; -} diff --git a/src/test/rustdoc-ui/intra-doc/macro-rules-error.stderr b/src/test/rustdoc-ui/intra-doc/macro-rules-error.stderr deleted file mode 100644 index 6ad8084b0..000000000 --- a/src/test/rustdoc-ui/intra-doc/macro-rules-error.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error: unresolved link to `before_but_limited_to_module` - --> $DIR/macro-rules-error.rs:13:6 - | -LL | /// [before_but_limited_to_module] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `before_but_limited_to_module` in scope - | - = note: `macro_rules` named `before_but_limited_to_module` exists in this crate, but it is not in scope at this link's location -note: the lint level is defined here - --> $DIR/macro-rules-error.rs:5:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unresolved link to `after` - --> $DIR/macro-rules-error.rs:15:6 - | -LL | /// [after] - | ^^^^^ no item named `after` in scope - | - = note: `macro_rules` named `after` exists in this crate, but it is not in scope at this link's location - -error: aborting due to 2 previous errors - diff --git a/src/test/rustdoc-ui/intra-doc/macro-rules.rs b/src/test/rustdoc-ui/intra-doc/macro-rules.rs deleted file mode 100644 index 3aeb370ef..000000000 --- a/src/test/rustdoc-ui/intra-doc/macro-rules.rs +++ /dev/null @@ -1,24 +0,0 @@ -// check-pass -#![allow(rustdoc::private_intra_doc_links)] - -macro_rules! foo { - () => {}; -} - -/// [foo!] -pub fn baz() {} - -#[macro_use] -mod macros { - macro_rules! escaping { - () => {}; - } -} - -pub mod inner { - /// [foo!] - /// [escaping] - pub fn baz() { - foo!(); - } -} diff --git a/src/test/rustdoc-ui/intra-doc/malformed-generics.rs b/src/test/rustdoc-ui/intra-doc/malformed-generics.rs deleted file mode 100644 index 161625ed2..000000000 --- a/src/test/rustdoc-ui/intra-doc/malformed-generics.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] - -//! [Vec<] //~ ERROR -//! [Vec] //~ ERROR -//~^ WARN -//! [Vec>>] //~ ERROR -//~^ WARN -//! [Vec>>] //~ ERROR -//~^ WARN -//! [] //~ ERROR -//~^ WARN -//! [] //~ ERROR -//~^ WARN -//! [Vec::new()] //~ ERROR -//~^ WARN -//! [Vec<>] //~ ERROR -//~^ WARN -//! [Vec<>] //~ ERROR -//! [Vec<<>>] //~ ERROR - -// FIXME(#74563) support UFCS -//! [::into_iter] //~ ERROR -//~^ WARN -//! [ as IntoIterator>::iter] //~ ERROR -//~^ WARN diff --git a/src/test/rustdoc-ui/intra-doc/malformed-generics.stderr b/src/test/rustdoc-ui/intra-doc/malformed-generics.stderr deleted file mode 100644 index 08349fef8..000000000 --- a/src/test/rustdoc-ui/intra-doc/malformed-generics.stderr +++ /dev/null @@ -1,158 +0,0 @@ -error: unresolved link to `Vec<` - --> $DIR/malformed-generics.rs:3:6 - | -LL | //! [Vec<] - | ^^^^ unbalanced angle brackets - | -note: the lint level is defined here - --> $DIR/malformed-generics.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unresolved link to `Vec $DIR/malformed-generics.rs:4:6 - | -LL | //! [Vec` - --> $DIR/malformed-generics.rs:5:6 - | -LL | //! [Vec] - | ^^^^^^^^^^ unbalanced angle brackets - -error: unresolved link to `Vec>>` - --> $DIR/malformed-generics.rs:7:6 - | -LL | //! [Vec>>] - | ^^^^^^^^^^^^ unbalanced angle brackets - -error: unresolved link to `Vec>>` - --> $DIR/malformed-generics.rs:9:6 - | -LL | //! [Vec>>] - | ^^^^^^^^ unbalanced angle brackets - -error: unresolved link to ` $DIR/malformed-generics.rs:11:6 - | -LL | //! [ $DIR/malformed-generics.rs:12:6 - | -LL | //! [Vec::<] - | ^^^^^^ unbalanced angle brackets - -error: unresolved link to `` - --> $DIR/malformed-generics.rs:13:6 - | -LL | //! [] - | ^^^ missing type for generic parameters - -error: unresolved link to `` - --> $DIR/malformed-generics.rs:15:6 - | -LL | //! [] - | ^^^^^^^^^^^^^^^^ missing type for generic parameters - -error: unresolved link to `Vec::new` - --> $DIR/malformed-generics.rs:17:6 - | -LL | //! [Vec::new()] - | ^^^^^^^^^^^^^ has invalid path separator - -error: unresolved link to `Vec<>` - --> $DIR/malformed-generics.rs:19:6 - | -LL | //! [Vec<>] - | ^^^^^^^^ too many angle brackets - -error: unresolved link to `Vec<>` - --> $DIR/malformed-generics.rs:21:6 - | -LL | //! [Vec<>] - | ^^^^^ empty angle brackets - -error: unresolved link to `Vec<<>>` - --> $DIR/malformed-generics.rs:22:6 - | -LL | //! [Vec<<>>] - | ^^^^^^^ too many angle brackets - -error: unresolved link to `::into_iter` - --> $DIR/malformed-generics.rs:25:6 - | -LL | //! [::into_iter] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fully-qualified syntax is unsupported - | - = note: see https://github.com/rust-lang/rust/issues/74563 for more information - -error: unresolved link to ` as IntoIterator>::iter` - --> $DIR/malformed-generics.rs:27:6 - | -LL | //! [ as IntoIterator>::iter] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fully-qualified syntax is unsupported - | - = note: see https://github.com/rust-lang/rust/issues/74563 for more information - -warning: unclosed HTML tag `T` - --> $DIR/malformed-generics.rs:5:13 - | -LL | //! [Vec] - | ^^^ - | - = note: `#[warn(rustdoc::invalid_html_tags)]` on by default - -warning: unclosed HTML tag `T` - --> $DIR/malformed-generics.rs:7:13 - | -LL | //! [Vec>>] - | ^^^ - -warning: unclosed HTML tag `T` - --> $DIR/malformed-generics.rs:9:9 - | -LL | //! [Vec>>] - | ^^^ - -warning: unclosed HTML tag `T` - --> $DIR/malformed-generics.rs:13:6 - | -LL | //! [] - | ^^^ - -warning: unclosed HTML tag `invalid` - --> $DIR/malformed-generics.rs:15:6 - | -LL | //! [] - | ^^^^^^^^ - -warning: unclosed HTML tag `T` - --> $DIR/malformed-generics.rs:17:10 - | -LL | //! [Vec::new()] - | ^^^ - -warning: unclosed HTML tag `T` - --> $DIR/malformed-generics.rs:19:10 - | -LL | //! [Vec<>] - | ^^^ - -warning: unclosed HTML tag `Vec` - --> $DIR/malformed-generics.rs:25:6 - | -LL | //! [::into_iter] - | ^^^^ - -warning: unclosed HTML tag `T` - --> $DIR/malformed-generics.rs:27:10 - | -LL | //! [ as IntoIterator>::iter] - | ^^^ - -error: aborting due to 15 previous errors; 9 warnings emitted - diff --git a/src/test/rustdoc-ui/intra-doc/non-path-primitives.rs b/src/test/rustdoc-ui/intra-doc/non-path-primitives.rs deleted file mode 100644 index 587cbad68..000000000 --- a/src/test/rustdoc-ui/intra-doc/non-path-primitives.rs +++ /dev/null @@ -1,34 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] -#![feature(intra_doc_pointers)] -// These are links that could reasonably expected to work, but don't. - -// `[]` isn't supported because it had too many false positives. -//! [X]([T]::not_here) -//! [Y](&[]::not_here) -//! [X]([]::not_here) -//! [Y]([T;N]::not_here) - -// These don't work because markdown syntax doesn't allow it. -//! [[T]::rotate_left] //~ ERROR unresolved link to `T` -//! [&[]::not_here] -//![Z]([T; N]::map) //~ ERROR unresolved link to `Z` -//! [`[T; N]::map`] -//! [[]::map] -//! [Z][] //~ ERROR unresolved link to `Z` -//! -//! [Z]: [T; N]::map //~ ERROR unresolved link to `Z` - -// `()` isn't supported because it had too many false positives. -//! [()::not_here] -//! [X]((,)::not_here) -//! [(,)::not_here] - -// FIXME: Associated items on some primitives aren't working, because the impls -// are part of the compiler instead of being part of the source code. -//! [unit::eq] //~ ERROR unresolved -//! [tuple::eq] //~ ERROR unresolved -//! [fn::eq] //~ ERROR unresolved - -// FIXME(#78800): This breaks because it's a blanket impl -// (I think? Might break for other reasons too.) -//! [reference::deref] //~ ERROR unresolved diff --git a/src/test/rustdoc-ui/intra-doc/non-path-primitives.stderr b/src/test/rustdoc-ui/intra-doc/non-path-primitives.stderr deleted file mode 100644 index 8ec894d10..000000000 --- a/src/test/rustdoc-ui/intra-doc/non-path-primitives.stderr +++ /dev/null @@ -1,63 +0,0 @@ -error: unresolved link to `T` - --> $DIR/non-path-primitives.rs:12:7 - | -LL | //! [[T]::rotate_left] - | ^ no item named `T` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` -note: the lint level is defined here - --> $DIR/non-path-primitives.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unresolved link to `Z` - --> $DIR/non-path-primitives.rs:14:5 - | -LL | //![Z]([T; N]::map) - | ^ no item named `Z` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -error: unresolved link to `Z` - --> $DIR/non-path-primitives.rs:17:6 - | -LL | //! [Z][] - | ^ no item named `Z` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -error: unresolved link to `Z` - --> $DIR/non-path-primitives.rs:19:6 - | -LL | //! [Z]: [T; N]::map - | ^ no item named `Z` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -error: unresolved link to `unit::eq` - --> $DIR/non-path-primitives.rs:28:6 - | -LL | //! [unit::eq] - | ^^^^^^^^ the builtin type `unit` has no associated item named `eq` - -error: unresolved link to `tuple::eq` - --> $DIR/non-path-primitives.rs:29:6 - | -LL | //! [tuple::eq] - | ^^^^^^^^^ the builtin type `tuple` has no associated item named `eq` - -error: unresolved link to `fn::eq` - --> $DIR/non-path-primitives.rs:30:6 - | -LL | //! [fn::eq] - | ^^^^^^ the builtin type `fn` has no associated item named `eq` - -error: unresolved link to `reference::deref` - --> $DIR/non-path-primitives.rs:34:6 - | -LL | //! [reference::deref] - | ^^^^^^^^^^^^^^^^ the builtin type `reference` has no associated item named `deref` - -error: aborting due to 8 previous errors - diff --git a/src/test/rustdoc-ui/intra-doc/pointer-reexports-allowed.rs b/src/test/rustdoc-ui/intra-doc/pointer-reexports-allowed.rs deleted file mode 100644 index 8654a8e1b..000000000 --- a/src/test/rustdoc-ui/intra-doc/pointer-reexports-allowed.rs +++ /dev/null @@ -1,4 +0,0 @@ -// aux-build:pointer-reexports-allowed.rs -// check-pass -extern crate inner; -pub use inner::foo; diff --git a/src/test/rustdoc-ui/intra-doc/prim-conflict.rs b/src/test/rustdoc-ui/intra-doc/prim-conflict.rs deleted file mode 100644 index 2c1a8b535..000000000 --- a/src/test/rustdoc-ui/intra-doc/prim-conflict.rs +++ /dev/null @@ -1,30 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] -//~^ NOTE lint level is defined - -/// [char] -//~^ ERROR both a module and a builtin type -//~| NOTE ambiguous link -//~| HELP to link to the module -//~| HELP to link to the builtin type - -/// [type@char] -//~^ ERROR both a module and a builtin type -//~| NOTE ambiguous link -//~| HELP to link to the module -//~| HELP to link to the builtin type - -/// [mod@char] // ok -/// [prim@char] // ok - -/// [struct@char] -//~^ ERROR incompatible link -//~| HELP prefix with `mod@` -//~| NOTE resolved to a module -pub mod char {} - -pub mod inner { - //! [struct@char] - //~^ ERROR incompatible link - //~| HELP prefix with `prim@` - //~| NOTE resolved to a builtin type -} diff --git a/src/test/rustdoc-ui/intra-doc/prim-conflict.stderr b/src/test/rustdoc-ui/intra-doc/prim-conflict.stderr deleted file mode 100644 index 6ef3b7eab..000000000 --- a/src/test/rustdoc-ui/intra-doc/prim-conflict.stderr +++ /dev/null @@ -1,59 +0,0 @@ -error: `char` is both a module and a builtin type - --> $DIR/prim-conflict.rs:4:6 - | -LL | /// [char] - | ^^^^ ambiguous link - | -note: the lint level is defined here - --> $DIR/prim-conflict.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: to link to the module, prefix with `mod@` - | -LL | /// [mod@char] - | ++++ -help: to link to the builtin type, prefix with `prim@` - | -LL | /// [prim@char] - | +++++ - -error: `char` is both a module and a builtin type - --> $DIR/prim-conflict.rs:10:6 - | -LL | /// [type@char] - | ^^^^^^^^^ ambiguous link - | -help: to link to the module, prefix with `mod@` - | -LL | /// [mod@char] - | ~~~~ -help: to link to the builtin type, prefix with `prim@` - | -LL | /// [prim@char] - | ~~~~~ - -error: incompatible link kind for `char` - --> $DIR/prim-conflict.rs:19:6 - | -LL | /// [struct@char] - | ^^^^^^^^^^^ this link resolved to a module, which is not a struct - | -help: to link to the module, prefix with `mod@` - | -LL | /// [mod@char] - | ~~~~ - -error: incompatible link kind for `char` - --> $DIR/prim-conflict.rs:26:10 - | -LL | //! [struct@char] - | ^^^^^^^^^^^ this link resolved to a builtin type, which is not a struct - | -help: to link to the builtin type, prefix with `prim@` - | -LL | //! [prim@char] - | ~~~~~ - -error: aborting due to 4 previous errors - diff --git a/src/test/rustdoc-ui/intra-doc/private-from-crate-level.rs b/src/test/rustdoc-ui/intra-doc/private-from-crate-level.rs deleted file mode 100644 index e429e75b2..000000000 --- a/src/test/rustdoc-ui/intra-doc/private-from-crate-level.rs +++ /dev/null @@ -1,6 +0,0 @@ -// check-pass - -//! [my_module] -//~^ WARN public documentation for `private_from_crate_level` links to private item `my_module` - -mod my_module {} diff --git a/src/test/rustdoc-ui/intra-doc/private-from-crate-level.stderr b/src/test/rustdoc-ui/intra-doc/private-from-crate-level.stderr deleted file mode 100644 index 4d5bd70bf..000000000 --- a/src/test/rustdoc-ui/intra-doc/private-from-crate-level.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: public documentation for `private_from_crate_level` links to private item `my_module` - --> $DIR/private-from-crate-level.rs:3:6 - | -LL | //! [my_module] - | ^^^^^^^^^ this item is private - | - = note: this link will resolve properly if you pass `--document-private-items` - = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default - -warning: 1 warning emitted - diff --git a/src/test/rustdoc-ui/intra-doc/private.private.stderr b/src/test/rustdoc-ui/intra-doc/private.private.stderr deleted file mode 100644 index 6661e9021..000000000 --- a/src/test/rustdoc-ui/intra-doc/private.private.stderr +++ /dev/null @@ -1,27 +0,0 @@ -warning: public documentation for `DocMe` links to private item `DontDocMe` - --> $DIR/private.rs:7:11 - | -LL | /// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x] - | ^^^^^^^^^ this item is private - | - = note: this link resolves only because you passed `--document-private-items`, but will break without - = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default - -warning: public documentation for `DocMe` links to private item `DontDocMe::f` - --> $DIR/private.rs:7:23 - | -LL | /// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x] - | ^^^^^^^^^^^^ this item is private - | - = note: this link resolves only because you passed `--document-private-items`, but will break without - -warning: public documentation for `DocMe` links to private item `DontDocMe::x` - --> $DIR/private.rs:7:38 - | -LL | /// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x] - | ^^^^^^^^^^^^ this item is private - | - = note: this link resolves only because you passed `--document-private-items`, but will break without - -warning: 3 warnings emitted - diff --git a/src/test/rustdoc-ui/intra-doc/private.public.stderr b/src/test/rustdoc-ui/intra-doc/private.public.stderr deleted file mode 100644 index 45b51e12e..000000000 --- a/src/test/rustdoc-ui/intra-doc/private.public.stderr +++ /dev/null @@ -1,27 +0,0 @@ -warning: public documentation for `DocMe` links to private item `DontDocMe` - --> $DIR/private.rs:7:11 - | -LL | /// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x] - | ^^^^^^^^^ this item is private - | - = note: this link will resolve properly if you pass `--document-private-items` - = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default - -warning: public documentation for `DocMe` links to private item `DontDocMe::f` - --> $DIR/private.rs:7:23 - | -LL | /// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x] - | ^^^^^^^^^^^^ this item is private - | - = note: this link will resolve properly if you pass `--document-private-items` - -warning: public documentation for `DocMe` links to private item `DontDocMe::x` - --> $DIR/private.rs:7:38 - | -LL | /// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x] - | ^^^^^^^^^^^^ this item is private - | - = note: this link will resolve properly if you pass `--document-private-items` - -warning: 3 warnings emitted - diff --git a/src/test/rustdoc-ui/intra-doc/private.rs b/src/test/rustdoc-ui/intra-doc/private.rs deleted file mode 100644 index 525332dda..000000000 --- a/src/test/rustdoc-ui/intra-doc/private.rs +++ /dev/null @@ -1,18 +0,0 @@ -// check-pass -// revisions: public private -// [private]compile-flags: --document-private-items - -// make sure to update `rustdoc/intra-doc/private.rs` if you update this file - -/// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x] -//~^ WARNING public documentation for `DocMe` links to private item `DontDocMe` -//~| WARNING public documentation for `DocMe` links to private item `DontDocMe::x` -//~| WARNING public documentation for `DocMe` links to private item `DontDocMe::f` -pub struct DocMe; -struct DontDocMe { - x: usize, -} - -impl DontDocMe { - fn f() {} -} diff --git a/src/test/rustdoc-ui/intra-doc/span-ice-55723.rs b/src/test/rustdoc-ui/intra-doc/span-ice-55723.rs deleted file mode 100644 index 041ec2932..000000000 --- a/src/test/rustdoc-ui/intra-doc/span-ice-55723.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] - -// An error in calculating spans while reporting intra-doc link resolution errors caused rustdoc to -// attempt to slice in the middle of a multibyte character. See -// https://github.com/rust-lang/rust/issues/55723 - -/// ## For example: -/// -/// (arr[i]) -//~^ ERROR `i` -pub fn test_ice() { - unimplemented!(); -} diff --git a/src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr b/src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr deleted file mode 100644 index e8ee40ad4..000000000 --- a/src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: unresolved link to `i` - --> $DIR/span-ice-55723.rs:9:10 - | -LL | /// (arr[i]) - | ^ no item named `i` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` -note: the lint level is defined here - --> $DIR/span-ice-55723.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/intra-doc/through-proc-macro.rs b/src/test/rustdoc-ui/intra-doc/through-proc-macro.rs deleted file mode 100644 index 7628c3928..000000000 --- a/src/test/rustdoc-ui/intra-doc/through-proc-macro.rs +++ /dev/null @@ -1,18 +0,0 @@ -// check-pass -// aux-build:through-proc-macro-aux.rs -// build-aux-docs - -// Ensure rustdoc doesn't panic on this code. - -#![warn(rustdoc::broken_intra_doc_links)] - -extern crate some_macros; - -#[some_macros::second] -pub enum Boom { - /// [Oooops] - //~^ WARNING unresolved link to `Oooops` - Bam, -} - -fn main() {} diff --git a/src/test/rustdoc-ui/intra-doc/through-proc-macro.stderr b/src/test/rustdoc-ui/intra-doc/through-proc-macro.stderr deleted file mode 100644 index 508d0683d..000000000 --- a/src/test/rustdoc-ui/intra-doc/through-proc-macro.stderr +++ /dev/null @@ -1,15 +0,0 @@ -warning: unresolved link to `Oooops` - --> $DIR/through-proc-macro.rs:13:10 - | -LL | /// [Oooops] - | ^^^^^^ no item named `Oooops` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` -note: the lint level is defined here - --> $DIR/through-proc-macro.rs:7:9 - | -LL | #![warn(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: 1 warning emitted - diff --git a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.rs b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.rs deleted file mode 100644 index 0aa1e5a41..000000000 --- a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.rs +++ /dev/null @@ -1,14 +0,0 @@ -// normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" -#![deny(warnings)] - -//! Linking to [foo@banana] and [`bar@banana!()`]. -//~^ ERROR unknown disambiguator `foo` -//~| ERROR unknown disambiguator `bar` -//! And to [no disambiguator](@nectarine) and [another](@apricot!()). -//~^ ERROR unknown disambiguator `` -//~| ERROR unknown disambiguator `` -//! And with weird backticks: [``foo@hello``] [foo`@`hello]. -//~^ ERROR unknown disambiguator `foo` -//~| ERROR unknown disambiguator `foo` - -fn main() {} diff --git a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr deleted file mode 100644 index 19e541736..000000000 --- a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr +++ /dev/null @@ -1,56 +0,0 @@ -error: unknown disambiguator `foo` - --> $DIR/unknown-disambiguator.rs:4:17 - | -LL | //! Linking to [foo@banana] and [`bar@banana!()`]. - | ^^^ - | - = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators -note: the lint level is defined here - --> $DIR/unknown-disambiguator.rs:2:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]` - -error: unknown disambiguator `bar` - --> $DIR/unknown-disambiguator.rs:4:35 - | -LL | //! Linking to [foo@banana] and [`bar@banana!()`]. - | ^^^ - | - = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators - -error: unknown disambiguator `foo` - --> $DIR/unknown-disambiguator.rs:10:34 - | -LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello]. - | ^^^ - | - = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators - -error: unknown disambiguator `foo` - --> $DIR/unknown-disambiguator.rs:10:48 - | -LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello]. - | ^^^ - | - = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators - -error: unknown disambiguator `` - --> $DIR/unknown-disambiguator.rs:7:31 - | -LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()). - | ^ - | - = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators - -error: unknown disambiguator `` - --> $DIR/unknown-disambiguator.rs:7:57 - | -LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()). - | ^ - | - = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators - -error: aborting due to 6 previous errors - diff --git a/src/test/rustdoc-ui/intra-doc/unresolved-import-recovery.rs b/src/test/rustdoc-ui/intra-doc/unresolved-import-recovery.rs deleted file mode 100644 index c71e5bee1..000000000 --- a/src/test/rustdoc-ui/intra-doc/unresolved-import-recovery.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Regression test for issue #95879. - -use unresolved_crate::module::Name; //~ ERROR failed to resolve - -/// [Name] -pub struct S; diff --git a/src/test/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr b/src/test/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr deleted file mode 100644 index b54f82006..000000000 --- a/src/test/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0433]: failed to resolve: maybe a missing crate `unresolved_crate`? - --> $DIR/unresolved-import-recovery.rs:3:5 - | -LL | use unresolved_crate::module::Name; - | ^^^^^^^^^^^^^^^^ maybe a missing crate `unresolved_crate`? - | - = help: consider adding `extern crate unresolved_crate` to use the `unresolved_crate` crate - -error: Compilation failed, aborting rustdoc - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0433`. diff --git a/src/test/rustdoc-ui/intra-doc/unused-extern-crate.rs b/src/test/rustdoc-ui/intra-doc/unused-extern-crate.rs deleted file mode 100644 index 956583093..000000000 --- a/src/test/rustdoc-ui/intra-doc/unused-extern-crate.rs +++ /dev/null @@ -1,5 +0,0 @@ -// compile-flags: --extern zip=whatever.rlib -#![deny(rustdoc::broken_intra_doc_links)] -/// See [zip] crate. -//~^ ERROR unresolved -pub struct ArrayZip; diff --git a/src/test/rustdoc-ui/intra-doc/unused-extern-crate.stderr b/src/test/rustdoc-ui/intra-doc/unused-extern-crate.stderr deleted file mode 100644 index 815324563..000000000 --- a/src/test/rustdoc-ui/intra-doc/unused-extern-crate.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: unresolved link to `zip` - --> $DIR/unused-extern-crate.rs:3:10 - | -LL | /// See [zip] crate. - | ^^^ no item named `zip` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` -note: the lint level is defined here - --> $DIR/unused-extern-crate.rs:2:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/rustdoc-ui/intra-doc/warning-crlf.rs b/src/test/rustdoc-ui/intra-doc/warning-crlf.rs deleted file mode 100644 index ceb62f6d1..000000000 --- a/src/test/rustdoc-ui/intra-doc/warning-crlf.rs +++ /dev/null @@ -1,26 +0,0 @@ -// ignore-tidy-cr -// check-pass - -// This file checks the spans of intra-link warnings in a file with CRLF line endings. The -// .gitattributes file in this directory should enforce it. - -/// [error] -pub struct A; -//~^^ WARNING `error` - -/// -/// docs [error1] -//~^ WARNING `error1` - -/// docs [error2] -/// -pub struct B; -//~^^^ WARNING `error2` - -/** - * This is a multi-line comment. - * - * It also has an [error]. - */ -pub struct C; -//~^^^ WARNING `error` diff --git a/src/test/rustdoc-ui/intra-doc/warning-crlf.stderr b/src/test/rustdoc-ui/intra-doc/warning-crlf.stderr deleted file mode 100644 index c309a55f4..000000000 --- a/src/test/rustdoc-ui/intra-doc/warning-crlf.stderr +++ /dev/null @@ -1,35 +0,0 @@ -warning: unresolved link to `error` - --> $DIR/warning-crlf.rs:7:6 - | -LL | /// [error] - | ^^^^^ no item named `error` 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 `error1` - --> $DIR/warning-crlf.rs:12:11 - | -LL | /// docs [error1] - | ^^^^^^ no item named `error1` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `error2` - --> $DIR/warning-crlf.rs:15:11 - | -LL | /// docs [error2] - | ^^^^^^ no item named `error2` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `error` - --> $DIR/warning-crlf.rs:23:20 - | -LL | * It also has an [error]. - | ^^^^^ no item named `error` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: 4 warnings emitted - diff --git a/src/test/rustdoc-ui/intra-doc/warning.rs b/src/test/rustdoc-ui/intra-doc/warning.rs deleted file mode 100644 index eab1f0348..000000000 --- a/src/test/rustdoc-ui/intra-doc/warning.rs +++ /dev/null @@ -1,84 +0,0 @@ -// check-pass - - //! Test with [Foo::baz], [Bar::foo], ... -//~^ WARNING `Foo::baz` -//~| WARNING `Bar::foo` - //! , [Uniooon::X] and [Qux::Z]. -//~^ WARNING `Uniooon::X` -//~| WARNING `Qux::Z` - //! - //! , [Uniooon::X] and [Qux::Z]. -//~^ WARNING `Uniooon::X` -//~| WARNING `Qux::Z` - - /// [Qux:Y] -//~^ WARNING `Qux:Y` -pub struct Foo { - pub bar: usize, -} - -/// Foo -/// bar [BarA] bar //~ WARNING `BarA` -/// baz -pub fn a() {} - -/** - * Foo - * bar [BarB] bar //~ WARNING `BarB` - * baz - */ -pub fn b() {} - -/** Foo - -bar [BarC] bar //~ WARNING `BarC` -baz - - let bar_c_1 = 0; - let bar_c_2 = 0; - let g = [bar_c_1]; - let h = g[bar_c_2]; - -*/ -pub fn c() {} - -#[doc = "Foo\nbar [BarD] bar\nbaz"] //~ WARNING `BarD` -pub fn d() {} - -macro_rules! f { - ($f:expr) => { - #[doc = $f] //~ WARNING `BarF` - pub fn f() {} - } -} -f!("Foo\nbar [BarF] bar\nbaz"); - -/** # for example, - * - * time to introduce a link [error]*/ //~ WARNING `error` -pub struct A; - -/** - * # for example, - * - * time to introduce a link [error] //~ WARNING `error` - */ -pub struct B; - -#[doc = "single line [error]"] //~ WARNING `error` -pub struct C; - -#[doc = "single line with \"escaping\" [error]"] //~ WARNING `error` -pub struct D; - -/// Item docs. //~ WARNING `error` -#[doc="Hello there!"] -/// [error] -pub struct E; - -/// -/// docs [error1] //~ WARNING `error1` - -/// docs [error2] //~ WARNING `error2` -/// -pub struct F; diff --git a/src/test/rustdoc-ui/intra-doc/warning.stderr b/src/test/rustdoc-ui/intra-doc/warning.stderr deleted file mode 100644 index 19399a0df..000000000 --- a/src/test/rustdoc-ui/intra-doc/warning.stderr +++ /dev/null @@ -1,175 +0,0 @@ -warning: unresolved link to `Foo::baz` - --> $DIR/warning.rs:3:23 - | -LL | //! Test with [Foo::baz], [Bar::foo], ... - | ^^^^^^^^ the struct `Foo` has no field or associated item named `baz` - | - = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default - -warning: unresolved link to `Bar::foo` - --> $DIR/warning.rs:3:35 - | -LL | //! Test with [Foo::baz], [Bar::foo], ... - | ^^^^^^^^ no item named `Bar` in scope - -warning: unresolved link to `Uniooon::X` - --> $DIR/warning.rs:6:13 - | -LL | //! , [Uniooon::X] and [Qux::Z]. - | ^^^^^^^^^^ no item named `Uniooon` in scope - -warning: unresolved link to `Qux::Z` - --> $DIR/warning.rs:6:30 - | -LL | //! , [Uniooon::X] and [Qux::Z]. - | ^^^^^^ no item named `Qux` in scope - -warning: unresolved link to `Uniooon::X` - --> $DIR/warning.rs:10:14 - | -LL | //! , [Uniooon::X] and [Qux::Z]. - | ^^^^^^^^^^ no item named `Uniooon` in scope - -warning: unresolved link to `Qux::Z` - --> $DIR/warning.rs:10:31 - | -LL | //! , [Uniooon::X] and [Qux::Z]. - | ^^^^^^ no item named `Qux` in scope - -warning: unresolved link to `Qux:Y` - --> $DIR/warning.rs:14:13 - | -LL | /// [Qux:Y] - | ^^^^^ no item named `Qux:Y` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `BarA` - --> $DIR/warning.rs:21:10 - | -LL | /// bar [BarA] bar - | ^^^^ no item named `BarA` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `BarB` - --> $DIR/warning.rs:27:9 - | -LL | * bar [BarB] bar - | ^^^^ no item named `BarB` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `BarC` - --> $DIR/warning.rs:34:6 - | -LL | bar [BarC] bar - | ^^^^ no item named `BarC` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `BarD` - --> $DIR/warning.rs:45:1 - | -LL | #[doc = "Foo\nbar [BarD] bar\nbaz"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the link appears in this line: - - bar [BarD] bar - ^^^^ - = note: no item named `BarD` in scope - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `BarF` - --> $DIR/warning.rs:50:9 - | -LL | #[doc = $f] - | ^^^^^^^^^^^ -... -LL | f!("Foo\nbar [BarF] bar\nbaz"); - | ------------------------------ in this macro invocation - | - = note: the link appears in this line: - - bar [BarF] bar - ^^^^ - = note: no item named `BarF` in scope - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - = note: this warning originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info) - -warning: unresolved link to `error` - --> $DIR/warning.rs:58:30 - | -LL | * time to introduce a link [error]*/ - | ^^^^^ no item named `error` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `error` - --> $DIR/warning.rs:64:30 - | -LL | * time to introduce a link [error] - | ^^^^^ no item named `error` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `error` - --> $DIR/warning.rs:68:1 - | -LL | #[doc = "single line [error]"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the link appears in this line: - - single line [error] - ^^^^^ - = note: no item named `error` in scope - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `error` - --> $DIR/warning.rs:71:1 - | -LL | #[doc = "single line with \"escaping\" [error]"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the link appears in this line: - - single line with "escaping" [error] - ^^^^^ - = note: no item named `error` in scope - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `error` - --> $DIR/warning.rs:74:1 - | -LL | / /// Item docs. -LL | | #[doc="Hello there!"] -LL | | /// [error] - | |___________^ - | - = note: the link appears in this line: - - [error] - ^^^^^ - = note: no item named `error` in scope - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `error1` - --> $DIR/warning.rs:80:11 - | -LL | /// docs [error1] - | ^^^^^^ no item named `error1` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: unresolved link to `error2` - --> $DIR/warning.rs:82:11 - | -LL | /// docs [error2] - | ^^^^^^ no item named `error2` in scope - | - = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` - -warning: 19 warnings emitted - diff --git a/src/test/rustdoc-ui/invalid-cfg.rs b/src/test/rustdoc-ui/invalid-cfg.rs deleted file mode 100644 index d237b8605..000000000 --- a/src/test/rustdoc-ui/invalid-cfg.rs +++ /dev/null @@ -1,4 +0,0 @@ -#![feature(doc_cfg)] -#[doc(cfg = "x")] //~ ERROR not followed by parentheses -#[doc(cfg(x, y))] //~ ERROR multiple `cfg` predicates -struct S {} diff --git a/src/test/rustdoc-ui/invalid-cfg.stderr b/src/test/rustdoc-ui/invalid-cfg.stderr deleted file mode 100644 index dae238b05..000000000 --- a/src/test/rustdoc-ui/invalid-cfg.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: `cfg` is not followed by parentheses - --> $DIR/invalid-cfg.rs:2:7 - | -LL | #[doc(cfg = "x")] - | ^^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)` - -error: multiple `cfg` predicates are specified - --> $DIR/invalid-cfg.rs:3:14 - | -LL | #[doc(cfg(x, y))] - | ^ - -error: aborting due to 2 previous errors - diff --git a/src/test/rustdoc-ui/invalid-doc-attr.rs b/src/test/rustdoc-ui/invalid-doc-attr.rs deleted file mode 100644 index de004b41e..000000000 --- a/src/test/rustdoc-ui/invalid-doc-attr.rs +++ /dev/null @@ -1,32 +0,0 @@ -#![crate_type = "lib"] -#![deny(warnings)] - -#[doc(test(no_crate_inject))] -//~^ ERROR can only be applied at the crate level -//~| WARN is being phased out -//~| HELP to apply to the crate, use an inner attribute -//~| SUGGESTION #![doc(test(no_crate_inject))] -#[doc(inline)] -//~^ ERROR can only be applied to a `use` item -//~| WARN is being phased out -pub fn foo() {} - -pub mod bar { - #![doc(test(no_crate_inject))] - //~^ ERROR can only be applied at the crate level - //~| WARN is being phased out - - #[doc(test(no_crate_inject))] - //~^ ERROR can only be applied at the crate level - //~| WARN is being phased out - #[doc(inline)] - //~^ ERROR can only be applied to a `use` item - //~| WARN is being phased out - pub fn baz() {} -} - -#[doc(inline)] -#[doc(no_inline)] -//~^^ ERROR conflicting doc inlining attributes -//~| HELP remove one of the conflicting attributes -pub use bar::baz; diff --git a/src/test/rustdoc-ui/invalid-doc-attr.stderr b/src/test/rustdoc-ui/invalid-doc-attr.stderr deleted file mode 100644 index 3c66e587b..000000000 --- a/src/test/rustdoc-ui/invalid-doc-attr.stderr +++ /dev/null @@ -1,78 +0,0 @@ -error: this attribute can only be applied at the crate level - --> $DIR/invalid-doc-attr.rs:4:7 - | -LL | #[doc(test(no_crate_inject))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information -note: the lint level is defined here - --> $DIR/invalid-doc-attr.rs:2:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]` -help: to apply to the crate, use an inner attribute - | -LL | #![doc(test(no_crate_inject))] - | - -error: this attribute can only be applied to a `use` item - --> $DIR/invalid-doc-attr.rs:9:7 - | -LL | #[doc(inline)] - | ^^^^^^ only applicable on `use` items -... -LL | pub fn foo() {} - | ------------ not a `use` item - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information - -error: this attribute can only be applied at the crate level - --> $DIR/invalid-doc-attr.rs:15:12 - | -LL | #![doc(test(no_crate_inject))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information - -error: conflicting doc inlining attributes - --> $DIR/invalid-doc-attr.rs:28:7 - | -LL | #[doc(inline)] - | ^^^^^^ this attribute... -LL | #[doc(no_inline)] - | ^^^^^^^^^ ...conflicts with this attribute - | - = help: remove one of the conflicting attributes - -error: this attribute can only be applied at the crate level - --> $DIR/invalid-doc-attr.rs:19:11 - | -LL | #[doc(test(no_crate_inject))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information - -error: this attribute can only be applied to a `use` item - --> $DIR/invalid-doc-attr.rs:22:11 - | -LL | #[doc(inline)] - | ^^^^^^ only applicable on `use` items -... -LL | pub fn baz() {} - | ------------ not a `use` item - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information - -error: aborting due to 6 previous errors - diff --git a/src/test/rustdoc-ui/invalid-html-self-closing-tag.rs b/src/test/rustdoc-ui/invalid-html-self-closing-tag.rs deleted file mode 100644 index d973a53cb..000000000 --- a/src/test/rustdoc-ui/invalid-html-self-closing-tag.rs +++ /dev/null @@ -1,70 +0,0 @@ -#![deny(rustdoc::invalid_html_tags)] - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct A; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct B; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct C; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct D; - -///

-pub struct G; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct H; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct I; - -///
-pub struct J; - -///
-pub struct K; - -/// -pub struct L; - -/// -//~^ ERROR invalid self-closing HTML tag `a` -pub struct M; - -/// -//~^ ERROR invalid self-closing HTML tag `a` -pub struct N; - -/// -//~^ ERROR invalid self-closing HTML tag `a` -pub struct O; - -/// -pub struct P; - -/// -pub struct Q; - -/// -//~^ ERROR unclosed HTML tag `rect` -pub struct R; - -/// -pub struct S; diff --git a/src/test/rustdoc-ui/invalid-html-self-closing-tag.stderr b/src/test/rustdoc-ui/invalid-html-self-closing-tag.stderr deleted file mode 100644 index e45edfb43..000000000 --- a/src/test/rustdoc-ui/invalid-html-self-closing-tag.stderr +++ /dev/null @@ -1,80 +0,0 @@ -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:3:5 - | -LL | ///

- | ^^ - | -note: the lint level is defined here - --> $DIR/invalid-html-self-closing-tag.rs:1:9 - | -LL | #![deny(rustdoc::invalid_html_tags)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:7:5 - | -LL | ///

- | ^^ - -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:11:5 - | -LL | ///

- | ^^ - -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:15:5 - | -LL | ///

- | ^^ - -error: unclosed quoted HTML attribute on tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:19:14 - | -LL | ///

- | ^^ - -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:34:5 - | -LL | ///

- | ^^ - -error: invalid self-closing HTML tag `a` - --> $DIR/invalid-html-self-closing-tag.rs:47:5 - | -LL | /// - | ^^ - -error: invalid self-closing HTML tag `a` - --> $DIR/invalid-html-self-closing-tag.rs:51:5 - | -LL | /// - | ^^ - -error: invalid self-closing HTML tag `a` - --> $DIR/invalid-html-self-closing-tag.rs:55:5 - | -LL | /// - | ^^ - -error: unclosed HTML tag `rect` - --> $DIR/invalid-html-self-closing-tag.rs:65:10 - | -LL | /// - | ^^^^^ - -error: aborting due to 12 previous errors - diff --git a/src/test/rustdoc-ui/invalid-html-tags.rs b/src/test/rustdoc-ui/invalid-html-tags.rs deleted file mode 100644 index 317f1fd1d..000000000 --- a/src/test/rustdoc-ui/invalid-html-tags.rs +++ /dev/null @@ -1,123 +0,0 @@ -#![deny(rustdoc::invalid_html_tags)] - -//!

💩

-//~^ ERROR unclosed HTML tag `p` -//~^^ ERROR unclosed HTML tag `p` - -/// -/// -/// -//~^ ERROR unclosed HTML tag `unknown` -/// < ok -/// -/// -pub fn d() {} - -// Unclosed tags shouldn't warn if they are nested inside a -/// -pub fn e() {} - -// Closing tags need to have ">" at the end, otherwise it's not a closing tag! -///

-///
-/// -/// -/// -pub fn g() {} - -/// -pub fn h() {} - -/// $DIR/invalid-html-tags.rs:3:5 - | -LL | //!

💩

- | ^^^ - | -note: the lint level is defined here - --> $DIR/invalid-html-tags.rs:1:9 - | -LL | #![deny(rustdoc::invalid_html_tags)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unclosed HTML tag `p` - --> $DIR/invalid-html-tags.rs:3:9 - | -LL | //!

💩

- | ^^^ - -error: unclosed HTML tag `unknown` - --> $DIR/invalid-html-tags.rs:11:5 - | -LL | /// - | ^^^^^^^^^ - -error: unclosed HTML tag `script` - --> $DIR/invalid-html-tags.rs:14:5 - | -LL | ///