diff options
Diffstat (limited to 'crates/ra_hir_ty/src/traits/chalk.rs')
-rw-r--r-- | crates/ra_hir_ty/src/traits/chalk.rs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/crates/ra_hir_ty/src/traits/chalk.rs b/crates/ra_hir_ty/src/traits/chalk.rs index 5298dbecf..1c7065364 100644 --- a/crates/ra_hir_ty/src/traits/chalk.rs +++ b/crates/ra_hir_ty/src/traits/chalk.rs | |||
@@ -183,6 +183,7 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> { | |||
183 | .collect(), | 183 | .collect(), |
184 | 1, | 184 | 1, |
185 | ), | 185 | ), |
186 | where_clauses: make_binders(vec![], 0), | ||
186 | }; | 187 | }; |
187 | let num_vars = datas.num_binders; | 188 | let num_vars = datas.num_binders; |
188 | Arc::new(OpaqueTyDatum { opaque_ty_id: id, bound: make_binders(bound, num_vars) }) | 189 | Arc::new(OpaqueTyDatum { opaque_ty_id: id, bound: make_binders(bound, num_vars) }) |
@@ -193,15 +194,6 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> { | |||
193 | Ty::Unknown.to_chalk(self.db) | 194 | Ty::Unknown.to_chalk(self.db) |
194 | } | 195 | } |
195 | 196 | ||
196 | fn force_impl_for( | ||
197 | &self, | ||
198 | _well_known: rust_ir::WellKnownTrait, | ||
199 | _ty: &chalk_ir::TyData<Interner>, | ||
200 | ) -> Option<bool> { | ||
201 | // this method is mostly for rustc | ||
202 | None | ||
203 | } | ||
204 | |||
205 | fn is_object_safe(&self, _trait_id: chalk_ir::TraitId<Interner>) -> bool { | 197 | fn is_object_safe(&self, _trait_id: chalk_ir::TraitId<Interner>) -> bool { |
206 | // FIXME: implement actual object safety | 198 | // FIXME: implement actual object safety |
207 | true | 199 | true |
@@ -547,8 +539,13 @@ pub(crate) fn fn_def_datum_query( | |||
547 | ), | 539 | ), |
548 | where_clauses, | 540 | where_clauses, |
549 | }; | 541 | }; |
550 | let datum = | 542 | let datum = FnDefDatum { |
551 | FnDefDatum { id: fn_def_id, binders: make_binders(bound, sig.num_binders), abi: () }; | 543 | id: fn_def_id, |
544 | abi: (), | ||
545 | safety: chalk_ir::Safety::Safe, | ||
546 | variadic: sig.value.is_varargs, | ||
547 | binders: make_binders(bound, sig.num_binders), | ||
548 | }; | ||
552 | Arc::new(datum) | 549 | Arc::new(datum) |
553 | } | 550 | } |
554 | 551 | ||