rust/tests
Matthias Krüger d2139834be
Rollup merge of #116597 - GuillaumeGomez:foreign-blanket-impl, r=notriddle
Prevent showing methods from blanket impls of not available foreign traits to show up in the search results

Fixes https://github.com/rust-lang/rust/issues/115480.

In the case that the blanket impl trait is not available in the current crate, we prevent adding its methods in the search index.

Now how I found how to fix the issue: the `equivalent` method is not generated in the documentation pages but was still added to the search index. To render impls, we iterate over `cache.impls` so I took a look at how this was generated. Inside `formats/cache.rs`, we have `CacheBuilder::populate` where we push impls into `impls` but with this condition:

```rust
if cx.cache.traits.contains_key(&trait_did) {
```

I re-used this condition in `CacheBuilder::fold_item` to prevent this method from being added in `cache.search_index` or `cache.orphan_impl_items`.

PS: If you want to double-check if the added test works, just comment the code I added in `cache.rs` and it should fail.

r? ``@notriddle``
2023-10-11 20:08:22 +02:00
..
assembly Limit to LLVM 17.0.2 to work around WinEH codegen bug 2023-10-02 11:06:38 +02:00
auxiliary
codegen Ignore MSVC in test. 2023-10-08 16:45:45 +00: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 Auto merge of #115128 - davidtwco:re-enable-debuginfo-test, r=wesleywiser 2023-09-12 19:39:27 +00:00
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 Rework no_coverage to coverage(off) 2023-09-08 12:46:06 +01: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 #116514 - petrochenkov:nogccld, r=lqd 2023-10-08 09:04:57 +00:00
run-make-fulldeps Merge ExternProviders into the general Providers struct 2023-09-22 20:15:34 +00:00
run-pass-valgrind
rustdoc Auto merge of #115948 - notriddle:notriddle/logo-lockup, r=fmease 2023-10-11 06:28:36 +00: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 Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
ui Rollup merge of #116436 - compiler-errors:structurally-normalize-for-closure, r=lcnr 2023-10-11 20:08:21 +02:00
ui-fulldeps Auto merge of #113915 - cjgillot:ssa-call, r=tmiasko 2023-10-10 20:37:55 +00:00
COMPILER_TESTS.md