Closed
Description
The bug is in the help section of the "missing lifetime specifier" error (E0106).
When the method head is formatted over multiple lines, then green highlighting will be misaligned.
I tried this code:
fn short(foo_bar: &Vec<&i32>) -> &i32 {
&12
}
fn long(
foo_bar: &Vec<&i32>,
something_very_long_so_that_the_line_will_wrap_around__________: i32,
) -> &i32 {
&12
}
I expected to see this happen:
For the function short
it looks like this, which is fine
Instead, this happened:
But for the function long
the highlight is misaligned
Meta
rustc --version --verbose
:
rustc 1.69.0-nightly (d962ea578 2023-02-26)
binary: rustc
commit-hash: d962ea57899d64dc8a57040142c6b498a57c8064
commit-date: 2023-02-26
host: x86_64-pc-windows-msvc
release: 1.69.0-nightly
LLVM version: 15.0.7
also on stable:
rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-pc-windows-msvc
release: 1.67.0
LLVM version: 15.0.6
Backtrace
<backtrace>