Skip to content

Conversation

estebank
Copy link
Contributor

Fixing tests for #49989. Resolves #49746.

The `FatalError.raise()` might seem unmotivated (in most places in
the compiler, `err.emit()` suffices), but it's actually used to
maintain behavior (viz., stop lexing, don't emit potentially spurious
errors looking for the next token after the bad Unicodepoint in the
exponent): the previous revision's `self.err_span_` ultimately calls
`Handler::emit`, which aborts if the `Handler`'s continue_after_error
flag is set, which seems to typically be true during lexing (see
`phase_1_parse_input` and and how `CompileController::basic` has
`continue_parse_after_error: false` in librustc_driver).

Also, let's avoid apostrophes in error messages (the present author
would argue that users expect a reassuringly detached, formal,
above-it-all tone from a Serious tool like a compiler), and use an
RLS-friendly structured suggestion.

Resolves rust-lang#49746.
@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 26, 2018
@estebank
Copy link
Contributor Author

cc @zackmdavis

@rust-highfive

This comment has been minimized.

@estebank estebank force-pushed the and_the_case_of_the_confusable_float_exponent branch from c75fefa to 6ed8668 Compare May 26, 2018 07:45
@rust-highfive

This comment has been minimized.

@eddyb
Copy link
Member

eddyb commented May 26, 2018

@bors r+

@bors
Copy link
Collaborator

bors commented May 26, 2018

📌 Commit 6ed8668 has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 26, 2018
@eddyb
Copy link
Member

eddyb commented May 26, 2018

@bors r- Travis failed (r=me after fixing that)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 26, 2018
@estebank estebank force-pushed the and_the_case_of_the_confusable_float_exponent branch from 6ed8668 to 7dec8a4 Compare May 26, 2018 19:05
@zackmdavis
Copy link
Contributor

@estebank thanks!

@estebank
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Collaborator

bors commented May 26, 2018

📌 Commit 7dec8a4 has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 26, 2018
@estebank
Copy link
Contributor Author

@bors rollup

@bors
Copy link
Collaborator

bors commented May 27, 2018

⌛ Testing commit 7dec8a4 with merge 1a6bda6...

bors added a commit that referenced this pull request May 27, 2018
…exponent, r=eddyb

Check for confusable Unicode chars in float literal exponent

Fixing tests for #49989. Resolves #49746.
@bors
Copy link
Collaborator

bors commented May 27, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing 1a6bda6 to master...

@bors bors merged commit 7dec8a4 into rust-lang:master May 27, 2018
@estebank estebank deleted the and_the_case_of_the_confusable_float_exponent branch November 9, 2023 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants