rust/tests
Matthias Krüger 3ea438eb3a
Rollup merge of #116787 - a-lafrance:span-internal-lint, r=oli-obk
Implement an internal lint encouraging use of `Span::eq_ctxt`

Adds a new Rustc internal lint that forbids use of `.ctxt() == .ctxt()` for spans, encouraging use of `.eq_ctxt()` instead (see https://github.com/rust-lang/rust/issues/49509).

Also fixed a few violations of the lint in the Rustc codebase (a fun additional way I could test my code). Edit: MIR opt folks I believe that's why you're CC'ed, just a heads up.

Two things I'm not sure about:
1. The way I chose to detect calls to `Span::ctxt`. I know adding diagnostic items to methods is generally discouraged, but after some searching and experimenting I couldn't find anything else that worked, so I went with it. That said, I'm happy to implement something different if there's a better way out there. (For what it's worth, if there is a better way, it might be worth documenting in the rustc-dev-guide, which I'm happy to take care of)
2. The error message for the lint. Ideally it would probably be good to give some context as to why the suggestion is made (e.g. `rustc::default_hash_types` tells the user that it's because of performance), but I don't have that context so I couldn't put it in the error message. Happy to iterate on the error message based on feedback during review.

r? ``@oli-obk``
2023-10-17 19:07:23 +02:00
..
assembly Auto merge of #115515 - the8472:zip-for-arrays, r=scottmcm 2023-10-15 00:49:21 +00:00
auxiliary
codegen Add invariant to Vec::pop that len < cap if pop successful 2023-10-16 18:49:25 +02:00
codegen-units
coverage-map coverage: Store each BCB's code regions in one coverage statement 2023-10-03 13:03:39 +11:00
debuginfo
incremental Bless incremental tests. 2023-10-06 15:46:11 +00:00
mir-opt Also consider call and yield as MIR SSA. 2023-10-08 16:05:26 +00:00
pretty Preserve unicode escapes in format string literals when pretty-printing AST 2023-10-16 21:20:21 +02:00
run-coverage coverage: Regression test for functions with unreachable bodies 2023-10-01 14:44:27 +11:00
run-coverage-rustdoc
run-make Auto merge of #116264 - reez12g:issue-109728, r=Mark-Simulacrum 2023-10-14 16:57:02 +00:00
run-make-fulldeps Add Config::hash_untracked_state callback 2023-10-14 15:54:26 +00:00
run-pass-valgrind
rustdoc rustdoc: move ICE test to rustdoc-ui 2023-10-16 18:02:11 -07:00
rustdoc-gui Auto merge of #115948 - notriddle:notriddle/logo-lockup, r=fmease 2023-10-11 06:28:36 +00:00
rustdoc-js Add regression test for #115480 2023-10-11 11:41:39 +02:00
rustdoc-js-std rustdoc: update test cases for changes to the printing style 2023-09-21 15:16:44 -07:00
rustdoc-json
rustdoc-ui Rollup merge of #111072 - Urgau:check-cfg-new-syntax, r=petrochenkov 2023-10-17 19:07:21 +02:00
ui Rollup merge of #116717 - estebank:issue-9082, r=oli-obk 2023-10-17 19:07:22 +02:00
ui-fulldeps Rollup merge of #116787 - a-lafrance:span-internal-lint, r=oli-obk 2023-10-17 19:07:23 +02:00
COMPILER_TESTS.md