rustc hangs when printing block with no trailing newline #11493
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
If rustc attempts to print an error message for a block that has no trailing newline, because it ends on the very last line of a file with no trailing newline, then rustc will hang forever attempting to print the block.
To test, the following code should print a lifetime error:
If the file has a trailing newline, it prints just fine. But without the trailing newline, it hangs forever after printing:
The text was updated successfully, but these errors were encountered: