diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-07-13 18:48:18 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-07-13 18:48:18 +0800 |
commit | d85011eef30105556732ed7b0015c501414ab64c (patch) | |
tree | 518cb178027aaf3f3c0779ccc6e43bab96d1cb8e /src/expand/file_line.cpp | |
parent | 382c1567fd533d9bede83eb619fae628f16da81d (diff) | |
download | mrust-d85011eef30105556732ed7b0015c501414ab64c.tar.gz |
Expand module_path - Unconditionally add `::` to simplify debugging empty crate names
Diffstat (limited to 'src/expand/file_line.cpp')
-rw-r--r-- | src/expand/file_line.cpp | 3 |
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)) )) ); |