Merge pull request #18671 from p-hofer/master

Fix typo in error message for invalid casting
This commit is contained in:
Lukas Wirth 2024-12-12 14:58:26 +00:00 committed by GitHub
commit 0ae381327b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,7 +59,7 @@ pub(crate) fn invalid_cast(ctx: &DiagnosticsContext<'_>, d: &hir::InvalidCast) -
DiagnosticCode::RustcHardError("E0606"),
format_ty!(
ctx,
"casting `{}` as `{}` is invalid: needs defererence or removal of unneeded borrow",
"casting `{}` as `{}` is invalid: needs dereference or removal of unneeded borrow",
d.expr_ty,
d.cast_ty
),