Skip to content

Commit 48bce46

Browse files
Mohammad Fawazmohammadfawaz
authored andcommitted
fmt
1 parent b1f282d commit 48bce46

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

  • compiler/passes/src/type_checking

compiler/passes/src/type_checking/ast.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
759759
}
760760
BinaryOperation::BitwiseAnd | BinaryOperation::BitwiseOr | BinaryOperation::Xor => {
761761
let operand_expected = self.unwrap_optional_type(destination);
762-
762+
763763
// The expected type for both `left` and `right` is the unwrapped type
764764
let mut t1 = self.visit_expression(&input.left, &operand_expected);
765765
let mut t2 = self.visit_expression(&input.right, &operand_expected);
@@ -773,12 +773,12 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
773773

774774
let result_t = assert_same_type(self, &t1, &t2);
775775
self.maybe_assert_type(&result_t, destination, input.span());
776-
776+
777777
self.wrap_if_optional(result_t, destination)
778778
}
779779
BinaryOperation::Add => {
780780
let operand_expected = self.unwrap_optional_type(destination);
781-
781+
782782
// The expected type for both `left` and `right` is the unwrapped type
783783
let mut t1 = self.visit_expression(&input.left, &operand_expected);
784784
let mut t2 = self.visit_expression(&input.right, &operand_expected);
@@ -808,7 +808,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
808808
}
809809
BinaryOperation::Sub => {
810810
let operand_expected = self.unwrap_optional_type(destination);
811-
811+
812812
// The expected type for both `left` and `right` is the unwrapped type
813813
let mut t1 = self.visit_expression(&input.left, &operand_expected);
814814
let mut t2 = self.visit_expression(&input.right, &operand_expected);
@@ -828,7 +828,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
828828
}
829829
BinaryOperation::Mul => {
830830
let unwrapped_dest = self.unwrap_optional_type(destination);
831-
831+
832832
// The expected type for both `left` and `right` is the same as unwrapped destination except when it is
833833
// a `Type::Group`. In that case, the two operands should be a `Type::Group` and `Type::Scalar` but we can't
834834
// known which one is which.
@@ -869,7 +869,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
869869
}
870870
BinaryOperation::Div => {
871871
let operand_expected = self.unwrap_optional_type(destination);
872-
872+
873873
// The expected type for both `left` and `right` is the unwrapped type
874874
let mut t1 = self.visit_expression(&input.left, &operand_expected);
875875
let mut t2 = self.visit_expression(&input.right, &operand_expected);
@@ -889,7 +889,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
889889
}
890890
BinaryOperation::Rem | BinaryOperation::RemWrapped => {
891891
let operand_expected = self.unwrap_optional_type(destination);
892-
892+
893893
// The expected type for both `left` and `right` is the unwrapped type
894894
let mut t1 = self.visit_expression(&input.left, &operand_expected);
895895
let mut t2 = self.visit_expression(&input.right, &operand_expected);
@@ -909,7 +909,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
909909
}
910910
BinaryOperation::Mod => {
911911
let operand_expected = self.unwrap_optional_type(destination);
912-
912+
913913
// The expected type for both `left` and `right` is the unwrapped type
914914
let mut t1 = self.visit_expression(&input.left, &operand_expected);
915915
let mut t2 = self.visit_expression(&input.right, &operand_expected);
@@ -929,7 +929,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
929929
}
930930
BinaryOperation::Pow => {
931931
let operand_expected = self.unwrap_optional_type(destination);
932-
932+
933933
// The expected type of `left` is the unwrapped destination
934934
let mut t1 = self.visit_expression(&input.left, &operand_expected);
935935

@@ -1034,7 +1034,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
10341034
| BinaryOperation::DivWrapped
10351035
| BinaryOperation::MulWrapped => {
10361036
let operand_expected = self.unwrap_optional_type(destination);
1037-
1037+
10381038
// The expected type for both `left` and `right` is the unwrapped type
10391039
let mut t1 = self.visit_expression(&input.left, &operand_expected);
10401040
let mut t2 = self.visit_expression(&input.right, &operand_expected);
@@ -1058,7 +1058,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
10581058
| BinaryOperation::ShrWrapped
10591059
| BinaryOperation::PowWrapped => {
10601060
let operand_expected = self.unwrap_optional_type(destination);
1061-
1061+
10621062
// The expected type of `left` is the unwrapped `destination`
10631063
let t1 = self.visit_expression_reject_numeric(&input.left, &operand_expected);
10641064

@@ -1709,7 +1709,7 @@ impl AstVisitor for TypeCheckingVisitor<'_> {
17091709

17101710
fn visit_unary(&mut self, input: &UnaryExpression, destination: &Self::AdditionalInput) -> Self::Output {
17111711
let operand_expected = self.unwrap_optional_type(destination);
1712-
1712+
17131713
let assert_signed_int = |slf: &mut Self, type_: &Type| {
17141714
if !matches!(
17151715
type_,

0 commit comments

Comments
 (0)