Skip to content

libsyntax: Forbid escapes in the inclusive range \x80-\xff in Unicode characters and strings.#18504

Closed
pcwalton wants to merge 1 commit into
rust-lang:masterfrom
pcwalton:small-escapes
Closed

libsyntax: Forbid escapes in the inclusive range \x80-\xff in Unicode characters and strings.#18504
pcwalton wants to merge 1 commit into
rust-lang:masterfrom
pcwalton:small-escapes

Conversation

@pcwalton

@pcwalton pcwalton commented Nov 1, 2014

Copy link
Copy Markdown
Contributor

Use \u0080-\u00ff instead. ASCII/byte literals are unaffected.

This PR introduces a new function, escape_default, into the ASCII
module. This was necessary for the pretty printer to continue to
function.

RFC #326.

Closes #18062.

[breaking-change]

r? @aturon

@rust-highfive

Copy link
Copy Markdown
Contributor

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@alexcrichton

Copy link
Copy Markdown
Member

Hm, it looks like a merge went wrong here and a large number of things were introduced?

@pcwalton

pcwalton commented Nov 1, 2014

Copy link
Copy Markdown
Contributor Author

@alexcrichton Actually, that was the result of regenerating the Unicode tables. They had to be regenerated in order to compile.

Comment thread src/libcollections/str.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was referring to deprecations like these, they shouldn't have been introduced, right?

@aturon

aturon commented Nov 2, 2014

Copy link
Copy Markdown
Contributor

LGTM modulo the re-inclusion of a bunch of removed, previously-deprecated stuff that @alexcrichton pointed out.

Unicode characters and strings.

Use `\u0080`-`\u00ff` instead. ASCII/byte literals are unaffected.

This PR introduces a new function, `escape_default`, into the ASCII
module. This was necessary for the pretty printer to continue to
function.

RFC rust-lang#326.

Closes rust-lang#18062.

[breaking-change]
bors added a commit that referenced this pull request Nov 5, 2014
Use `\u0080`-`\u00ff` instead. ASCII/byte literals are unaffected.

This PR introduces a new function, `escape_default`, into the ASCII
module. This was necessary for the pretty printer to continue to
function.

RFC #326.

Closes #18062.

[breaking-change]

r? @aturon
@bors bors closed this Nov 5, 2014
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.

Restrict "\xXX" to ASCII (0x00 -- 0x7F)

5 participants