diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hir/item_path.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hir/item_path.hpp b/src/hir/item_path.hpp index 290bf23b..091a45c9 100644 --- a/src/hir/item_path.hpp +++ b/src/hir/item_path.hpp @@ -20,7 +20,9 @@ public: const char* crate_name = nullptr; const ::HIR::Path* wrapped = nullptr; + ItemPath(const char* crate): crate_name(crate) {} ItemPath(const ::std::string& crate): crate_name(crate.c_str()) {} + ItemPath(const RcString& crate): crate_name(crate.c_str()) {} ItemPath(const ItemPath& p, const char* n): parent(&p), name(n) @@ -141,7 +143,7 @@ public: os << "<* as " << *x.trait << ">"; } else if( x.crate_name ) { - os << "\"" << x.crate_name << "\""; + os << "::\"" << x.crate_name << "\""; } return os; } |