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

Reserve the alignof, offsetof, and sizeof keywords #9389

Merged
merged 1 commit into from
Sep 22, 2013

Conversation

poiru
Copy link
Contributor

@poiru poiru commented Sep 21, 2013

Closes #9333.

@brson
Copy link
Contributor

brson commented Sep 21, 2013

From comments in that issue it sounds like we might as well do alignof and offsetof as well, just to be safe. Do you want to add those?

@poiru
Copy link
Contributor Author

poiru commented Sep 22, 2013

@brson: Done.

@@ -34,7 +34,7 @@ syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:spac
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained

" Reserved (but not yet used) keywords {{{2
syn keyword rustKeyword be yield typeof
syn keyword rustKeyword alignof be offsetof pure sizeof typeof yield
Copy link
Member

Choose a reason for hiding this comment

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

it seems that pure leaked in here?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's still a reserved keyword, even though we don't use it at the moment.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see.

bors added a commit that referenced this pull request Sep 22, 2013
@bors bors closed this Sep 22, 2013
@bors bors merged commit 2ab278f into rust-lang:master Sep 22, 2013
@poiru poiru deleted the issue-9333 branch January 30, 2014 17:01
Jarcho pushed a commit to Jarcho/rust that referenced this pull request Aug 29, 2022
Don't lint literal `None` from expansion

This addresses rust-lang/rust-clippy#9288 (comment): If the literal `None` is from expansion, we never lint. This is correct because e.g. replacing the call to `option_env!` with whatever that macro expanded to at the time of linting is certainly wrong.

changelog: Don't lint [`partialeq_to_none`] for macro-expansions
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.

Reserve sizeof keyword
5 participants