Skip to content

Commit

Permalink
Arbitrary self types v2: hacky fix
Browse files Browse the repository at this point in the history
This "fix" indicates that the current approach around
`receiver_trait_derefs` may not be good enough for extension traits.
This needs more thought before we land this, but pushing this commit
meanwhile to see if this PR passes the CI in other ways.
  • Loading branch information
adetaylor committed Nov 13, 2024
1 parent c45e560 commit 0e03674
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_hir_typeck/src/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,8 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
self.receiver_trait_derefs = step.autoderefs;
self.assemble_probe(&step.self_ty);
}
// FIXME this isn't good
self.receiver_trait_derefs = 0;
}

#[instrument(level = "debug", skip(self))]
Expand Down

0 comments on commit 0e03674

Please sign in to comment.