diff --git a/Cargo.lock b/Cargo.lock index 85839bf477b..2c8202621ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,9 +162,9 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "chalk-derive" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5444ff2a211fe2a863e44d16a368c3d8a314d489de21b8eeb6879f14dd5d4a8" +checksum = "8c85b013e2dc1b46ac4a279f54e62e55556a8c4d859f7b7c4e340a9b1d013640" dependencies = [ "proc-macro2", "quote", @@ -174,9 +174,9 @@ dependencies = [ [[package]] name = "chalk-ir" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e39c3db1dd4abfaa7658faaa62e5fe998a982a592b710bd971fad5b6adfcfdef" +checksum = "2135d844688dc920e3ece3012c5d3d4f06e26986fe38bc041bc98f0e7a9f4e2b" dependencies = [ "chalk-derive", "lazy_static", @@ -184,9 +184,9 @@ dependencies = [ [[package]] name = "chalk-recursive" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bfae328eff80ca54dcd0d731725bbb56136ac21c59261b68f1e5498e056b306" +checksum = "cffdc1af3a413b7dd1e776cf81a863148b17e3c3f90f70d1fd216a68f816a622" dependencies = [ "chalk-derive", "chalk-ir", @@ -197,9 +197,9 @@ dependencies = [ [[package]] name = "chalk-solve" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a673abe3077adc25f8ee0894198aed494a5bb0ce50ee993900d0ee1a44e1948a" +checksum = "bc69e4e94ffd4b39f1a865824b431bb82a7b4c8f14a0ba3d461cd86e56a590ac" dependencies = [ "chalk-derive", "chalk-ir", diff --git a/crates/hir_ty/Cargo.toml b/crates/hir_ty/Cargo.toml index bc86df2b168..03215be448e 100644 --- a/crates/hir_ty/Cargo.toml +++ b/crates/hir_ty/Cargo.toml @@ -17,9 +17,9 @@ ena = "0.14.0" log = "0.4.8" rustc-hash = "1.1.0" scoped-tls = "1" -chalk-solve = { version = "0.27.0" } -chalk-ir = { version = "0.27.0" } -chalk-recursive = { version = "0.27.0" } +chalk-solve = { version = "0.28.0" } +chalk-ir = { version = "0.28.0" } +chalk-recursive = { version = "0.28.0" } stdx = { path = "../stdx", version = "0.0.0" } hir_def = { path = "../hir_def", version = "0.0.0" } diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs index 27f0ed628fe..009b17a7f5f 100644 --- a/crates/hir_ty/src/traits/chalk.rs +++ b/crates/hir_ty/src/traits/chalk.rs @@ -129,8 +129,12 @@ fn binder_kind(ty: &Ty, binders: &CanonicalVarKinds) -> Option bool { - debug!("impl_provided_for {:?}, {:?}", auto_trait_id, struct_id); + fn impl_provided_for( + &self, + auto_trait_id: TraitId, + application_ty: &chalk_ir::ApplicationTy, + ) -> bool { + debug!("impl_provided_for {:?}, {:?}", auto_trait_id, application_ty); false // FIXME } fn associated_ty_value(&self, id: AssociatedTyValueId) -> Arc { @@ -422,6 +426,7 @@ fn well_known_trait_from_lang_attr(name: &str) -> Option { "fn_mut" => WellKnownTrait::FnMut, "fn" => WellKnownTrait::Fn, "unsize" => WellKnownTrait::Unsize, + "coerce_unsized" => WellKnownTrait::CoerceUnsized, _ => return None, }) } @@ -437,6 +442,7 @@ fn lang_attr_from_well_known_trait(attr: WellKnownTrait) -> &'static str { WellKnownTrait::Fn => "fn", WellKnownTrait::Unsize => "unsize", WellKnownTrait::Unpin => "unpin", + WellKnownTrait::CoerceUnsized => "coerce_unsized", } }