aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty')
-rw-r--r--crates/hir_ty/Cargo.toml6
-rw-r--r--crates/hir_ty/src/infer.rs2
-rw-r--r--crates/hir_ty/src/traits/chalk.rs10
3 files changed, 12 insertions, 6 deletions
diff --git a/crates/hir_ty/Cargo.toml b/crates/hir_ty/Cargo.toml
index bc86df2b1..03215be44 100644
--- a/crates/hir_ty/Cargo.toml
+++ b/crates/hir_ty/Cargo.toml
@@ -17,9 +17,9 @@ ena = "0.14.0"
17log = "0.4.8" 17log = "0.4.8"
18rustc-hash = "1.1.0" 18rustc-hash = "1.1.0"
19scoped-tls = "1" 19scoped-tls = "1"
20chalk-solve = { version = "0.27.0" } 20chalk-solve = { version = "0.28.0" }
21chalk-ir = { version = "0.27.0" } 21chalk-ir = { version = "0.28.0" }
22chalk-recursive = { version = "0.27.0" } 22chalk-recursive = { version = "0.28.0" }
23 23
24stdx = { path = "../stdx", version = "0.0.0" } 24stdx = { path = "../stdx", version = "0.0.0" }
25hir_def = { path = "../hir_def", version = "0.0.0" } 25hir_def = { path = "../hir_def", version = "0.0.0" }
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs
index 2b53b8297..9a7785c76 100644
--- a/crates/hir_ty/src/infer.rs
+++ b/crates/hir_ty/src/infer.rs
@@ -555,7 +555,7 @@ impl<'a> InferenceContext<'a> {
555 555
556 fn resolve_lang_item(&self, name: &str) -> Option<LangItemTarget> { 556 fn resolve_lang_item(&self, name: &str) -> Option<LangItemTarget> {
557 let krate = self.resolver.krate()?; 557 let krate = self.resolver.krate()?;
558 let name = SmolStr::new_inline_from_ascii(name.len(), name.as_bytes()); 558 let name = SmolStr::new_inline(name);
559 self.db.lang_item(krate, name) 559 self.db.lang_item(krate, name)
560 } 560 }
561 561
diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs
index 27f0ed628..009b17a7f 100644
--- a/crates/hir_ty/src/traits/chalk.rs
+++ b/crates/hir_ty/src/traits/chalk.rs
@@ -129,8 +129,12 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
129 debug!("impls_for_trait returned {} impls", result.len()); 129 debug!("impls_for_trait returned {} impls", result.len());
130 result 130 result
131 } 131 }
132 fn impl_provided_for(&self, auto_trait_id: TraitId, struct_id: AdtId) -> bool { 132 fn impl_provided_for(
133 debug!("impl_provided_for {:?}, {:?}", auto_trait_id, struct_id); 133 &self,
134 auto_trait_id: TraitId,
135 application_ty: &chalk_ir::ApplicationTy<Interner>,
136 ) -> bool {
137 debug!("impl_provided_for {:?}, {:?}", auto_trait_id, application_ty);
134 false // FIXME 138 false // FIXME
135 } 139 }
136 fn associated_ty_value(&self, id: AssociatedTyValueId) -> Arc<AssociatedTyValue> { 140 fn associated_ty_value(&self, id: AssociatedTyValueId) -> Arc<AssociatedTyValue> {
@@ -422,6 +426,7 @@ fn well_known_trait_from_lang_attr(name: &str) -> Option<WellKnownTrait> {
422 "fn_mut" => WellKnownTrait::FnMut, 426 "fn_mut" => WellKnownTrait::FnMut,
423 "fn" => WellKnownTrait::Fn, 427 "fn" => WellKnownTrait::Fn,
424 "unsize" => WellKnownTrait::Unsize, 428 "unsize" => WellKnownTrait::Unsize,
429 "coerce_unsized" => WellKnownTrait::CoerceUnsized,
425 _ => return None, 430 _ => return None,
426 }) 431 })
427} 432}
@@ -437,6 +442,7 @@ fn lang_attr_from_well_known_trait(attr: WellKnownTrait) -> &'static str {
437 WellKnownTrait::Fn => "fn", 442 WellKnownTrait::Fn => "fn",
438 WellKnownTrait::Unsize => "unsize", 443 WellKnownTrait::Unsize => "unsize",
439 WellKnownTrait::Unpin => "unpin", 444 WellKnownTrait::Unpin => "unpin",
445 WellKnownTrait::CoerceUnsized => "coerce_unsized",
440 } 446 }
441} 447}
442 448