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

Correctly generate new struct field in file containing struct def #4996

Merged
merged 1 commit into from Jul 11, 2020

Conversation

TimoFreiberg
Copy link
Contributor

@TimoFreiberg TimoFreiberg commented Jun 22, 2020

WIP because the test doesn't pass.
Testing the fix by hand looked good, although quickfixes seem to not support setting the editor cursor yet, which i think we want for "generate missing defs from usage" fixes.

@TimoFreiberg TimoFreiberg changed the title Correctly generate new struct field in file containing struct def WIP: Correctly generate new struct field in file containing struct def Jun 22, 2020
(analysis, pos.file_id)
} else {
single_file(before)
};
let diagnostic = analysis.diagnostics(file_id).unwrap().pop().unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the test fails because there are no diagnostics, so I guess something is broken with the fixture handling.

@TimoFreiberg TimoFreiberg changed the title WIP: Correctly generate new struct field in file containing struct def Correctly generate new struct field in file containing struct def Jul 10, 2020
@TimoFreiberg TimoFreiberg force-pushed the struct-field-file-fix branch 3 times, most recently from 38fb2aa to 43079ba Compare July 10, 2020 17:16
@matklad
Copy link
Member

matklad commented Jul 11, 2020

bors r+

Thanks!

@bors
Copy link
Contributor

bors bot commented Jul 11, 2020

@bors bors bot merged commit 6c1546c into rust-lang:master Jul 11, 2020
@TimoFreiberg TimoFreiberg deleted the struct-field-file-fix branch July 11, 2020 10:55
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

2 participants