rust/tests/rustdoc-ui
Keith-Cancel 73a991fb9d Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized.
Revert, but without type const.

Update symbol for feature err, then update suggestion output, and lastly update tests that change because of those.

Update these new tests with the correct syntax, and few existing tests with the new outputs the merge with main added.

Fix for tidyfmt and some errors when manually resolving a merge conflicts.

Update these tests to use update error messages and type const syntax.

Update comments and error message to use new syntax instead of old type_const attribute.

Remove the type_const attribute

update some more tests to use the new syntax.

Update these test cases.

update feature gate test

Change gate logic for `mgca_type_const_syntax` to work also if `min_generic_const_args` is enabled.

Create a new feature gate that checks for the feature before expansion.

Make rustfmt handle the `type const` syntax correctly.

Add a convience method to check if a RhsKind is type const.

Rename `Const` discriminant to `Body` for `ConstItemRhsKind`

Give the `TraitItemKind` flag an enum instead of a simple bool to better describe what the flag is for.

Update formatting for these match statements.

Update clippy test to use type const syntax.

Update test to use type const syntax.

update rustfmt to match ast items.

Update clippy to match ast and hir items.

Few more test cases that used old attribute, instead of 'type const'

Update to match the output from the feature gate checks.

tidyfmt adjustments.

Update the is_type_const, so I can constrain record!(..) in encoder.rs

Update conditional compilation test.

Move the feature gate to after expansion to allow for cfg(...) to work.

Update some more tests to use the new syntax.

Update type const tests in associated-const-bindings to use new syntax.

Don't check based off the attribute, but the item here.

Update some tests outside of the const_generics folder that were using #[type_const]

update the tests in associated consts that use #[type_const] to use type const

Update these mgca tests with the type const syntax.

Add a flag to TraitItemKind for detecting type const for now. Maybe later change ItemConstRhs to have optional consts but that touches a lot more lines of code.

Don't need into for these now that it's a query.

Add is_type_const query to handle foreign def ids.

update this test to use type const syntax.

Fix logic here, we only want to lower if there is expression in this case.

Update built-in macros to use ConstItemRhsKind

Update more instance of the old ConstItemRhs.

Rename ConstItemKind to ConstItemRhsKind, I noticed there is a typed called ConstantItemKind, so add the Rhs to the name to avoid confusion.

Update lower to use ConstItemKind

Add an other helper method to check if the rhs kinda has an expr.

Update item parse to use ConstItemKind enum.

Felt the field name could a be little clear when editing a few other things.

Change the ConstItem struct see know if we have a type const or regular const.

Make sure this syntax is properly feature gated.
2026-02-09 07:59:24 -08:00
..
argfile Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
auxiliary Move rustdoc tests to appropriate subdirectories 2025-10-26 19:16:41 -07:00
coverage compiletest: Support matching on diagnostics without a span 2025-03-25 17:33:09 +03:00
deref Move rustdoc tests to appropriate subdirectories 2025-10-26 19:16:41 -07:00
doctest Emit a future error warning for duplicate doc attribute 2026-02-04 10:54:44 +01:00
error-in-impl-trait Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
generate-link-to-definition compiletest: Support matching on diagnostics without a span 2025-03-25 17:33:09 +03:00
intra-doc Add regression test for #151411 2026-01-28 00:23:30 +01:00
issues Update to new API, allowing to remove check_doc_cfg.rs file from librustdoc 2025-12-10 12:28:08 +01:00
lints Move remaining doc attribute parsing errors to warnings 2026-02-04 10:54:45 +01:00
scrape-examples compiletest: Support matching on diagnostics without a span 2025-03-25 17:33:09 +03:00
suggestions [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
synthetic-auto-trait-impls fix rustdoc test 2024-12-07 21:37:15 +00:00
2024-doctests-checks.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
2024-doctests-checks.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
2024-doctests-crate-attribute.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
2024-doctests-crate-attribute.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
ambiguous-inherent-assoc-ty.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
apit-46976.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
associated-constant-not-allowed-102467.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
associated-constant-not-allowed-102467.stderr Fix rustdoc UI tests 2025-11-08 13:50:48 -05:00
bad-render-options.rs Move remaining doc attribute parsing errors to warnings 2026-02-04 10:54:45 +01:00
bad-render-options.stderr Move remaining doc attribute parsing errors to warnings 2026-02-04 10:54:45 +01:00
bounded-hr-lifetime.rs Simple modification of diagnostic information 2023-12-21 10:17:11 +08:00
bounded-hr-lifetime.stderr Simple modification of diagnostic information 2023-12-21 10:17:11 +08:00
cfg-boolean-literal.rs Stabilize cfg_boolean_literals 2025-04-03 18:10:48 +00:00
cfg-hide-show-conflict.rs Put back the doc_cfg code behind a nightly feature 2025-09-27 11:29:49 +02:00
cfg-hide-show-conflict.stderr Improve spans for auto_cfg(hide/show) errors 2025-12-10 12:28:08 +01:00
check-cfg.rs Stabilize checking of cfgs at compile-time: --check-cfg option 2024-04-15 21:49:55 +02:00
check-cfg.stderr Move --check-cfg documentation to stable books 2024-04-15 21:49:56 +02:00
check-doc-alias-attr-location.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
check-doc-alias-attr-location.stderr Fix warning messages 2025-12-10 12:27:34 +01:00
check-doc-alias-attr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
check-doc-alias-attr.stderr If there are too many suggestions for malformed attribute, do not suggest them 2025-12-12 14:55:17 +01:00
const-evalutation-ice.rs Use the informative error as the main const eval error message 2025-06-02 15:37:15 +00:00
const-evalutation-ice.stderr const-eval error: always say in which item the error occurred 2025-06-07 13:42:30 +02:00
const_arg_in_type_position.rs rustdoc: run more HIR validation to mirror rustc 2023-03-30 14:55:03 +02:00
const_arg_in_type_position.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
crate-reference-in-block-module.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
deprecated-attrs.rs Emit a future error warning for duplicate doc attribute 2026-02-04 10:54:44 +01:00
deprecated-attrs.stderr Emit a future error warning for duplicate doc attribute 2026-02-04 10:54:44 +01:00
disambiguator-macro-endswith-exclamatory.rs add test for #126986 2024-06-28 08:01:07 +08:00
disambiguator-macro-endswith-exclamatory.stderr add test for #126986 2024-06-28 08:01:07 +08:00
diverging-assoc-consts.rs rustdoc: Stop unconditionally evaluating the initializer of associated consts 2026-01-17 12:12:36 +01:00
doc-alias-assoc-const.rs Reject relaxed bounds inside trait alias bounds 2025-10-16 19:53:31 +02:00
doc-alias-assoc-const.stderr Fix warning messages 2025-12-10 12:27:34 +01:00
doc-alias-crate-level.rs Finish fixing ui tests 2025-12-10 12:27:34 +01:00
doc-alias-crate-level.stderr Finish fixing ui tests 2025-12-10 12:27:34 +01:00
doc-alias-same-name.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
doc-alias-same-name.stderr Fix warning messages 2025-12-10 12:27:34 +01:00
doc-alias.rs Finish fixing ui tests 2025-12-10 12:27:34 +01:00
doc-alias.stderr Finish fixing ui tests 2025-12-10 12:27:34 +01:00
doc-attribute-unsupported.rs Add ui test for unsupported doc(attribute = "...") case for attributes with namespace 2025-08-28 18:24:58 +02:00
doc-attribute-unsupported.stderr Add ui test for unsupported doc(attribute = "...") case for attributes with namespace 2025-08-28 18:24:58 +02:00
doc-cfg-2.rs Emit a future error warning for duplicate doc attribute 2026-02-04 10:54:44 +01:00
doc-cfg-2.stderr Emit a future error warning for duplicate doc attribute 2026-02-04 10:54:44 +01:00
doc-cfg-check-cfg.cfg_empty.stderr Update to new API, allowing to remove check_doc_cfg.rs file from librustdoc 2025-12-10 12:28:08 +01:00
doc-cfg-check-cfg.rs Rework #[doc(cfg(..))] checks as distinct pass in rustdoc 2025-05-29 21:50:14 +02:00
doc-cfg-unstable.rs Stabilize cfg_boolean_literals 2025-04-03 18:10:48 +00:00
doc-cfg-unstable.stderr Stabilize cfg_boolean_literals 2025-04-03 18:10:48 +00:00
doc-cfg.rs Move remaining doc attribute parsing errors to warnings 2026-02-04 10:54:45 +01:00
doc-cfg.stderr Move remaining doc attribute parsing errors to warnings 2026-02-04 10:54:45 +01:00
doc-include-suggestion.rs Emit a future error warning for duplicate doc attribute 2026-02-04 10:54:44 +01:00
doc-include-suggestion.stderr Emit a future error warning for duplicate doc attribute 2026-02-04 10:54:44 +01:00
doctest-output.rs compiletest: Support matching on diagnostics without a span 2025-03-25 17:33:09 +03:00
doctest-output.stderr Improve check for --output-format combinations and add ui regression test 2025-01-29 15:18:14 +01:00
extract-doctests-result.rs Fix normalization logic of the rustdoc extract doctests tests on Windows 2025-12-12 07:34:52 +01:00
extract-doctests-result.stdout Fix normalization logic of the rustdoc extract doctests tests on Windows 2025-12-12 07:34:52 +01:00
extract-doctests.rs Fix normalization logic of the rustdoc extract doctests tests on Windows 2025-12-12 07:34:52 +01:00
extract-doctests.stdout Fix normalization logic of the rustdoc extract doctests tests on Windows 2025-12-12 07:34:52 +01:00
feature-gate-doc_cfg.rs Improve code and better check doc(cfg(...)) attributes 2025-09-27 11:29:49 +02:00
feature-gate-doc_cfg.stderr Improve code and better check doc(cfg(...)) attributes 2025-09-27 11:29:49 +02:00
hashtag-doctest.rs Add regression test for #136899 2025-02-12 19:46:07 +01:00
hidden-trait-method-34423.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
ice-assoc-const-for-primitive-31808.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
ice-assoc-type-loop-102154.rs Move assertion-free rustdoc ice tests to rustdoc-ui 2024-07-12 18:18:30 -07:00
ice-blanket-impl-52873.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
ice-blanket-impl-119792.rs Add a regression test for a former blanket impl synthesis ICE 2024-06-03 03:50:15 +02:00
ice-blanket-impl-selection-55001.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
ice-bug-report-url.rs compiletest: Support matching on non-json lines in compiler output 2025-05-04 18:27:45 +03:00
ice-bug-report-url.stderr Fix existing messages in stderrs 2026-02-07 09:13:42 +01:00
ice-cross-crate-opaque-assoc-type-73061.rs Move ice tests to rustdoc-ui 2024-04-15 15:11:49 -07:00
ice-method-where-clause-circular-100620.rs Move assertion-free rustdoc ice tests to rustdoc-ui 2024-07-12 18:18:30 -07:00
ice-unresolved-import-100241.rs Move assertion-free rustdoc ice tests to rustdoc-ui 2024-07-12 18:18:30 -07:00
ice-unresolved-import-100241.stderr Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
ignore-block-help.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
ignore-block-help.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-fn-nesting.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-fn-nesting.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
infinite-recursive-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
infinite-recursive-type.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
inherent-assoc-consts-36031.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
invalid-attribute.rs Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
invalid-attribute.stderr Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
invalid-cfg.rs Finish fixing ui tests 2025-12-10 12:27:34 +01:00
invalid-cfg.stderr Improve spans of malformed attribute errors 2025-12-13 17:13:36 +01:00
invalid-keyword.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
invalid-keyword.stderr Remove rustc::existing_doc_keyword lint. 2024-12-17 13:56:10 +11:00
invalid-redundant-explicit-link.rs Add regression test for #123158 2024-03-28 11:09:08 +01:00
invalid-syntax.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
invalid-syntax.stderr Account for /// when rendering multiline spans 2024-12-13 18:48:33 +00:00
invalid-theme-name.rs UI tests: migrate remaining compile time error-patterns to line annotations 2025-04-13 21:48:53 +03:00
invalid-theme-name.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
invalid_const_in_lifetime_position.rs Do not emit solver errors that contain error types 2025-10-31 08:17:44 +00:00
invalid_const_in_lifetime_position.stderr Do not emit solver errors that contain error types 2025-10-31 08:17:44 +00:00
invalid_infered_static_and_const.rs rustdoc: run more HIR validation to mirror rustc 2023-03-30 14:55:03 +02:00
invalid_infered_static_and_const.stderr Replace ItemCtxt::report_placeholder_type_error match with a call to TyCtxt::def_descr 2025-06-30 20:36:16 +02:00
macro-docs.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
macro-docs.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mismatched_arg_count.rs rustdoc: remove excess from rustdoc test 2023-03-30 14:55:03 +02:00
mismatched_arg_count.stderr Revert suggestion verbosity change 2024-07-22 22:51:53 +00:00
multi-par-footnote.rs rustdoc: Enable Markdown extensions when looking for doctests 2025-04-09 13:04:57 -04:00
multi-par-footnote.stdout rustdoc: Enable Markdown extensions when looking for doctests 2025-04-09 13:04:57 -04:00
nested-extern-crate-46271.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nested-macro-rules-47639.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
normalize-cycle.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
normalize-in-inlined-type-alias.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
normalize-overflow.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
not-wf-ambiguous-normalization.rs Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
not-wf-ambiguous-normalization.stderr Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
output-format-html-stable.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
private-type-cycle-110629.rs rustdoc: rename issue-\d+.rs tests to have meaningful names 2024-09-12 13:47:51 -07:00
private-type-cycle-dyn-110629.rs rustdoc: rename issue-\d+.rs tests to have meaningful names 2024-09-12 13:47:51 -07:00
private-type-cycle-dyn-110629.stderr rustdoc: re-bless stderrs after renaming the test case 2024-09-12 13:48:51 -07:00
proc_macro_bug.rs Test rustdoc encountering proc_macro_derive in a non-proc-macro crate 2023-02-23 09:00:33 +00:00
proc_macro_bug.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
projection-as-union-type-error.rs rustdoc: add two regression tests 2024-09-09 22:35:10 +02:00
projection-as-union-type-error.stderr rustdoc: add two regression tests 2024-09-09 22:35:10 +02:00
pub-use-primitive-document-private-items-95633.rs Move tests into appropriate subdirectories 2024-05-21 21:21:26 -07:00
range-pattern.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
recursive-type-alias-impl-trait-declaration-too-subtle-2.rs rustdoc: add two regression tests 2024-09-09 22:35:10 +02:00
remap-path-prefix-failed-doctest-output.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
remap-path-prefix-failed-doctest-output.stdout Print thread ID in panic message if thread name is unknown 2025-08-06 23:59:47 +00:00
remap-path-prefix-invalid-doctest.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
remap-path-prefix-invalid-doctest.stdout Update rustdoc-ui tests 2025-03-27 11:18:43 +01:00
remap-path-prefix-macro.rs Fix ICE: attempted to remap an already remapped filename 2025-03-16 23:37:09 +01:00
remap-path-prefix-passed-doctest-output.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
remap-path-prefix-passed-doctest-output.stdout rustdoc: Add support for --remap-path-prefix 2024-06-09 10:34:54 -07:00
rustc-check-passes.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rustc-check-passes.stderr terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it) 2024-10-22 07:37:54 +01:00
search-index-generics-recursion-bug-issue-59502.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
show-coverage-json.rs Add UI regressions tests for rustdoc --show-coverage option 2024-11-04 14:46:04 +01:00
show-coverage-json.stdout Do not emit missing_doc_code_examples rustdoc lint on module and a few other items 2024-11-28 21:22:06 +01:00
show-coverage.rs Add UI regressions tests for rustdoc --show-coverage option 2024-11-04 14:46:04 +01:00
show-coverage.stdout Do not emit missing_doc_code_examples rustdoc lint on module and a few other items 2024-11-28 21:22:06 +01:00
super-glob-40936.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
target-feature-stability.rs rustdoc: {Meta,Pointee,}Sized in non-minicore 2025-06-16 23:04:36 +00:00
track-diagnostics.rs refactor: Make -Ztrack-diagnostics emit like a note 2025-07-03 07:19:25 -06:00
track-diagnostics.stderr refactor: Make -Ztrack-diagnostics emit like a note 2025-07-03 07:19:25 -06:00
tuple-variadic-check.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tuple-variadic-check.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
unable-fulfill-trait.rs Dont create trait object if it has errors in it 2024-11-23 23:31:30 +00:00
unable-fulfill-trait.stderr Dont create trait object if it has errors in it 2024-11-23 23:31:30 +00:00
use_both_out_dir_and_output_options.rs compiletest: Support matching on diagnostics without a span 2025-03-25 17:33:09 +03:00
use_both_out_dir_and_output_options.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
wasm-safe.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00