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

Skip child modules when running RustFmtRange #478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drdavella
Copy link

The RustFmtRange command should not attempt to reformat any child modules of the module currently being formatted.

Without this change, I get the following error when attempting to format a range:

rust.vim: was not able to parse rustfmt messages. Here is the raw output:

Error writing files: failed to resolve mod `foo`: /private/var/folders/lx/810r91ls7nz_mf24vhv_94w40000gp/T/vWfCEK6/dy
foo.rs does not exist
Error detected while processing function rustfmt#FormatRange[4]..<SNR>92_RunRustfmt:
line  104:
E776: No location list

While --skip-children is unstable, the --file-lines option itself is also unstable, so this seems like it shouldn't be an issue.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @chris-morgan (or someone else) soon.

Please see the contribution instructions for more information.

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.

3 participants