rust/src/tools
Matthias Krüger 5f10a99c7a
Rollup merge of #129725 - compiler-errors:predicates-of, r=fmease
Stop using `ty::GenericPredicates` for non-predicates_of queries

`GenericPredicates` is a struct of several parts: A list of of an item's own predicates, and a parent def id (and some effects related stuff, but ignore that since it's kinda irrelevant). When instantiating these generic predicates, it calls `predicates_of` on the parent and instantiates its predicates, and appends the item's own instantiated predicates too:

acb4e8b625/compiler/rustc_middle/src/ty/generics.rs (L407-L413)

Notice how this should result in a recursive set of calls to `predicates_of`... However, `GenericPredicates` is *also* misused by a bunch of *other* queries as a convenient way of passing around a list of predicates. For these queries, we don't ever set the parent def id of the `GenericPredicates`, but if we did, then this would be very easy to mistakenly call `predicates_of` instead of some other intended parent query.

Given that footgun, and the fact that we don't ever even *use* the parent def id in the `GenericPredicates` returned from queries like `explicit_super_predicates_of`, It really has no benefit over just returning `&'tcx [(Clause<'tcx>, Span)]`.

This PR additionally opts to wrap the results of `EarlyBinder`, as we've tended to use that in the return type of these kinds of queries to properly convey that the user has params to deal with, and it also gives a convenient way of iterating over a slice of things after instantiating.
2024-08-31 10:08:57 +02:00
..
build-manifest Promote Mac Catalyst targets to tier 2, and ship with rustup 2024-08-14 02:12:14 +02:00
build_helper Reformat use declarations. 2024-07-29 08:26:52 +10:00
bump-stage0 bump-stage0: use IndexMap for determinism 2024-07-30 15:13:58 -07:00
cargo@8f40fc59fb Update cargo 2024-08-22 13:33:13 +08:00
cargotest Reformat use declarations. 2024-07-29 08:26:52 +10:00
clippy Stop using ty::GenericPredicates for non-predicates_of queries 2024-08-29 00:17:40 -04:00
collect-license-metadata Update generate-copyright 2024-08-06 11:04:55 +01:00
compiletest strip whitespace for ignored tests reason comments 2024-08-25 22:17:51 +00:00
coverage-dump Reformat use declarations. 2024-07-29 08:26:52 +10:00
error_index_generator Reformat use declarations. 2024-07-29 08:26:52 +10:00
generate-copyright Apparently library/std is now part of a workspace at library/ 2024-08-06 12:12:57 +01:00
generate-windows-sys Add windows-targets crate to std's sysroot 2024-08-09 10:43:43 +00:00
html-checker Reformat use declarations. 2024-07-29 08:26:52 +10:00
jsondocck Reformat use declarations. 2024-07-29 08:26:52 +10:00
jsondoclint rustdoc: Remove OpaqueTy 2024-08-01 15:57:45 +00:00
libcxx-version skip src/tools/libcxx-version from tidy 2024-06-06 07:01:37 +03:00
linkchecker update the doc comment on lintchecker b/c it parses html now 2024-08-24 12:35:35 -04:00
lint-docs lint on tail expr drop order change in Edition 2024 2024-08-21 01:05:21 +08:00
lld-wrapper Reformat use declarations. 2024-07-29 08:26:52 +10:00
llvm-bitcode-linker Reformat use declarations. 2024-07-29 08:26:52 +10:00
miri Rollup merge of #129401 - workingjubilee:partial-initialization-of-stabilization, r=dtolnay,joboet 2024-08-28 19:12:52 -07:00
miropt-test-tools
opt-dist Update sysinfo version to 0.31.2 2024-08-01 16:39:55 +02:00
remote-test-client Reformat use declarations. 2024-07-29 08:26:52 +10:00
remote-test-server Reformat use declarations. 2024-07-29 08:26:52 +10:00
replace-version-placeholder Reformat use declarations. 2024-07-29 08:26:52 +10:00
rls Reformat use declarations. 2024-07-29 08:26:52 +10:00
run-make-support Auto merge of #128507 - Oneirical:testart-from-scratch, r=jieyouxu 2024-08-23 18:30:21 +00:00
rust-analyzer Rollup merge of #129086 - slanterns:is_none_or, r=dtolnay 2024-08-16 19:58:58 +02:00
rust-installer Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustbook Update src/tools/rustbook/Cargo.lock 2024-08-26 10:12:50 -07:00
rustc-perf@d5055e7804 bump up rustc-perf's version 2024-08-09 01:24:39 +09:00
rustc-perf-wrapper impl compare command and benchmark command to rustc-perf-wrapper 2024-08-09 20:03:14 +09:00
rustdoc Link std statically in rustc_driver 2024-08-11 04:16:53 +02:00
rustdoc-gui Other EcmaScript version bump 2024-06-07 08:44:52 +08:00
rustdoc-gui-test Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-js Separate core search logic with search ui 2024-08-29 00:26:16 +08:00
rustdoc-themes
rustfmt Auto merge of #128771 - carbotaniuman:stabilize_unsafe_attr, r=nnethercote 2024-08-17 22:48:42 +00:00
suggest-tests Reformat use declarations. 2024-07-29 08:26:52 +10:00
tidy Fix tidy 2024-08-26 19:49:47 -04:00
tier-check Add NuttX based targets for RISC-V and ARM 2024-07-19 22:00:42 +08:00
unicode-table-generator Reformat use declarations. 2024-07-29 08:26:52 +10:00
unstable-book-gen Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-component-ld Promote the wasm32-wasip2 target to Tier 2 2024-07-09 12:11:08 -07:00
x Reformat use declarations. 2024-07-29 08:26:52 +10:00
cherry-pick.sh
publish_toolstate.py CI: fix toolstate publishing 2024-05-15 15:48:52 +02:00