Implement operator<< for Suggestions

That way there’s no need to explicitely convert it to a string when
printing it
This commit is contained in:
regnat
2022-03-07 10:09:10 +01:00
parent fd45d85b41
commit 313bbc07a8
3 changed files with 21 additions and 8 deletions
+1 -1
View File
@@ -285,7 +285,7 @@ std::ostream & showErrorInfo(std::ostream & out, const ErrorInfo & einfo, bool s
auto suggestions = einfo.suggestions.trim();
if (! suggestions.suggestions.empty()){
oss << "Did you mean " <<
suggestions.trim().pretty_print() <<
suggestions.trim() <<
"?" << std::endl;
}