summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hir_typeck/expr_cs.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index 789f8509..d0f15d10 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -2312,6 +2312,10 @@ namespace {
const auto& ty_r = context.m_ivars.get_type(node_ptr->m_res_type);
TRACE_FUNCTION_F(v << " - " << ty << " := " << ty_r);
+ if( context.m_ivars.types_equal(ty, ty_r) ) {
+ return true;
+ }
+
// TODO: CoerceUnsized trait
// 1. Check that the source type can coerce