Skip to content

Conversation

@Jamesbarford
Copy link
Contributor

r? ghost

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Dec 22, 2025
@rust-log-analyzer

This comment has been minimized.

@Jamesbarford Jamesbarford force-pushed the chore/refactor-struct-placeholder-pt2 branch from 753b92c to 2077c6b Compare December 30, 2025 08:41
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

pub enum GenericKind<'tcx> {
Param(ty::ParamTy),
Placeholder(ty::PlaceholderType<'tcx>),
Placeholder(ty::PlaceholderType<TyCtxt<'tcx>>),
Copy link
Contributor

Choose a reason for hiding this comment

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

there are currently a bunch of spurious edits + outdated formatting things here 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woops, yes, I'm sorting things out bit by bit. I'll squash all the commits when I'm done and remove the odd edits and commented out code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm getting the following error and I'm not too sure why as I'm using #[derive_where(HashStable_NoContext)];

error[E0599]: the method `hash_stable` exists for reference `&binder::BoundRegion<I>`, but its trait bounds were not satisfied
    --> compiler/rustc_type_ir/src/region_kind.rs:228:19
     |
 228 |                 r.hash_stable(hcx, hasher);
     |                   ^^^^^^^^^^^ method cannot be called on `&binder::BoundRegion<I>` due to unsatisfied trait bounds
     |
    ::: compiler/rustc_type_ir/src/binder.rs:1014:1
     |
1014 | pub enum BoundRegionKind<I: Interner> {
     | ------------------------------------- doesn't satisfy `BoundRegionKind<I>: HashStable<_>`
...
1083 | pub struct BoundRegion<I: Interner> {
     | ----------------------------------- doesn't satisfy `binder::BoundRegion<I>: HashStable<_>`
     |
     = note: trait bound `BoundRegionKind<I>: HashStable<_>` was not satisfied
     = note: the following trait bounds were not satisfied:
             `binder::BoundRegion<I>: HashStable<_>`
             which is required by `&binder::BoundRegion<I>: HashStable<_>`
note: the trait `HashStable` must be implemented
    --> /rust/compiler/rustc_data_structures/src/stable_hasher.rs:44:1
     |
  44 | pub trait HashStable<CTX> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: the method `hash_stable` exists for reference `&binder::Placeholder<I, binder::BoundRegion<I>>`, but its trait bounds were not satisfied
    --> compiler/rustc_type_ir/src/region_kind.rs:237:19
     |
 237 |                 r.hash_stable(hcx, hasher);
     |                   ^^^^^^^^^^^ method cannot be called on `&binder::Placeholder<I, binder::BoundRegion<I>>` due to unsatisfied trait bounds
     |
    ::: compiler/rustc_type_ir/src/binder.rs:969:1
     |
 969 | pub struct Placeholder<I: Interner, T> {
     | -------------------------------------- doesn't satisfy `_: HashStable<_>`
...
1083 | pub struct BoundRegion<I: Interner> {
     | ----------------------------------- doesn't satisfy `binder::BoundRegion<I>: HashStable<_>`
     |
     = note: trait bound `binder::BoundRegion<I>: HashStable<_>` was not satisfied
     = note: the following trait bounds were not satisfied:
             `binder::Placeholder<I, binder::BoundRegion<I>>: HashStable<_>`
             which is required by `&binder::Placeholder<I, binder::BoundRegion<I>>: HashStable<_>`
note: the trait `HashStable` must be implemented
    --> /rust/compiler/rustc_data_structures/src/stable_hasher.rs:44:1
     |
  44 | pub trait HashStable<CTX> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling fallible-iterator v0.3.0
[RUSTC-TIMING] libloading test:false 0.178
[RUSTC-TIMING] fallible_iterator test:false 0.250
   Compiling gimli v0.31.1
error[E0599]: the method `hash_stable` exists for reference `&binder::BoundRegion<I>`, but its trait bounds were not satisfied
    --> compiler/rustc_type_ir/src/region_kind.rs:228:19
     |
 228 |                 r.hash_stable(hcx, hasher);
     |                   ^^^^^^^^^^^ method cannot be called on `&binder::BoundRegion<I>` due to unsatisfied trait bounds
     |
    ::: compiler/rustc_type_ir/src/binder.rs:1014:1
     |
1014 | pub enum BoundRegionKind<I: Interner> {
     | ------------------------------------- doesn't satisfy `BoundRegionKind<I>: HashStable<_>`
...
1083 | pub struct BoundRegion<I: Interner> {
     | ----------------------------------- doesn't satisfy `binder::BoundRegion<I>: HashStable<_>`
     |
     = note: trait bound `BoundRegionKind<I>: HashStable<_>` was not satisfied
     = note: the following trait bounds were not satisfied:
             `binder::BoundRegion<I>: HashStable<_>`
             which is required by `&binder::BoundRegion<I>: HashStable<_>`
note: the trait `HashStable` must be implemented
    --> /checkout/compiler/rustc_data_structures/src/stable_hasher.rs:44:1
     |
  44 | pub trait HashStable<CTX> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: the method `hash_stable` exists for reference `&binder::Placeholder<I, binder::BoundRegion<I>>`, but its trait bounds were not satisfied
    --> compiler/rustc_type_ir/src/region_kind.rs:237:19
     |
 237 |                 r.hash_stable(hcx, hasher);
     |                   ^^^^^^^^^^^ method cannot be called on `&binder::Placeholder<I, binder::BoundRegion<I>>` due to unsatisfied trait bounds
     |
    ::: compiler/rustc_type_ir/src/binder.rs:969:1
     |
 969 | pub struct Placeholder<I: Interner, T> {
     | -------------------------------------- doesn't satisfy `_: HashStable<_>`
...
1083 | pub struct BoundRegion<I: Interner> {
     | ----------------------------------- doesn't satisfy `binder::BoundRegion<I>: HashStable<_>`
     |
     = note: trait bound `binder::BoundRegion<I>: HashStable<_>` was not satisfied
     = note: the following trait bounds were not satisfied:
             `binder::Placeholder<I, binder::BoundRegion<I>>: HashStable<_>`
             which is required by `&binder::Placeholder<I, binder::BoundRegion<I>>: HashStable<_>`
note: the trait `HashStable` must be implemented
    --> /checkout/compiler/rustc_data_structures/src/stable_hasher.rs:44:1
     |
  44 | pub trait HashStable<CTX> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler 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.

4 participants