Skip to content

Conversation

@waywardmonkeys
Copy link
Contributor

Single characters that are escaped weren't being searched / replaced
correctly in the hint string, so it was saying to replace, say,
"\n" with "\n" rather than '\n'.

Single characters that are escaped weren't being searched / replaced
correctly in the hint string, so it was saying to replace, say,
`"\n"` with `"\n"` rather than `'\n'`.
error: single-character string constant used as pattern
--> $DIR/single_char_pattern.rs:39:13
|
39 | x.split("/n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh why is this a forward slash here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output was correct but the test required this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it, this is required due to compiletest normalization.
https://github.com/rust-lang/rust/blob/master/src/test/COMPILER_TESTS.md#normalization
It looks like it does that due to path differences on Windows. Yes, it's weird.

@oli-obk oli-obk merged commit 598acba into rust-lang:master Mar 5, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Mar 5, 2018

Thanks! Amazing that this didn't show up as an issue before. I would've thought splitting by escaped chars would be more common.

@waywardmonkeys waywardmonkeys deleted the single-char-pattern branch May 11, 2018 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants