diff options
author | Roland Ruckerbauer <[email protected]> | 2020-10-14 18:00:04 +0100 |
---|---|---|
committer | Roland Ruckerbauer <[email protected]> | 2020-10-14 18:00:04 +0100 |
commit | 0e9d1e17d6e45b44ec1a8f1430109cfc75e41241 (patch) | |
tree | a1ba22d3776968e2704d6bd269eeec2cebe4419a /crates/hir_ty/src/infer | |
parent | 4e49b2f73144460cde5ada8140964d96166f41fd (diff) |
binary operator overload type inference: add test mark
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index 8cc0d56d3..8ac4cf89a 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -12,6 +12,7 @@ use hir_def::{ | |||
12 | }; | 12 | }; |
13 | use hir_expand::name::{name, Name}; | 13 | use hir_expand::name::{name, Name}; |
14 | use syntax::ast::RangeOp; | 14 | use syntax::ast::RangeOp; |
15 | use test_utils::mark; | ||
15 | 16 | ||
16 | use crate::{ | 17 | use crate::{ |
17 | autoderef, method_resolution, op, | 18 | autoderef, method_resolution, op, |
@@ -537,6 +538,8 @@ impl<'a> InferenceContext<'a> { | |||
537 | let ret = op::binary_op_return_ty(*op, lhs_ty.clone(), rhs_ty.clone()); | 538 | let ret = op::binary_op_return_ty(*op, lhs_ty.clone(), rhs_ty.clone()); |
538 | 539 | ||
539 | if ret == Ty::Unknown { | 540 | if ret == Ty::Unknown { |
541 | mark::hit!(infer_expr_inner_binary_operator_overload); | ||
542 | |||
540 | self.resolve_associated_type_with_params( | 543 | self.resolve_associated_type_with_params( |
541 | lhs_ty, | 544 | lhs_ty, |
542 | self.resolve_binary_op_output(op), | 545 | self.resolve_binary_op_output(op), |