[ty] Change range of revealed-type diagnostic to be the range of the argument passed in, not the whole call (#17980)

This commit is contained in:
Alex Waygood 2025-05-09 14:15:39 +01:00 committed by GitHub
parent 642eac452d
commit 03a4d56624
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 175 additions and 173 deletions

View file

@ -4781,7 +4781,9 @@ impl<'db> TypeInferenceBuilder<'db> {
) {
let mut diag =
builder.into_diagnostic("Revealed type");
let span = self.context.span(call_expression);
let span = self
.context
.span(&call_expression.arguments.args[0]);
diag.annotate(Annotation::primary(span).message(
format_args!(
"`{}`",