Skip to content

Commit 49e1816

Browse files
Remove span from delegate
1 parent ae5de6c commit 49e1816

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

compiler/rustc_next_trait_solver/src/delegate.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ pub trait SolverDelegate: Deref<Target = <Self as SolverDelegate>::Infcx> + Size
1111
(**self).cx()
1212
}
1313

14-
type Span: Copy;
15-
1614
fn build_with_canonical<V>(
1715
cx: Self::Interner,
1816
canonical: &ty::CanonicalQueryInput<Self::Interner, V>,
@@ -23,7 +21,7 @@ pub trait SolverDelegate: Deref<Target = <Self as SolverDelegate>::Infcx> + Size
2321
fn fresh_var_for_kind_with_span(
2422
&self,
2523
arg: <Self::Interner as Interner>::GenericArg,
26-
span: Self::Span,
24+
span: <Self::Interner as Interner>::Span,
2725
) -> <Self::Interner as Interner>::GenericArg;
2826

2927
// FIXME: Uplift the leak check into this crate.

compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ where
431431
// `rustc_trait_selection::solve::inspect::analyse`.
432432
pub fn instantiate_canonical_state<D, I, T: TypeFoldable<I>>(
433433
delegate: &D,
434-
span: D::Span,
434+
span: I::Span,
435435
param_env: I::ParamEnv,
436436
orig_values: &mut Vec<I::GenericArg>,
437437
state: inspect::CanonicalState<I, T>,

compiler/rustc_trait_selection/src/solve/delegate.rs

-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
4343
self.0.tcx
4444
}
4545

46-
type Span = Span;
47-
4846
fn build_with_canonical<V>(
4947
interner: TyCtxt<'tcx>,
5048
canonical: &CanonicalQueryInput<'tcx, V>,

0 commit comments

Comments
 (0)