Many "predicate"-to-"clause" renamings - #159990
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor changes to the core type system cc @lcnr This PR changes rustc_public cc @oli-obk, @celinval, @ouz-a, @makai410 Some changes occurred to the CTFE machinery
cc @rust-lang/clippy Some changes occurred in cc @BoxyUwU |
|
Apologies for the large diff. I did this a while ago but wasn't sure if it was worth the churn. Then @spastorino mentioned #107250 to me and I saw the unchecked item "Rename identifiers like pred and predicates to clause if they're actually clauses around the codebase" (which is exactly what this does) and decided to file the PR. |
13031e6 to
1a3be39
Compare
1a3be39 to
aa61b88
Compare
| match predicate.kind().skip_binder() { | ||
| for &(clause, span) in gen_clauses.clauses { | ||
| match clause.kind().skip_binder() { | ||
| ty::ClauseKind::TypeOutlives(OutlivesPredicate(ty, reg)) => { |
There was a problem hiding this comment.
possibly off-topic: since OutlivesPredicate seems to actually be a kind of Clause, should it be renamed to OutlivesClause maybe? With that, maybe RequiredPredicates could be renamed as well.
I guess OutlivesPredicate being in rustc_public would make all of this a bit more annoying..
There was a problem hiding this comment.
Maybe, but I'll put it in the too-hard basket for now.
There was a problem hiding this comment.
Would it make sense to leave TODOs for this?
Lots of names weren't changed to account for the introduction of the `Clause` type as a specialized form of `Predicate`, presumably because it was tedious. This commit converts as many of them as I could find. It's mostly very tedious renamings of types, functions, variables, and queries. The more interesting ones are a couple of files (`predicates_of.rs`, `impossible_predicates.rs`) and a MIR pass (`ImpossiblePredicates`).
aa61b88 to
ff161b1
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@ada4a: thank you for the extremely thorough review! I have made all your suggested changes except where noted above. |
|
nominating for awareness during today's types meeting. |
…=oli-obk Many "predicate"-to-"clause" renamings Lots of names weren't changed to account for the introduction of the `Clause` type as a specialized form of `Predicate`, presumably because it was tedious. This commit converts as many of them as I could find. It's mostly very tedious renamings of types, functions, variables, and queries. The more interesting ones are a couple of files (`predicates_of.rs`, `impossible_predicates.rs`) and a MIR pass (`ImpossiblePredicates`). r? @oli-obk
…=oli-obk Many "predicate"-to-"clause" renamings Lots of names weren't changed to account for the introduction of the `Clause` type as a specialized form of `Predicate`, presumably because it was tedious. This commit converts as many of them as I could find. It's mostly very tedious renamings of types, functions, variables, and queries. The more interesting ones are a couple of files (`predicates_of.rs`, `impossible_predicates.rs`) and a MIR pass (`ImpossiblePredicates`). r? @oli-obk
…=oli-obk Many "predicate"-to-"clause" renamings Lots of names weren't changed to account for the introduction of the `Clause` type as a specialized form of `Predicate`, presumably because it was tedious. This commit converts as many of them as I could find. It's mostly very tedious renamings of types, functions, variables, and queries. The more interesting ones are a couple of files (`predicates_of.rs`, `impossible_predicates.rs`) and a MIR pass (`ImpossiblePredicates`). r? @oli-obk
…uwer Rollup of 14 pull requests Successful merges: - #159990 (Many "predicate"-to-"clause" renamings) - #159665 (Replace most `Ty::new_fn_def` calls with `type_of` queries directly) - #159687 (rustdoc: Set tracing max_level_info when debug-logging is false) - #160065 (Distinguish the dep-graph index space from the live node count) - #159978 (run intrinsic-test by default on x86_64-gnu) - #160008 (Avoid stale closure recovery state across statements) - #160027 (Add regression test for #132767) - #160030 (Update `browser-ui-test` version to `0.25.0`) - #160046 (Improve consistency of attribute error messages (part 2)) - #160056 (Fix associated function suggestion for generic ADTs) - #160069 (Update Rust crate tracing-subscriber to v0.3.23 [SECURITY]) - #160071 (sanitize_standard_fds: clarify macos comment) - #160076 (use unstable features when updating dependencies) - #160088 (fix 404 url in src/doc/rustdoc.md)
…=oli-obk Many "predicate"-to-"clause" renamings Lots of names weren't changed to account for the introduction of the `Clause` type as a specialized form of `Predicate`, presumably because it was tedious. This commit converts as many of them as I could find. It's mostly very tedious renamings of types, functions, variables, and queries. The more interesting ones are a couple of files (`predicates_of.rs`, `impossible_predicates.rs`) and a MIR pass (`ImpossiblePredicates`). r? @oli-obk
…uwer Rollup of 21 pull requests Successful merges: - #159990 (Many "predicate"-to-"clause" renamings) - #159665 (Replace most `Ty::new_fn_def` calls with `type_of` queries directly) - #159687 (rustdoc: Set tracing max_level_info when debug-logging is false) - #160057 (refactor(mir-transform): Calculate optimization status inside `run_passes_inner`) - #160060 (codegen: skip stores for entirely-uninit constant aggregate fields, attempt #2) - #160063 (Fix ICE when dumping the dep graph with the parallel frontend) - #160065 (Distinguish the dep-graph index space from the live node count) - #158038 (Split register_tool into register_attribute_tool and register_lint_tool) - #159776 (remove const hack in alloc) - #159978 (run intrinsic-test by default on x86_64-gnu) - #160008 (Avoid stale closure recovery state across statements) - #160027 (Add regression test for #132767) - #160030 (Update `browser-ui-test` version to `0.25.0`) - #160046 (Improve consistency of attribute error messages (part 2)) - #160056 (Fix associated function suggestion for generic ADTs) - #160069 (Update Rust crate tracing-subscriber to v0.3.23 [SECURITY]) - #160071 (sanitize_standard_fds: clarify macos comment) - #160076 (use unstable features when updating dependencies) - #160092 (miri ui tests: don't run native tests on stage 0) - #160093 (Switch cargo assignments to weihanglo) - #160094 (Update assignment for docs)
Rollup merge of #159990 - nnethercote:predicate-to-clause, r=oli-obk Many "predicate"-to-"clause" renamings Lots of names weren't changed to account for the introduction of the `Clause` type as a specialized form of `Predicate`, presumably because it was tedious. This commit converts as many of them as I could find. It's mostly very tedious renamings of types, functions, variables, and queries. The more interesting ones are a couple of files (`predicates_of.rs`, `impossible_predicates.rs`) and a MIR pass (`ImpossiblePredicates`). r? @oli-obk
…uwer Rollup of 21 pull requests Successful merges: - rust-lang/rust#159990 (Many "predicate"-to-"clause" renamings) - rust-lang/rust#159665 (Replace most `Ty::new_fn_def` calls with `type_of` queries directly) - rust-lang/rust#159687 (rustdoc: Set tracing max_level_info when debug-logging is false) - rust-lang/rust#160057 (refactor(mir-transform): Calculate optimization status inside `run_passes_inner`) - rust-lang/rust#160060 (codegen: skip stores for entirely-uninit constant aggregate fields, attempt rust-lang/rust#2) - rust-lang/rust#160063 (Fix ICE when dumping the dep graph with the parallel frontend) - rust-lang/rust#160065 (Distinguish the dep-graph index space from the live node count) - rust-lang/rust#158038 (Split register_tool into register_attribute_tool and register_lint_tool) - rust-lang/rust#159776 (remove const hack in alloc) - rust-lang/rust#159978 (run intrinsic-test by default on x86_64-gnu) - rust-lang/rust#160008 (Avoid stale closure recovery state across statements) - rust-lang/rust#160027 (Add regression test for rust-lang/rust#132767) - rust-lang/rust#160030 (Update `browser-ui-test` version to `0.25.0`) - rust-lang/rust#160046 (Improve consistency of attribute error messages (part 2)) - rust-lang/rust#160056 (Fix associated function suggestion for generic ADTs) - rust-lang/rust#160069 (Update Rust crate tracing-subscriber to v0.3.23 [SECURITY]) - rust-lang/rust#160071 (sanitize_standard_fds: clarify macos comment) - rust-lang/rust#160076 (use unstable features when updating dependencies) - rust-lang/rust#160092 (miri ui tests: don't run native tests on stage 0) - rust-lang/rust#160093 (Switch cargo assignments to weihanglo) - rust-lang/rust#160094 (Update assignment for docs)
View all comments
Lots of names weren't changed to account for the introduction of the
Clausetype as a specialized form ofPredicate, presumably because it was tedious. This commit converts as many of them as I could find. It's mostly very tedious renamings of types, functions, variables, and queries. The more interesting ones are a couple of files (predicates_of.rs,impossible_predicates.rs) and a MIR pass (ImpossiblePredicates).r? @oli-obk