diff options
author | John Hodge <tpg@ucc.asn.au> | 2018-06-03 14:57:05 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2018-06-03 14:57:05 +0800 |
commit | bf8f8b4b4a9fe273451be59f68acafbe61968b83 (patch) | |
tree | 82993550cb3c88de0edbd55d79e4ea8e8cefffac /src/hir/type.cpp | |
parent | 39b3cf53798683e496804f8322da2254b10850f4 (diff) | |
parent | a7fb27789a2b34543851d207120e2c0001ee9c27 (diff) | |
download | mrust-bf8f8b4b4a9fe273451be59f68acafbe61968b83.tar.gz |
Merge branch 'master' of https://github.com/thepowersgang/mrustc
Diffstat (limited to 'src/hir/type.cpp')
-rw-r--r-- | src/hir/type.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp index 033e7bf5..6f826111 100644 --- a/src/hir/type.cpp +++ b/src/hir/type.cpp @@ -112,8 +112,8 @@ void ::HIR::TypeRef::fmt(::std::ostream& os) const } for(const auto& tr : e.m_markers) os << "+" << tr; - if( e.m_lifetime.name != "" ) - os << "+ '" << e.m_lifetime.name; + if( e.m_lifetime != LifetimeRef::new_static() ) + os << "+" << e.m_lifetime; os << ")"; ), (ErasedType, @@ -123,8 +123,8 @@ void ::HIR::TypeRef::fmt(::std::ostream& os) const os << "+"; os << tr; } - if( e.m_lifetime.name != "" ) - os << "+ '" << e.m_lifetime.name; + if( e.m_lifetime != LifetimeRef::new_static() ) + os << "+ '" << e.m_lifetime; os << "/*" << e.m_origin << "#" << e.m_index << "*/"; ), (Array, @@ -860,7 +860,7 @@ bool ::HIR::TypeRef::match_test_generics(const Span& sp, const ::HIR::TypeRef& x return ::HIR::TypeRef( Data::make_Tuple(mv$(types)) ); ), (Borrow, - return ::HIR::TypeRef( Data::make_Borrow({e.type, box$(e.inner->clone())}) ); + return ::HIR::TypeRef( Data::make_Borrow({e.lifetime, e.type, box$(e.inner->clone())}) ); ), (Pointer, return ::HIR::TypeRef( Data::make_Pointer({e.type, box$(e.inner->clone())}) ); |