summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2019-07-13 18:48:18 +0800
committerJohn Hodge <tpg@ucc.asn.au>2019-07-13 18:48:18 +0800
commitd85011eef30105556732ed7b0015c501414ab64c (patch)
tree518cb178027aaf3f3c0779ccc6e43bab96d1cb8e
parent382c1567fd533d9bede83eb619fae628f16da81d (diff)
downloadmrust-d85011eef30105556732ed7b0015c501414ab64c.tar.gz
Expand module_path - Unconditionally add `::` to simplify debugging empty crate names
-rw-r--r--src/expand/file_line.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/expand/file_line.cpp b/src/expand/file_line.cpp
index 9337bbf5..cfe859bd 100644
--- a/src/expand/file_line.cpp
+++ b/src/expand/file_line.cpp
@@ -64,8 +64,7 @@ class CExpanderModulePath:
::std::string path_str;
path_str += crate.m_crate_name;
for(const auto& comp : mod.path().nodes()) {
- if( !path_str.empty() )
- path_str += "::";
+ path_str += "::";
path_str += comp.name().c_str();
}
return box$( TTStreamO(sp, TokenTree( Token(TOK_STRING, mv$(path_str)) )) );