aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/hir_ty/src/infer/unify.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs
index 21d3fb54e..f8233cac3 100644
--- a/crates/hir_ty/src/infer/unify.rs
+++ b/crates/hir_ty/src/infer/unify.rs
@@ -435,7 +435,7 @@ mod resolve {
435 use super::InferenceTable; 435 use super::InferenceTable;
436 use crate::{ 436 use crate::{
437 ConcreteConst, Const, ConstData, ConstValue, DebruijnIndex, GenericArg, InferenceVar, 437 ConcreteConst, Const, ConstData, ConstValue, DebruijnIndex, GenericArg, InferenceVar,
438 Interner, Ty, TyVariableKind, VariableKind, 438 Interner, Lifetime, Ty, TyVariableKind, VariableKind,
439 }; 439 };
440 use chalk_ir::{ 440 use chalk_ir::{
441 cast::Cast, 441 cast::Cast,
@@ -524,5 +524,17 @@ mod resolve {
524 }; 524 };
525 Ok(result) 525 Ok(result)
526 } 526 }
527
528 fn fold_inference_lifetime(
529 &mut self,
530 _var: InferenceVar,
531 _outer_binder: DebruijnIndex,
532 ) -> Fallible<Lifetime> {
533 // fall back all lifetimes to 'static -- currently we don't deal
534 // with any lifetimes, but we can sometimes get some lifetime
535 // variables through Chalk's unification, and this at least makes
536 // sure we don't leak them outside of inference
537 Ok(crate::static_lifetime())
538 }
527 } 539 }
528} 540}