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

Rustfmt post-1.0 roadmap #36

Open
nrc opened this issue Apr 4, 2018 · 2 comments
Open

Rustfmt post-1.0 roadmap #36

nrc opened this issue Apr 4, 2018 · 2 comments

Comments

@nrc
Copy link
Member

nrc commented Apr 4, 2018

Just collecting ideas at this point. Some time around the 1.0 launch we should start prioritising and move discussion to the rustfmt repo.

cc @topecongiro

@nrc
Copy link
Member Author

nrc commented Apr 4, 2018

Ideas:

  • performance
  • maintenance (bugs, new Rust features, etc.)
  • macros (custom formatting for macros, default formatting for more macros)
  • comments (maybe?)
  • better support for formatting parts of files

@topecongiro
Copy link

  • better support for formatting parts of files

Under the current implementation, passing file_lines is slow because it needs to parse the whole file and create an entire AST even though it only needs to format the specific lines. What's worse, it could be slower than formatting the whole file because it needs to check whether each line is within the given file lines parameter.

If we could be certain that the part of a file is a complete AST (e.g. formatting a group of imports), we could directly call format_snippet or format_code_block rather than full format_input.

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

No branches or pull requests

2 participants