about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-06-06 18:04:42 +0400
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-06-16 17:08:26 +0400
commit87fded1eddf834f2decbfd05e6fda35cb1ee4747 (patch)
tree8ecf8a1506d97dbebb4497d7842db11aa394a31a /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent260c5fd58778f14c4f4d19e1b91784a4e0a675e3 (diff)
downloadrust-87fded1eddf834f2decbfd05e6fda35cb1ee4747.tar.gz
rust-87fded1eddf834f2decbfd05e6fda35cb1ee4747.zip
Improve suggestions when its parts are far from each other
Previously we only show at most 6 lines of suggestions and, if the
suggestions are more than 6 lines apart, we've just showed ... at the
end. This is probably fine, but quite confusing in my opinion.

This commit is an attempt to show ... in places where there is nothing
to suggest instead, for example:

Before:
```text
help: consider enclosing expression in a block
  |
3 ~     'l: { match () { () => break 'l,
4 |
5 |
6 |
7 |
8 |
...
```

After:
```text
help: consider enclosing expression in a block
  |
3 ~     'l: { match () { () => break 'l,
4 |
...
31|
32~ } };
  |
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions