Upgrade Chalk
This commit is contained in:
parent
e0d9f79399
commit
4b64bc1fc9
20 changed files with 207 additions and 51 deletions
|
@ -26,7 +26,8 @@ rustc_index = { path = "../rustc_index" }
|
|||
rustc_serialize = { path = "../rustc_serialize" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
chalk-ir = "0.36.0"
|
||||
#chalk-ir = {"0.46.0"}
|
||||
chalk-ir = { git = "https://github.com/jackh726/chalk.git", rev = "972534b01b54f96ff37e5afa4ce18d8a7cdd932d" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
measureme = "9.0.0"
|
||||
rustc_session = { path = "../rustc_session" }
|
||||
|
|
|
@ -72,6 +72,7 @@ impl<'tcx> chalk_ir::interner::Interner for RustInterner<'tcx> {
|
|||
type InternedQuantifiedWhereClauses = Vec<chalk_ir::QuantifiedWhereClause<Self>>;
|
||||
type InternedVariableKinds = Vec<chalk_ir::VariableKind<Self>>;
|
||||
type InternedCanonicalVarKinds = Vec<chalk_ir::CanonicalVarKind<Self>>;
|
||||
type InternedVariances = Vec<chalk_ir::Variance>;
|
||||
type InternedConstraints = Vec<chalk_ir::InEnvironment<chalk_ir::Constraint<Self>>>;
|
||||
type DefId = DefId;
|
||||
type InternedAdtId = &'tcx AdtDef;
|
||||
|
@ -351,6 +352,20 @@ impl<'tcx> chalk_ir::interner::Interner for RustInterner<'tcx> {
|
|||
) -> &'a [chalk_ir::InEnvironment<chalk_ir::Constraint<Self>>] {
|
||||
constraints
|
||||
}
|
||||
|
||||
fn intern_variances<E>(
|
||||
&self,
|
||||
data: impl IntoIterator<Item = Result<chalk_ir::Variance, E>>,
|
||||
) -> Result<Self::InternedVariances, E> {
|
||||
data.into_iter().collect::<Result<Vec<_>, _>>()
|
||||
}
|
||||
|
||||
fn variances_data<'a>(
|
||||
&self,
|
||||
variances: &'a Self::InternedVariances,
|
||||
) -> &'a [chalk_ir::Variance] {
|
||||
variances
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> chalk_ir::interner::HasInterner for RustInterner<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue