Skip to content

Validate byte literals and byte strings #226

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

Merged
merged 3 commits into from
Nov 12, 2018
Merged

Validate byte literals and byte strings #226

merged 3 commits into from
Nov 12, 2018

Conversation

aochagavia
Copy link
Contributor

No description provided.

@aochagavia
Copy link
Contributor Author

aochagavia commented Nov 11, 2018

There is something weird going on with ranges in the presence of non-ascii chars. You can try for yourself using the following literal: b"€ ". This should trigger an error, because only ascii chars are allowed in a byte literal. However, the error highlighted by visual studio is bigger than only one character. Could this be related to #202?

use crate::string_lexing::{
CharComponent,
CharComponentKind::*,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this the indentation choice of cargo format?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is... Looks like a bug. I guess it will just "solve itself" when we update to a more recent version of rustfmt.

@kjeremy
Copy link
Contributor

kjeremy commented Nov 12, 2018

LGTM but I think we should see what the deal is with #226 (comment) before merging in case it's not #202.

@aochagavia
Copy link
Contributor Author

I am now certain that the wrong highlighting is caused by #202 so I am going ahead and bors r+ this

@aochagavia
Copy link
Contributor Author

bors r+

bors bot added a commit that referenced this pull request Nov 12, 2018
226: Validate byte literals and byte strings r=aochagavia a=aochagavia



Co-authored-by: Adolfo Ochagavía <[email protected]>
@kjeremy
Copy link
Contributor

kjeremy commented Nov 12, 2018 via email

@bors
Copy link
Contributor

bors bot commented Nov 12, 2018

Build succeeded

@bors bors bot merged commit c96bfe7 into rust-lang:master Nov 12, 2018
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.

2 participants