-
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
Add assist for filling fields by replacing ellipsis in record syntax #16651
Conversation
49c3141
to
6f4354f
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.
A test case for a struct or enum variant that is generated from a macro would be good (to check whether it works there, or whether it is correctly inapplicable)
I have never worked on macros (i.e the one writing macros not using them), so if you don't mind, can you point out a snippet somewhere and see how tests can be done? Edit: I just researched for some time wrote this, do you meant something like this? macro_rules! position {
($t: ty) => {
struct Pos {x: $t, y: $t}
};
}
position!(usize);
fn macro(pos: Pos) {
let Pos { .. } = pos;
} |
Yes, that is exactly a test case I had in mind |
I added those tests along with a new check and corresponding test. |
Thanks! |
☀️ Test successful - checks-actions |
I'm not sure if the tests cover the most cases, I'll add more if suggested.