rust/src/tools/tidy/src
Matthias Krüger 9abf8b105e
Rollup merge of #125622 - oli-obk:define_opaque_types15, r=compiler-errors
Winnow private method candidates instead of assuming any candidate of the right name will apply

partially reverts https://github.com/rust-lang/rust/pull/60721

My original motivation was just to avoid the `delay_span_bug` (by attempting to thread the `ErrorGuaranteed` through to here). But then I realized that the error message is wrong. It refers to the `Foo<A>::foo` instead of `Foo<B>::foo`. This is almost invisible, because both functions are the same, but on different lines, so `-Zui-testing` makes it so the test is the same no matter which of these two functions is referenced.

But there's a much more obvious bug: If `Foo<B>` does not have a `foo` method at all, but `Foo<A>` has a private `foo` method, then we'll refer to that one. This has now been fixed, and we report a normal `method not found` error.

The way this is done is by creating a list of all possible private functions (just like we create a list of the public functions that can actually be called), and then winnowing it by analyzing where bounds and `Self` types to see if any of the found methods can actually apply (again, just like with the list of public functions).

I wonder if there is room for doing the same thing with unstable functions instead of running all of method resolution twice.

r? ``@compiler-errors`` for method resolution stuff
2024-06-05 18:21:11 +02:00
..
alphabetical tidy: add unit tests for alphabetical markers. 2023-10-25 10:55:12 +11:00
features Fix tidy unittest. 2022-12-31 11:52:16 -08:00
style allow the tests to pass tidy 2024-04-17 23:33:51 +03:00
allowed_run_make_makefiles.txt Rollup merge of #125683 - Oneirical:patience-testing-test, r=jieyouxu 2024-06-05 01:14:30 -07:00
alphabetical.rs tidy: add unit tests for alphabetical markers. 2023-10-25 10:55:12 +11:00
bins.rs tidy: exclude sh files from rust-installer tests from tidy bins check 2023-07-04 19:19:49 +03:00
debug_artifacts.rs Don't skip all directories when tidy-checking 2023-03-27 18:52:47 +00:00
deps.rs refactor(opt-dist): use rustc-perf from rustc checkout 2024-05-20 15:01:10 +00:00
edition.rs Don't skip all directories when tidy-checking 2023-03-27 18:52:47 +00:00
error_codes.rs Make tidy error code parsing robust against comments 2024-03-20 15:53:06 +00:00
ext_tool_checks.rs Add support for tidy linting via external tools for non-rust files 2023-08-02 04:40:26 -04:00
extdeps.rs Disable tidy license checker for cg_gcc until it's deps are vendored 2023-10-10 12:47:26 +00:00
features.rs Remove direct dependencies on lazy_static, once_cell and byteorder 2024-04-28 14:35:00 +01:00
fluent_alphabetical.rs Remove direct dependencies on lazy_static, once_cell and byteorder 2024-04-28 14:35:00 +01:00
fluent_used.rs Remove direct dependencies on lazy_static, once_cell and byteorder 2024-04-28 14:35:00 +01:00
issues.txt Give test a more useful name 2024-06-04 15:33:51 +00:00
iter_header.rs Include the line number in tidy's iter_header 2024-05-09 14:38:25 +10:00
known_bug.rs tidy: add tidy check agains \.rs files inside tests/crashes that are missing "//@ known-bug: " 2024-04-14 11:16:26 +02:00
lib.rs Tidy check for test revisions that are mentioned but not declared 2024-05-09 14:47:09 +10:00
main.rs Tidy check for test revisions that are mentioned but not declared 2024-05-09 14:47:09 +10:00
mir_opt_tests.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
pal.rs tidy: allow platform-dependent code in sys 2024-01-13 18:36:47 +01:00
run_make_tests.rs reduce tidy overheads in run-make checks 2024-04-13 10:38:50 +03:00
rustdoc_css_themes.rs Update rustdoc_css_themes.rs to take into account new selectors 2024-04-03 14:27:20 +02:00
rustdoc_gui_tests.rs Don't skip all directories when tidy-checking 2023-03-27 18:52:47 +00:00
style.rs Remove unneeded string conversion 2024-05-23 08:09:52 +02:00
target_policy.rs Update tidy target_policy to account for //@ directives 2024-02-22 16:04:03 +00:00
target_specific_tests.rs compiletest: clarify COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS error 2024-05-30 08:07:56 +02:00
tests_placement.rs Deny having src/test exisiting in tidy 2023-01-11 18:25:33 +00:00
tests_revision_unpaired_stdout_stderr.rs Include the line number in tidy's iter_header 2024-05-09 14:38:25 +10:00
ui_tests.rs Move tests to a more appropriate directory 2024-06-04 15:33:20 +00:00
unit_tests.rs Don't skip all directories when tidy-checking 2023-03-27 18:52:47 +00:00
unknown_revision.rs Tidy check for test revisions that are mentioned but not declared 2024-05-09 14:47:09 +10:00
unstable_book.rs Stop generating compiler_builtins_lib doc 2020-02-29 23:31:31 +09:00
walk.rs refactor: add rustc-perf submodule to src/tools 2024-05-20 14:56:49 +00:00
x_version.rs run cargo install to check for x installation and version 2023-01-20 10:05:19 -07:00