better merge

This commit is contained in:
Douglas Creager 2025-11-11 19:44:18 -05:00
parent de2b651136
commit d904d55c4d
1 changed files with 4 additions and 1 deletions

View File

@ -146,7 +146,10 @@ impl<'db> BoundTypeVarInstance<'db> {
impl<'a, 'db> InferableTypeVars<'a, 'db> { impl<'a, 'db> InferableTypeVars<'a, 'db> {
pub(crate) fn merge(&'a self, other: &'a InferableTypeVars<'a, 'db>) -> Self { pub(crate) fn merge(&'a self, other: &'a InferableTypeVars<'a, 'db>) -> Self {
InferableTypeVars::Two(self, other) match (self, other) {
(InferableTypeVars::None, other) | (other, InferableTypeVars::None) => other.clone(),
_ => InferableTypeVars::Two(self, other),
}
} }
// This is not an IntoIterator implementation because I have no desire to try to name the // This is not an IntoIterator implementation because I have no desire to try to name the