b5e6d6db41
Make it possible to correctly indent snippet_block snippets This adds a `indent_relative_to` arg to the `{snippet,expr}_block` functions. This makes it possible to keep the correct indentation of block like suggestions. In addition, this makes the `trim_multiline` function private and adds a `indent_of` function, to get the indentation of the first line of a span. The suggestion of `needless_continue` cannot be made auto applicable, since it would be also necessary to remove code following the linted expression. (Well, maybe it is possible, but I don't know how to do it. Expanding the suggestion span to the last expression, that should be removed didn't work) changelog: Improve suggestions, when blocks of code are involved |
||
---|---|---|
.. | ||
auxiliary | ||
cargo | ||
ui | ||
ui-toml | ||
compile-test.rs | ||
dogfood.rs | ||
fmt.rs | ||
integration.rs | ||
matches.rs | ||
missing-test-files.rs | ||
versioncheck.rs |