about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-04-01 12:54:02 +0000
committerbors <bors@rust-lang.org>2018-04-01 12:54:02 +0000
commitd2235f20b5295394450f4962fb5f93254e63640c (patch)
tree9338da2514f1211a3994516c70598189ab6ba28d /src/liballoc_system
parentcb1f89864e73692d4cad83270d6b5e31047f96cf (diff)
parent19eedf98ffa8df52f7be7c003957ef11521551f4 (diff)
downloadrust-d2235f20b5295394450f4962fb5f93254e63640c.tar.gz
rust-d2235f20b5295394450f4962fb5f93254e63640c.zip
Auto merge of #49478 - Phlosioneer:fix-windows-file-not-found, r=petrochenkov
Fix escaped backslash in windows file not found message

When a module is declared, but no matching file exists, rustc gives
an error like `help: name the file either foo.rs or foo/mod.rs inside
the directory "src/bar"`. However, at on windows, the backslash was
double-escaped when naming the directory.

It did this because the string was printed in debug mode (`"{:?}"`) to
surround it with quotes. However, it should just be printed like any
other directory in an error message and surrounded by escaped quotes,
rather than relying on the debug print to add quotes (`"\"{}\""`).

I also checked the test suite to see if this output is being correctly tested. It's not - it only tests up to the word "directory". Presumably this is so that the test is not dependent on its exact position in the source tree. I don't know a better way to test this, unless the test suite supports regex?
Diffstat (limited to 'src/liballoc_system')
0 files changed, 0 insertions, 0 deletions