Skip to content

Rename ProjectionPredicate and TraitPredicate - #161291

Open
ada4a wants to merge 2 commits into
rust-lang:mainfrom
ada4a:push-xqqtloltnvwu
Open

Rename ProjectionPredicate and TraitPredicate#161291
ada4a wants to merge 2 commits into
rust-lang:mainfrom
ada4a:push-xqqtloltnvwu

Conversation

@ada4a

@ada4a ada4a commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Part of #107250

This deviates from the plan I described in #107250 (comment). The reason is that I kept getting into the awkward situation where I would go into a function dealing with multiple predicate/clause kinds, and need to rename only the variables referring with the particular kind I was renaming. So now, the plan is to first rename only the types (this PR), and afterwards go into functions and rename all the variables in them at once. That would also allow splitting the work better, e.g. tackling one crate/subtree at a time.

r? @oli-obk

@rustbot

rustbot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

HIR ty lowering was modified

cc @fmease

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

changes to the core type system

cc @lcnr

changes to inspect_obligations.rs

cc @lcnr

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

changes to the core type system

cc @lcnr

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a, @makai410

@rustbot rustbot added PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 18, 2026
@rustbot

rustbot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

oli-obk is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@ada4a
ada4a force-pushed the push-xqqtloltnvwu branch from 6fc9ceb to 169bd22 Compare August 18, 2026 12:38

@oli-obk oli-obk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 169bd22 has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 18, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 18, 2026
Rename `ProjectionPredicate` and `TraitPredicate`

Part of rust-lang#107250

This deviates from the plan I described in rust-lang#107250 (comment). The reason is that I kept getting into the awkward situation where I would go into a function dealing with multiple predicate/clause kinds, and need to rename only the variables referring with the particular kind I was renaming. So now, the plan is to first rename only the types (this PR), and afterwards go into functions and rename all the variables in them at once. That would also allow splitting the work better, e.g. tackling one crate/subtree at a time.

r? @oli-obk
rust-bors Bot pushed a commit that referenced this pull request Aug 18, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #154210 (fix: fix the capture behavior of `if let` in closures)
 - #156176 (Initial implementation of `FnPtr` trait)
 - #160767 (Unify E0117 foreign-trait label for ADT/primitive types with existing Slice/Array/Tuple handling)
 - #160489 (Adding diagnostic item markers for multiple fs functions and structs)
 - #161220 (bootstrap: Allow `./x fix --allow-dirty`)
 - #161291 (Rename `ProjectionPredicate` and `TraitPredicate`)
 - #161296 (Enable overflow checks in `rustc_thread_pool`)
 - #161304 (Rename test so it matches the issue)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 18, 2026
Rename `ProjectionPredicate` and `TraitPredicate`

Part of rust-lang#107250

This deviates from the plan I described in rust-lang#107250 (comment). The reason is that I kept getting into the awkward situation where I would go into a function dealing with multiple predicate/clause kinds, and need to rename only the variables referring with the particular kind I was renaming. So now, the plan is to first rename only the types (this PR), and afterwards go into functions and rename all the variables in them at once. That would also allow splitting the work better, e.g. tackling one crate/subtree at a time.

r? @oli-obk
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 19, 2026
Rename `ProjectionPredicate` and `TraitPredicate`

Part of rust-lang#107250

This deviates from the plan I described in rust-lang#107250 (comment). The reason is that I kept getting into the awkward situation where I would go into a function dealing with multiple predicate/clause kinds, and need to rename only the variables referring with the particular kind I was renaming. So now, the plan is to first rename only the types (this PR), and afterwards go into functions and rename all the variables in them at once. That would also allow splitting the work better, e.g. tackling one crate/subtree at a time.

r? @oli-obk
@jhpratt

jhpratt commented Aug 19, 2026

Copy link
Copy Markdown
Member

@bors r- #161337 (comment)

error[E0433]: cannot find `PredicatePolarity` in `ty`
    --> compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs:1617:31
     |
1617 |                 polarity: ty::PredicatePolarity::Positive,
     |                               ^^^^^^^^^^^^^^^^^ could not find `PredicatePolarity` in `ty`

error[E0422]: cannot find struct, variant or union type `TraitPredicate` in module `ty`
    --> compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs:1615:34
     |
1615 |             let trait_pred = ty::TraitPredicate {
     |                                  ^^^^^^^^^^^^^^ not found in `ty`

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 19, 2026
@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#161337), which was unapproved.

View changes since this unapproval

@ada4a
ada4a force-pushed the push-xqqtloltnvwu branch from 169bd22 to 7b5c709 Compare August 19, 2026 09:50
@rustbot

rustbot commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

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

ada4a commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the issue, not sure what I should do now.. @bors r=oli-obk rollup? @JonathanBrouwer

@JonathanBrouwer

Copy link
Copy Markdown
Member

Yeah, if you only made trivial changes (which this diff seems to be), that's good :)
@bors r=oli-obk rollup

@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7b5c709 has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 19, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 19, 2026
Rename `ProjectionPredicate` and `TraitPredicate`

Part of rust-lang#107250

This deviates from the plan I described in rust-lang#107250 (comment). The reason is that I kept getting into the awkward situation where I would go into a function dealing with multiple predicate/clause kinds, and need to rename only the variables referring with the particular kind I was renaming. So now, the plan is to first rename only the types (this PR), and afterwards go into functions and rename all the variables in them at once. That would also allow splitting the work better, e.g. tackling one crate/subtree at a time.

r? @oli-obk
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 19, 2026
Rename `ProjectionPredicate` and `TraitPredicate`

Part of rust-lang#107250

This deviates from the plan I described in rust-lang#107250 (comment). The reason is that I kept getting into the awkward situation where I would go into a function dealing with multiple predicate/clause kinds, and need to rename only the variables referring with the particular kind I was renaming. So now, the plan is to first rename only the types (this PR), and afterwards go into functions and rename all the variables in them at once. That would also allow splitting the work better, e.g. tackling one crate/subtree at a time.

r? @oli-obk
rust-bors Bot pushed a commit that referenced this pull request Aug 19, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #159071 ([PAC] Encoder and hash (1/8))
 - #161277 (bootstrap: Move all non-module items out of the crate root)
 - #161332 (Some `GlobalCtxt`/`Session` cleanups)
 - #161344 (Update the `rustc-perf` submodule)
 - #150931 (rustdoc: Always document `#[repr(transparent)]` if `#[rustc_pub_transparent]` is applied)
 - #160582 (Add `remove hidden_glob_reexports item breaks downstream` test)
 - #160876 (remove unwrap from write_mir_fn_graphviz)
 - #160927 (Enhance EII UI tests)
 - #161070 (fix arm homogeneous aggregate ABI)
 - #161236 (Download auto jobs in citool in parallel)
 - #161254 (Reserve capacity for 3% anon nodes)
 - #161283 (Tighten the language used for documenting `TargetOptions::llvm_abiname`)
 - #161291 (Rename `ProjectionPredicate` and `TraitPredicate`)
 - #161299 (Remove a bunch of unnecessary explicit lifetimes)
 - #161307 (make ARM maintainers pingable)
 - #161308 (Add regression test for rustc diagnostic to recognize variables in match guards)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 19, 2026
Rename `ProjectionPredicate` and `TraitPredicate`

Part of rust-lang#107250

This deviates from the plan I described in rust-lang#107250 (comment). The reason is that I kept getting into the awkward situation where I would go into a function dealing with multiple predicate/clause kinds, and need to rename only the variables referring with the particular kind I was renaming. So now, the plan is to first rename only the types (this PR), and afterwards go into functions and rename all the variables in them at once. That would also allow splitting the work better, e.g. tackling one crate/subtree at a time.

r? @oli-obk
rust-bors Bot pushed a commit that referenced this pull request Aug 19, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #159071 ([PAC] Encoder and hash (1/8))
 - #161068 (Ensure TLS accesses don't call the global allocator through panic (part 3) )
 - #161332 (Some `GlobalCtxt`/`Session` cleanups)
 - #161344 (Update the `rustc-perf` submodule)
 - #150931 (rustdoc: Always document `#[repr(transparent)]` if `#[rustc_pub_transparent]` is applied)
 - #160582 (Add `remove hidden_glob_reexports item breaks downstream` test)
 - #160876 (remove unwrap from write_mir_fn_graphviz)
 - #160927 (Enhance EII UI tests)
 - #161070 (fix arm homogeneous aggregate ABI)
 - #161236 (Download auto jobs in citool in parallel)
 - #161254 (Reserve capacity for 3% anon nodes)
 - #161283 (Tighten the language used for documenting `TargetOptions::llvm_abiname`)
 - #161291 (Rename `ProjectionPredicate` and `TraitPredicate`)
 - #161299 (Remove a bunch of unnecessary explicit lifetimes)
 - #161307 (make ARM maintainers pingable)
 - #161308 (Add regression test for rustc diagnostic to recognize variables in match guards)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 19, 2026
Rename `ProjectionPredicate` and `TraitPredicate`

Part of rust-lang#107250

This deviates from the plan I described in rust-lang#107250 (comment). The reason is that I kept getting into the awkward situation where I would go into a function dealing with multiple predicate/clause kinds, and need to rename only the variables referring with the particular kind I was renaming. So now, the plan is to first rename only the types (this PR), and afterwards go into functions and rename all the variables in them at once. That would also allow splitting the work better, e.g. tackling one crate/subtree at a time.

r? @oli-obk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants