summaryrefslogtreecommitdiff
path: root/src/mir/from_hir.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-11-25 15:23:03 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-11-25 15:23:03 +0800
commit1153b337bd842c2694272d8df5fdb2d39063636d (patch)
tree207d5a905f1d9711714d6a75d4eba4a009d4ad32 /src/mir/from_hir.cpp
parent2d0613271e2ea877f2e9f2a1d6dc5285ec1dc8d5 (diff)
downloadmrust-1153b337bd842c2694272d8df5fdb2d39063636d.tar.gz
MIR Gen - Comment about cast bug
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r--src/mir/from_hir.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp
index 06a70d49..74d6af9c 100644
--- a/src/mir/from_hir.cpp
+++ b/src/mir/from_hir.cpp
@@ -1217,6 +1217,8 @@ namespace {
const auto& ty_out = node.m_res_type;
const auto& ty_in = node.m_value->m_res_type;
+ // TODO: The correct behavior is to do the cast (into a rvalue) no matter what.
+ // See test run-pass/issue-36936
if( ty_out == ty_in ) {
return ;
}