mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Merge commit '37f84c101b
' into sync-from-ra
This commit is contained in:
parent
6502421771
commit
4704881b64
311 changed files with 13700 additions and 9110 deletions
|
@ -1,6 +1,6 @@
|
|||
use hir::HirDisplay;
|
||||
|
||||
use crate::{Diagnostic, DiagnosticsContext};
|
||||
use crate::{Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
// Diagnostic: expected-function
|
||||
//
|
||||
|
@ -9,10 +9,11 @@ pub(crate) fn expected_function(
|
|||
ctx: &DiagnosticsContext<'_>,
|
||||
d: &hir::ExpectedFunction,
|
||||
) -> Diagnostic {
|
||||
Diagnostic::new(
|
||||
"expected-function",
|
||||
Diagnostic::new_with_syntax_node_ptr(
|
||||
ctx,
|
||||
DiagnosticCode::RustcHardError("E0618"),
|
||||
format!("expected function, found {}", d.found.display(ctx.sema.db)),
|
||||
ctx.sema.diagnostics_display_range(d.call.clone().map(|it| it.into())).range,
|
||||
d.call.clone().map(|it| it.into()),
|
||||
)
|
||||
.experimental()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue