pub trait CanonicalExt<'db, V> {
// Required methods
fn instantiate(
&self,
tcx: DbInterner<'db>,
var_values: &CanonicalVarValues<'db>,
) -> V
where V: TypeFoldable<DbInterner<'db>>;
fn instantiate_projected<T>(
&self,
tcx: DbInterner<'db>,
var_values: &CanonicalVarValues<'db>,
projection_fn: impl FnOnce(&V) -> T,
) -> T
where T: TypeFoldable<DbInterner<'db>>;
}
Required Methods§
fn instantiate(
&self,
tcx: DbInterner<'db>,
var_values: &CanonicalVarValues<'db>,
) -> Vwhere
V: TypeFoldable<DbInterner<'db>>,
fn instantiate_projected<T>(
&self,
tcx: DbInterner<'db>,
var_values: &CanonicalVarValues<'db>,
projection_fn: impl FnOnce(&V) -> T,
) -> Twhere
T: TypeFoldable<DbInterner<'db>>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<'db, V> CanonicalExt<'db, V> for Canonical<'db, V>
FIXME(-Znext-solver): This or public because it is shared with the new trait solver implementation. We should deduplicate canonicalization.