about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/lib.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-12-16 12:19:43 +0100
committerRalf Jung <post@ralfj.de>2022-12-16 12:19:43 +0100
commit3d67703e75912a0f58b43feae8ee8b5b20504dfe (patch)
treec05fb48510935410d6bea3011c5442c26bbec2ce /compiler/rustc_errors/src/lib.rs
parent33e5b953de13307a4b4206d85b74ea55e81d38a1 (diff)
parent4251289f27949cec69d8aa39d3891a4977fbc856 (diff)
downloadrust-3d67703e75912a0f58b43feae8ee8b5b20504dfe.tar.gz
rust-3d67703e75912a0f58b43feae8ee8b5b20504dfe.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
-rw-r--r--compiler/rustc_errors/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index eb0506c459a..518b5ec10f8 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -324,7 +324,7 @@ impl CodeSuggestion {
                         // Account for the difference between the width of the current code and the
                         // snippet being suggested, so that the *later* suggestions are correctly
                         // aligned on the screen.
-                        acc += len as isize - (cur_hi.col.0 - cur_lo.col.0) as isize;
+                        acc += len - (cur_hi.col.0 - cur_lo.col.0) as isize;
                     }
                     prev_hi = cur_hi;
                     prev_line = sf.get_line(prev_hi.line - 1);