summaryrefslogtreecommitdiff
path: root/src/hir_typeck/expr_check.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2019-05-19 22:15:02 +0800
committerJohn Hodge <tpg@ucc.asn.au>2019-05-19 22:15:02 +0800
commitb48167dec0c1c05b463991a8db5a8db70a5ae604 (patch)
treeeadc95ab546a617d298fb3a16fb080e1bc4355e8 /src/hir_typeck/expr_check.cpp
parentdab5cf5462d8fce6d6fcaa1343df8f5f3b763b8a (diff)
downloadmrust-b48167dec0c1c05b463991a8db5a8db70a5ae604.tar.gz
All - Switch to using interned (de-duplicated) RcString-s instead of std::string for paths/identifiers
Diffstat (limited to 'src/hir_typeck/expr_check.cpp')
-rw-r--r--src/hir_typeck/expr_check.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hir_typeck/expr_check.cpp b/src/hir_typeck/expr_check.cpp
index 0d3bc8ab..aa26ae1f 100644
--- a/src/hir_typeck/expr_check.cpp
+++ b/src/hir_typeck/expr_check.cpp
@@ -832,7 +832,7 @@ namespace {
// TODO: Either - Don't include the above impl bound, or change the below trait to the one that has that type
for( const auto& assoc : be.trait.m_type_bounds ) {
::HIR::GenericPath type_trait_path;
- bool has_ty = m_resolve.trait_contains_type(sp, real_trait, *be.trait.m_trait_ptr, assoc.first, type_trait_path);
+ bool has_ty = m_resolve.trait_contains_type(sp, real_trait, *be.trait.m_trait_ptr, assoc.first.c_str(), type_trait_path);
ASSERT_BUG(sp, has_ty, "Type " << assoc.first << " not found in chain of " << real_trait);
auto other_ty = monomorphise_type_with(sp, assoc.second, cache.m_monomorph_cb, true);
@@ -934,7 +934,7 @@ namespace {
const auto& sp = node.span();
const auto& str_ty = node.m_value->m_res_type;
- bool is_index = ( '0' <= node.m_field[0] && node.m_field[0] <= '9' );
+ bool is_index = ( '0' <= node.m_field.c_str()[0] && node.m_field.c_str()[0] <= '9' );
if( str_ty.m_data.is_Tuple() )
{
ASSERT_BUG(sp, is_index, "Non-index _Field on tuple");