-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add tracking of packed repr, use it to highlight unsafe refs #4743
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
Conversation
3afbf2d to
4dce98e
Compare
4dce98e to
a3e170c
Compare
07545b2 to
eb27040
Compare
7ce51b0 to
54763c1
Compare
54763c1 to
e5b3cd8
Compare
e5b3cd8 to
23f2496
Compare
23f2496 to
e0cb2f5
Compare
| } else { | ||
| None | ||
| } | ||
| })(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-invoking closures are neat, but is there perhaps a way to write this simpler, without deploying intricate language machinery?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up. Does the new version need comments or is it pretty clear?
f3997b6 to
a8433d4
Compare
bc47803 to
017c8b2
Compare
Taking a reference to a misaligned field on a packed struct is an unsafe operation. Highlight that behavior. Currently, the misaligned part isn't tracked, so this highlight is a bit too aggressive.
…r, remove debug println.
… missing support for autoref behavior
…g, auto ref function calls
…irst param for self information in syntax highlighting instead
…plify repr attr lookup
…ator, using functional methods rather than clunky inline closure
0718d7c to
72baf1a
Compare
|
bors r+ |
Taking a reference to a misaligned field on a packed struct is an
unsafe operation. Highlight that behavior. Currently, the misaligned
part isn't tracked, so this highlight is a bit too aggressive.
Fixes #4600