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

Updated Rust keywords + indentation defaults #595

Closed
wants to merge 1 commit into from

Conversation

ZoomRmc
Copy link
Contributor

@ZoomRmc ZoomRmc commented Jul 31, 2015

@ZoomRmc ZoomRmc changed the title Updated keywords + indentation defaults Updated Rust keywords + indentation defaults Jul 31, 2015
@b4n
Copy link
Member

b4n commented Aug 7, 2015

LGTM

@kugel-
Copy link
Member

kugel- commented Aug 18, 2015

lgtm

primary=alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use virtual while yield
secondary=bool char f32 f64 i16 i32 i64 i8 int str u16 u32 u64 u8 uint
primary=abstract alignof as become box break const continue crate do else enum extern false final fn for if impl in let loop macro match mod move mut offsetof override priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use virtual where while yield
secondary=bool char f32 f64 i8 i16 i32 i64 int isize str u8 u16 u32 u64 uint usize
Copy link
Member

Choose a reason for hiding this comment

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

#613 removes int and uint, does that sound correct to you?

Copy link

Choose a reason for hiding this comment

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

Indeed, uint and int have been renamed to isize/ usize as per rust RFC 0544.

Copy link
Member

Choose a reason for hiding this comment

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

Probably was unfriendly to people with olde code using olde versions of rust to just simply remove them, doesn't hurt to have both in the keyword list.

@b4n
Copy link
Member

b4n commented Aug 21, 2015

@ZoomRmc #613 is almost a superset of this, would you mind us using it instead, and altering the indentation in a separate commit?

@est31
Copy link

est31 commented Feb 17, 2016

Another thing syntax highlighters often mistake about rust is its support for nested block comments.

For example take this code:

/*
/*
inner
*/
interesting
*/

interesting here is commented out, because its still "inside" the outer comment boundary.

Same code rendered as C++:

/*
/*
inner
*/
interesting
*/

interesting here gets read like normal code. C++ parses, like C, from the first occurence of /* to the first occurence of */.

I wonder, can geany cope with this? I don't use geany, so I can't test. I just know that the text editor I use (kate) has that precise problem.

@elextr
Copy link
Member

elextr commented Feb 17, 2016

@est31 the syntax highlighting is done by the editor we use from the Scintilla project, you should report there.

@b4n
Copy link
Member

b4n commented Feb 17, 2016

Another thing syntax highlighters often mistake about rust is its support for nested block comments.

[…]

I wonder, can geany cope with this? I don't use geany, so I can't test. I just know that the text editor I use (kate) has that precise problem.

It's supported just fine :) (thanks to Scintilla support)

rust nested comments

@b4n b4n self-assigned this Feb 17, 2016
@b4n b4n added this to the 1.27 milestone Feb 17, 2016
@b4n b4n closed this in 4316872 Feb 17, 2016
@ZoomRmc ZoomRmc deleted the patch-1 branch November 8, 2021 11:40
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.

None yet

5 participants