Skip to content

Commit 0e03674

Browse files
committed
Arbitrary self types v2: hacky fix
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.
1 parent c45e560 commit 0e03674

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_hir_typeck/src/method

1 file changed

+2
-0
lines changed

compiler/rustc_hir_typeck/src/method/probe.rs

+2
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,8 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
768768
self.receiver_trait_derefs = step.autoderefs;
769769
self.assemble_probe(&step.self_ty);
770770
}
771+
// FIXME this isn't good
772+
self.receiver_trait_derefs = 0;
771773
}
772774

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

0 commit comments

Comments
 (0)