Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/method_resolution.rs')
| -rw-r--r-- | crates/hir-ty/src/method_resolution.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-ty/src/method_resolution.rs b/crates/hir-ty/src/method_resolution.rs index 2c6c7ed9a5..86477f2c0b 100644 --- a/crates/hir-ty/src/method_resolution.rs +++ b/crates/hir-ty/src/method_resolution.rs @@ -256,7 +256,7 @@ impl<'db> InferenceTable<'db> { let obligation = Obligation::new( self.interner(), - cause.clone(), + cause, self.param_env, TraitRef::new_from_args(self.interner(), trait_def_id.into(), args), ); @@ -316,7 +316,7 @@ impl<'db> InferenceTable<'db> { let bounds = GenericPredicates::query_all(self.db, method_item.into()); let bounds = clauses_as_obligations( bounds.iter_instantiated(interner, args.as_slice()), - ObligationCause::new(), + cause, self.param_env, ); @@ -330,7 +330,7 @@ impl<'db> InferenceTable<'db> { for ty in fn_sig.inputs_and_output { obligations.push(Obligation::new( interner, - obligation.cause.clone(), + obligation.cause, self.param_env, Binder::dummy(PredicateKind::Clause(ClauseKind::WellFormed(ty.into()))), )); |