Bump chalk

This commit is contained in:
Laurențiu Nicola 2021-12-04 15:08:43 +02:00
parent 89a1256f9a
commit 26aba38168
4 changed files with 34 additions and 24 deletions

16
Cargo.lock generated
View File

@ -171,9 +171,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chalk-derive"
version = "0.73.0"
version = "0.74.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f182e4c40ae0a36afff9904e46389df47d2f943bae70eab3d779c87aa5dd584"
checksum = "09d8c85134e234bead3fb78e4abd3ca2bdc228e5897b7f0fcd5265c4f4294375"
dependencies = [
"proc-macro2",
"quote",
@ -183,9 +183,9 @@ dependencies = [
[[package]]
name = "chalk-ir"
version = "0.73.0"
version = "0.74.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f998dcab9f6975ce5fe69c28acba246f75f82c1a8faa4455facac82ee61bc14"
checksum = "b08046b4a060d3fbf9df521a3aca331ff14d0a50c184b09a7b80edca1bf2aa79"
dependencies = [
"bitflags",
"chalk-derive",
@ -194,9 +194,9 @@ dependencies = [
[[package]]
name = "chalk-recursive"
version = "0.73.0"
version = "0.74.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c56b019577ff31fc12748cbe2ddcec47d2b9e647f98cce146bfeb69ad2263fb4"
checksum = "a8d0190d6f86bdd3395fb4482879cda3e40a14a4c32241805301fb079fd7b62c"
dependencies = [
"chalk-derive",
"chalk-ir",
@ -207,9 +207,9 @@ dependencies = [
[[package]]
name = "chalk-solve"
version = "0.73.0"
version = "0.74.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "296c92cae565a4000e3eea00ece09e14ce24e6bdc14a5807d140a4cc7652b8d4"
checksum = "2bb39cbb1887edb2e12513ad811bea9a70faf4f98f4de794c5899c2c2e43e1b4"
dependencies = [
"chalk-derive",
"chalk-ir",

View File

@ -18,9 +18,9 @@ ena = "0.14.0"
tracing = "0.1"
rustc-hash = "1.1.0"
scoped-tls = "1"
chalk-solve = { version = "0.73", default-features = false }
chalk-ir = "0.73"
chalk-recursive = { version = "0.73", default-features = false }
chalk-solve = { version = "0.74", default-features = false }
chalk-ir = "0.74"
chalk-recursive = { version = "0.74", default-features = false }
la-arena = { version = "0.3.0", path = "../../lib/arena" }
once_cell = { version = "1.5.0" }

View File

@ -3,8 +3,8 @@
use std::{fmt, mem, sync::Arc};
use chalk_ir::{
cast::Cast, fold::Fold, interner::HasInterner, zip::Zip, FloatTy, IntTy, TyVariableKind,
UniverseIndex,
cast::Cast, fold::Fold, interner::HasInterner, zip::Zip, FloatTy, IntTy, NoSolution,
TyVariableKind, UniverseIndex,
};
use chalk_solve::infer::ParameterEnaVariableExt;
use ena::unify::UnifyKey;
@ -412,7 +412,9 @@ impl<'a> InferenceTable<'a> {
highest_known_var: InferenceVar,
}
impl<'a, 'b> Folder<'static, Interner> for VarFudger<'a, 'b> {
fn as_dyn(&mut self) -> &mut dyn Folder<'static, Interner> {
type Error = NoSolution;
fn as_dyn(&mut self) -> &mut dyn Folder<'static, Interner, Error = Self::Error> {
self
}
@ -538,7 +540,7 @@ mod resolve {
use chalk_ir::{
cast::Cast,
fold::{Fold, Folder},
Fallible,
Fallible, NoSolution,
};
use hir_def::type_ref::ConstScalar;
@ -551,7 +553,9 @@ mod resolve {
where
F: Fn(InferenceVar, VariableKind, GenericArg, DebruijnIndex) -> GenericArg + 'i,
{
fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner> {
type Error = NoSolution;
fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner, Error = Self::Error> {
self
}

View File

@ -35,7 +35,7 @@ use std::sync::Arc;
use chalk_ir::{
fold::{Fold, Shift},
interner::HasInterner,
UintTy,
NoSolution, UintTy,
};
use hir_def::{
expr::ExprId,
@ -228,11 +228,11 @@ impl CallableSig {
impl Fold<Interner> for CallableSig {
type Result = CallableSig;
fn fold_with<'i>(
fn fold_with<'i, E>(
self,
folder: &mut dyn chalk_ir::fold::Folder<'i, Interner>,
folder: &mut dyn chalk_ir::fold::Folder<'i, Interner, Error = E>,
outer_binder: DebruijnIndex,
) -> chalk_ir::Fallible<Self::Result>
) -> Result<Self::Result, E>
where
Interner: 'i,
{
@ -282,7 +282,9 @@ pub(crate) fn fold_free_vars<T: HasInterner<Interner = Interner> + Fold<Interner
use chalk_ir::{fold::Folder, Fallible};
struct FreeVarFolder<F>(F);
impl<'i, F: FnMut(BoundVar, DebruijnIndex) -> Ty + 'i> Folder<'i, Interner> for FreeVarFolder<F> {
fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner> {
type Error = NoSolution;
fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner, Error = Self::Error> {
self
}
@ -312,7 +314,9 @@ pub(crate) fn fold_tys<T: HasInterner<Interner = Interner> + Fold<Interner>>(
};
struct TyFolder<F>(F);
impl<'i, F: FnMut(Ty, DebruijnIndex) -> Ty + 'i> Folder<'i, Interner> for TyFolder<F> {
fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner> {
type Error = NoSolution;
fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner, Error = Self::Error> {
self
}
@ -338,13 +342,15 @@ where
{
use chalk_ir::{
fold::{Folder, SuperFold},
Fallible, NoSolution,
Fallible,
};
struct ErrorReplacer {
vars: usize,
}
impl<'i> Folder<'i, Interner> for ErrorReplacer {
fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner> {
type Error = NoSolution;
fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner, Error = Self::Error> {
self
}