diff options
| author | bors <bors@rust-lang.org> | 2020-02-06 21:41:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-06 21:41:50 +0000 |
| commit | b5e6d6db417a88f67e94b63463940c21bc37120b (patch) | |
| tree | 87ebcb0f8d59c8a2c75ccf817ca01699de05fd52 /src/test/incremental/thinlto | |
| parent | ee842df61df91f3ed3e33a23f8393c47d384ef40 (diff) | |
| parent | e23881e1310f7fe02aeeecf3510a80cbac5aa808 (diff) | |
| download | rust-b5e6d6db417a88f67e94b63463940c21bc37120b.tar.gz rust-b5e6d6db417a88f67e94b63463940c21bc37120b.zip | |
Auto merge of #5134 - flip1995:snippet_block, r=phansch
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
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
