Skip to content

Commit

Permalink
Rollup merge of rust-lang#126723 - estebank:dot-dot-dot, r=Nadrieril
Browse files Browse the repository at this point in the history
Fix `...` in multline code-skips in suggestions

When we have long code skips, we write `...` in the line number gutter.

For suggestions, we were "centering" the `...` with the line, but that was inconsistent with what we do in every other case *and* off-center.
  • Loading branch information
GuillaumeGomez authored Jun 22, 2024
2 parents f6661f5 + 3baafd2 commit 58fc27f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/ui/bind_instead_of_map_multipart.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ LL | }
LL | match s.len() {
LL ~ 10 => 2,
LL | 20 => {
...
...
LL | if foo() {
LL ~ return 20;
LL | }
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/needless_collect_indirect.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ help: check if the original Iterator contains an element instead of collecting t
|
LL ~
LL |
...
...
LL | // Do lint
LL ~ vec.iter().map(|k| k * k).any(|x| x == n);
|
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/needless_late_init.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ help: move the declaration `x` here
|
LL ~
LL | // types that should be considered insignificant
...
...
LL | let y = Box::new(4);
LL ~ let x = SignificantDrop;
|
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/needless_return.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ help: remove `return`
|
LL ~ 10
LL | },
...
...
LL | },
LL ~ }
|
Expand Down

0 comments on commit 58fc27f

Please sign in to comment.