Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 4 pull requests #72918

Merged
merged 9 commits into from
Jun 2, 2020
Merged

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

poliorcetics and others added 9 commits June 1, 2020 16:19
This makes `UnvalidatedRawStr` and `ValidatedRawStr` unnecessary and removes 70 lines.
rust-lang#72827 changed it from `*.nix` to `Unix-like system`, but actually it should be `a Unix-like system`
…cleanup, r=petrochenkov

RawString error reporting cleanup

I simplified how errors with raw string are represented in the lexer and reportet in the parser, by using one enum instead of two structs with impls. This makes 70 code lines obsolete.

I also noticed some other things (2nd commit) and added a missing test for the `too many '#' symbols' error.

My original intent was to improve performance, but the only thing I found was to inline some functions in `cursor.rs`. It's effect is barely measurable, though.

There is one open question. Before, the compiler aborts when encountering the `too many '#' symbols` error. Now the lexer says in this case that there are 0 hashes, and then later the parser aborts on the error.
I'm worrying that the parser may be changed to recover and continue, and then later stages will see the wrong numer of hashes and act strange. (eg. the `format!` macro expansion).
Is that possibility important enough today to worry about it?
…_until-doc, r=Dylan-DPC

Add a warning about infinite reading in read_(until|line)

Fix for rust-lang#48788.

This PR adds a warning to [`BufRead::read_line`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_line) and [`BufRead::read_until`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_until) about the possibility of an attack using the behaviour of these functions.

I did not mention a possible fix (using [`Read::take`](https://doc.rust-lang.org/stable/std/io/trait.Read.html#method.take), should I ?
…jonas-schievink

Minor: off-by-one error in RELEASES.md
Update README.md

rust-lang#72827 changed it from `*.nix` to `Unix-like system`, but actually it should be `a Unix-like system`
@Dylan-DPC-zz
Copy link
Author

@bors r+ p=4 rollup=never

@bors
Copy link
Contributor

bors commented Jun 2, 2020

📌 Commit bed597a has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 2, 2020
@bors
Copy link
Contributor

bors commented Jun 2, 2020

⌛ Testing commit bed597a with merge fe10f1a...

@JohnTitor JohnTitor added the rollup A PR which is a rollup label Jun 2, 2020
@bors
Copy link
Contributor

bors commented Jun 2, 2020

☀️ Test successful - checks-azure
Approved by: Dylan-DPC
Pushing fe10f1a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 2, 2020
@bors bors merged commit fe10f1a into rust-lang:master Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants