From d85011eef30105556732ed7b0015c501414ab64c Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 13 Jul 2019 18:48:18 +0800 Subject: Expand module_path - Unconditionally add `::` to simplify debugging empty crate names --- src/expand/file_line.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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)) )) ); -- cgit v1.2.3