Fix offset location for 'SingleConstructorExpect' warnings.

This commit is contained in:
KtorZ 2023-02-17 16:43:07 +01:00
parent 92021e00b4
commit 76b2396830
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 1 additions and 1 deletions

View File

@ -981,7 +981,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
.push(Warning::SingleConstructorExpect { .push(Warning::SingleConstructorExpect {
location: Span { location: Span {
start: location.start, start: location.start,
end: kind.location_offset(), end: location.start + kind.location_offset(),
}, },
pattern_location: dbg!(untyped_pattern.location()), pattern_location: dbg!(untyped_pattern.location()),
value_location: dbg!(untyped_value.location()), value_location: dbg!(untyped_value.location()),