-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Complete derive helper attributes #18604
Conversation
let derive_helpers = annotated_item_kind | ||
.filter(|kind| { | ||
matches!( | ||
kind, | ||
SyntaxKind::STRUCT | ||
| SyntaxKind::ENUM | ||
| SyntaxKind::UNION | ||
| SyntaxKind::VARIANT | ||
| SyntaxKind::TUPLE_FIELD | ||
| SyntaxKind::RECORD_FIELD | ||
) | ||
}) |
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.
These could be used within the type specifications within ADTs as well, as in struct T { field: fn(#[helper] ()) }
if I am not mistaken, though this is good enough
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.
I just checked and that's not true.
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.
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.
Ah I thought you mean the opposite - that the attribute is not a helper but completed as such.
Empty attributes have a broken parse tree, so thats likely why
#18608 will fix that |
Only their names, anything can go inside.
091a454
to
890d155
Compare
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.
Thanks!
Only their names, anything can go inside.
Closes #18588.
This only completes when you type the first letter, I don't know why...