Skip to content

Commit 405eb41

Browse files
authored
Rollup merge of #131825 - lcnr:probe-no-more-leak-2, r=compiler-errors
SolverDelegate add assoc type for Infcx makes writing trait bounds on it a lot nicer going forward. r? `@compiler-errors`
2 parents 7dbd92f + c45073e commit 405eb41

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: compiler/rustc_next_trait_solver/src/delegate.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ use rustc_type_ir::fold::TypeFoldable;
44
use rustc_type_ir::solve::{Certainty, Goal, NoSolution, SolverMode};
55
use rustc_type_ir::{self as ty, InferCtxtLike, Interner};
66

7-
pub trait SolverDelegate:
8-
Deref<Target: InferCtxtLike<Interner = <Self as SolverDelegate>::Interner>> + Sized
9-
{
7+
pub trait SolverDelegate: Deref<Target = <Self as SolverDelegate>::Infcx> + Sized {
8+
type Infcx: InferCtxtLike<Interner = <Self as SolverDelegate>::Interner>;
109
type Interner: Interner;
1110
fn cx(&self) -> Self::Interner {
1211
(**self).cx()

Diff for: compiler/rustc_trait_selection/src/solve/delegate.rs

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ impl<'tcx> Deref for SolverDelegate<'tcx> {
3636
}
3737

3838
impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<'tcx> {
39+
type Infcx = InferCtxt<'tcx>;
3940
type Interner = TyCtxt<'tcx>;
4041

4142
fn cx(&self) -> TyCtxt<'tcx> {

0 commit comments

Comments
 (0)