rust/tests/rustdoc-ui
Nicholas Nethercote 4225a1e186 Don't hash lints differently to non-lints.
`Diagnostic::keys`, which is used for hashing and equating diagnostics,
has a surprising behaviour: it ignores children, but only for lints.
This was added in #88493 to fix some duplicated diagnostics, but it
doesn't seem necessary any more.

This commit removes the special case and only four tests have changed
output, with additional errors. And those additional errors aren't
exact duplicates, they're just similar. For example, in
src/tools/clippy/tests/ui/same_name_method.rs we currently have this
error:
```
error: method's name is the same as an existing method in a trait
  --> $DIR/same_name_method.rs:75:13
   |
LL |             fn foo() {}
   |             ^^^^^^^^^^^
   |
note: existing `foo` defined here
  --> $DIR/same_name_method.rs:79:9
   |
LL |         impl T1 for S {}
   |         ^^^^^^^^^^^^^^^^
```
and with this change we also get this error:
```
error: method's name is the same as an existing method in a trait
  --> $DIR/same_name_method.rs:75:13
   |
LL |             fn foo() {}
   |             ^^^^^^^^^^^
   |
note: existing `foo` defined here
  --> $DIR/same_name_method.rs:81:9
   |
LL |         impl T2 for S {}
   |         ^^^^^^^^^^^^^^^^
```
I think printing this second argument is reasonable, possibly even
preferable to hiding it. And the other cases are similar.
2024-01-31 08:25:29 +11:00
..
auxiliary rustdoc: move ICE tests to ui 2023-11-23 14:54:19 -07:00
check-cfg Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
coverage
doctest Auto merge of #118213 - Urgau:check-cfg-diagnostics-rustc-cargo, r=petrochenkov 2023-12-13 19:45:57 +00:00
error-in-impl-trait fix typo 2024-01-09 10:47:04 +08:00
generate-link-to-definition
intra-doc Bless tests 2024-01-13 12:46:58 -05:00
issues Rollup merge of #119148 - estebank:bare-traits, r=davidtwco 2024-01-05 10:57:20 -05:00
lints Bless tests 2024-01-13 12:46:58 -05:00
scrape-examples
suggestions
ambiguous-inherent-assoc-ty.rs
apit-46976.rs rustdoc: move ICE tests to ui 2023-11-23 14:54:19 -07: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
check-doc-alias-attr-location.rs
check-doc-alias-attr-location.stderr
check-doc-alias-attr.rs
check-doc-alias-attr.stderr
circular-intra-doc-link-48414.rs rustdoc: move ICE tests to ui 2023-11-23 14:54:19 -07:00
commandline-argfile-badutf8.args
commandline-argfile-badutf8.rs
commandline-argfile-badutf8.stderr
commandline-argfile-missing.rs
commandline-argfile-missing.stderr
commandline-argfile.args
commandline-argfile.rs
const_arg_in_type_position.rs
const_arg_in_type_position.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
const-evalutation-ice.rs
const-evalutation-ice.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
crate-reference-in-block-module.rs
crate-reference-in-block-module.stderr
custom_code_classes_in_docs-warning3.rs
custom_code_classes_in_docs-warning3.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
custom_code_classes_in_docs-warning.rs Update tests for custom classes 2023-09-19 17:29:39 +02:00
custom_code_classes_in_docs-warning.stderr Update tests for custom classes 2023-09-19 17:29:39 +02:00
deprecated-attrs.rs
deprecated-attrs.stderr
deref-generic.rs
diagnostic-width.rs
diagnostic-width.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
doc-alias-assoc-const.rs
doc-alias-assoc-const.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
doc-alias-crate-level.rs
doc-alias-crate-level.stderr
doc-alias-same-name.rs
doc-alias-same-name.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
doc-cfg.rs
doc-cfg.stderr
doc-include-suggestion.rs
doc-include-suggestion.stderr
feature-gate-custom_code_classes_in_docs.rs Bless tests 2024-01-13 12:46:58 -05:00
feature-gate-custom_code_classes_in_docs.stderr Bless tests 2024-01-13 12:46:58 -05:00
feature-gate-doc_cfg_hide.rs
feature-gate-doc_cfg_hide.stderr Bless tests 2024-01-13 12:46:58 -05:00
hidden-trait-method-34423.rs rustdoc: move ICE tests to ui 2023-11-23 14:54:19 -07:00
ice-assoc-const-for-primitive-31808.rs rustdoc: add check-pass to ICE test with no expected output 2023-10-16 18:03:22 -07:00
ice-blanket-impl-52873.rs Add check-pass to ice tests 2024-01-03 15:33:13 -07:00
ice-blanket-impl-selection-55001.rs Add check-pass to ice tests 2024-01-03 15:33:13 -07:00
ice-bug-report-url.rs
ice-bug-report-url.stderr Use the right level with -Ztreat-err-as-bug. 2024-01-11 16:55:10 +11:00
ignore-block-help.rs
ignore-block-help.stderr
impl-fn-nesting.rs
impl-fn-nesting.stderr
infinite-recursive-type.rs
infinite-recursive-type.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
inherent-assoc-consts-36031.rs rustdoc: move ICE tests to ui 2023-11-23 14:54:19 -07:00
invalid_associated_const.rs
invalid_associated_const.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
invalid_const_in_lifetime_position.rs Accept less invalid Rust in rustdoc 2023-10-31 13:58:03 +00:00
invalid_const_in_lifetime_position.stderr Accept less invalid Rust in rustdoc 2023-10-31 13:58:03 +00:00
invalid_infered_static_and_const.rs
invalid_infered_static_and_const.stderr
invalid-cfg.rs
invalid-cfg.stderr
invalid-keyword.rs
invalid-keyword.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
invalid-syntax.rs
invalid-syntax.stderr
invalid-theme-name.rs
invalid-theme-name.stderr
issue-102467.rs Add regression test for #102467 2023-09-24 14:09:38 +02:00
issue-102467.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
issue-110629-private-type-cycle-dyn.rs
issue-110629-private-type-cycle-dyn.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
issue-110629-private-type-cycle.rs
macro-docs.rs
macro-docs.stderr
macro-docs.stdout
mismatched_arg_count.rs
mismatched_arg_count.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
nested-extern-crate-46271.rs rustdoc: move ICE tests to ui 2023-11-23 14:54:19 -07:00
nested-macro-rules-47639.rs rustdoc: move ICE tests to ui 2023-11-23 14:54:19 -07:00
normalize-cycle.rs
normalize-overflow.rs
not-wf-ambiguous-normalization.rs Accept less invalid Rust in rustdoc 2023-10-31 13:58:03 +00:00
not-wf-ambiguous-normalization.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
output-format-html-stable.rs
proc_macro_bug.rs
proc_macro_bug.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
range-pattern.rs
recursive-deref-ice.rs Accept less invalid Rust in rustdoc 2023-10-31 13:58:03 +00:00
rustc-check-passes.rs
rustc-check-passes.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
search-index-generics-recursion-bug-issue-59502.rs
super-glob-40936.rs rustdoc: move ICE tests to ui 2023-11-23 14:54:19 -07:00
track-diagnostics.rs
track-diagnostics.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
tuple-variadic-check.rs
tuple-variadic-check.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
unable-fulfill-trait.rs Taint more aggressively in astconv 2024-01-11 09:03:26 +00:00
unable-fulfill-trait.stderr Taint more aggressively in astconv 2024-01-11 09:03:26 +00:00
unescaped_backticks.rs Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
unescaped_backticks.stderr Don't hash lints differently to non-lints. 2024-01-31 08:25:29 +11:00
unused-extern-crate.rs
use_both_out_dir_and_output_options.rs
use_both_out_dir_and_output_options.stderr
wasm-safe.rs