summaryrefslogtreecommitdiff
path: root/src/include/ident.hpp
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/include/ident.hpp
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/include/ident.hpp')
-rw-r--r--src/include/ident.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/include/ident.hpp b/src/include/ident.hpp
index ec42c582..e8cc4e12 100644
--- a/src/include/ident.hpp
+++ b/src/include/ident.hpp
@@ -9,13 +9,13 @@
#include <vector>
#include <string>
#include <memory>
+#include <rc_string.hpp>
struct Ident
{
struct ModPath
{
- //::std::vector<RcString> ents;
- ::std::vector<::std::string> ents;
+ ::std::vector<RcString> ents;
};
class Hygiene
{
@@ -77,17 +77,17 @@ struct Ident
};
Hygiene hygiene;
- ::std::string name;
+ RcString name;
Ident(const char* name):
hygiene(),
name(name)
{ }
- Ident(::std::string name):
+ Ident(RcString name):
hygiene(),
name(::std::move(name))
{ }
- Ident(Hygiene hygiene, ::std::string name):
+ Ident(Hygiene hygiene, RcString name):
hygiene(::std::move(hygiene)), name(::std::move(name))
{ }
@@ -96,7 +96,7 @@ struct Ident
Ident& operator=(Ident&& x) = default;
Ident& operator=(const Ident& x) = default;
- ::std::string into_string() {
+ RcString into_string() {
return ::std::move(name);
}