Crate rustfmt_nightly

source Β·

Modules§

Macros§

Structs§

Enums§

Traits§

  • Maps client-supplied options to Rustfmt’s internals, mostly overriding values in a config with values from the command line.

Functions§

  • create_emitter πŸ”’
  • Format the given code block. Mainly targeted for code block in comment. The code block may be incomplete (i.e., parser may be unable to parse it). To avoid panic in parser, we wrap the code block with a dummy function. The returned code block does not end with newline.
  • format_snippet πŸ”’
    Format the given snippet. The snippet is expected to be complete code. When we cannot parse the given snippet, this function returns None.
  • Loads a config by checking the client-supplied options and if appropriate, the file system (including searching the file system for overrides).