Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/op.rs')
-rw-r--r--crates/hir-ty/src/infer/op.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/hir-ty/src/infer/op.rs b/crates/hir-ty/src/infer/op.rs
index c61b6c9ae5..c79c828cd4 100644
--- a/crates/hir-ty/src/infer/op.rs
+++ b/crates/hir-ty/src/infer/op.rs
@@ -39,7 +39,7 @@ impl<'a, 'db> InferenceContext<'a, 'db> {
&& is_builtin_binop(lhs_ty, rhs_ty, category)
{
self.enforce_builtin_binop_types(lhs_ty, rhs_ty, category);
- self.types.unit
+ self.types.types.unit
} else {
return_ty
};
@@ -67,20 +67,20 @@ impl<'a, 'db> InferenceContext<'a, 'db> {
// && and || are a simple case.
self.infer_expr_coerce(
lhs_expr,
- &Expectation::HasType(self.types.bool),
+ &Expectation::HasType(self.types.types.bool),
ExprIsRead::Yes,
);
let lhs_diverges = self.diverges;
self.infer_expr_coerce(
rhs_expr,
- &Expectation::HasType(self.types.bool),
+ &Expectation::HasType(self.types.types.bool),
ExprIsRead::Yes,
);
// Depending on the LHS' value, the RHS can never execute.
self.diverges = lhs_diverges;
- self.types.bool
+ self.types.types.bool
}
_ => {
// Otherwise, we always treat operators as if they are
@@ -131,9 +131,9 @@ impl<'a, 'db> InferenceContext<'a, 'db> {
match category {
BinOpCategory::Shortcircuit => {
- self.demand_suptype(self.types.bool, lhs_ty);
- self.demand_suptype(self.types.bool, rhs_ty);
- self.types.bool
+ self.demand_suptype(self.types.types.bool, lhs_ty);
+ self.demand_suptype(self.types.types.bool, rhs_ty);
+ self.types.types.bool
}
BinOpCategory::Shift => {
@@ -150,7 +150,7 @@ impl<'a, 'db> InferenceContext<'a, 'db> {
BinOpCategory::Comparison => {
// both LHS and RHS and result will have the same type
self.demand_suptype(lhs_ty, rhs_ty);
- self.types.bool
+ self.types.types.bool
}
}
}
@@ -251,7 +251,7 @@ impl<'a, 'db> InferenceContext<'a, 'db> {
}
Err(_errors) => {
// FIXME: Report diagnostic.
- self.types.error
+ self.types.types.error
}
};
@@ -271,7 +271,7 @@ impl<'a, 'db> InferenceContext<'a, 'db> {
}
Err(_errors) => {
// FIXME: Report diagnostic.
- self.types.error
+ self.types.types.error
}
}
}