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

Syntax highlighting highlights 'us' and 'is' suffixes (not 'usize' and 'isize') #662

Closed
Grazfather opened this issue Nov 13, 2015 · 7 comments

Comments

@Grazfather
Copy link

I noticed while playing around here: http://rustbyexample.com/cast/literals.html

Numeric literals can be type annotated by adding the type as a suffix, with the exception of usize that uses the usize suffix and isize that uses the isize suffix.

Notice the weird wording? Well it had me try out both. 5isize compiles, but 5is has proper syntax highlighting.

@Grazfather Grazfather changed the title Syntax highlighting highlights 'us' and 'is' suffixes (not 'usize Syntax highlighting highlights 'us' and 'is' suffixes (not 'usize' and 'isize') Nov 13, 2015
@mdinger
Copy link
Contributor

mdinger commented Nov 13, 2015

I'm pretty sure that used to work but I don't know when that suffix got backed out. Either way, it's not an issue with rustbyexample, it's a problem with [ace](https://github.com/ajaxorg/ace problem). I think it could be fixed by changing us and is to usize and isize here but I haven't tried it so it probably needs verification.

When did is and us get removed? I guess I don't remember it happening.

@Grazfather
Copy link
Author

I'll report it on ace, then.

I am new to rust, so it was all new to me. Looks like it was done this year

@mdinger
Copy link
Contributor

mdinger commented Nov 14, 2015

He merged a fix into ace so rbe will pick it up once it makes it to ace-builds

@Grazfather
Copy link
Author

👍

@Grazfather
Copy link
Author

Should this also be reworded?

Numeric literals can be type annotated by adding the type as a suffix, with the exception of usize that uses the usize suffix and isize that uses the isize suffix.

(they are no longer exceptions)

@steveklabnik
Copy link
Member

yup

@strega-nil
Copy link

Triage: This has been fixed.

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

No branches or pull requests

4 participants