Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/diagnostics.rs')
-rw-r--r--crates/hir/src/diagnostics.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index 9e4b929dd5..7e4853539d 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -120,6 +120,7 @@ diagnostics![AnyDiagnostic<'db> ->
MacroError,
MacroExpansionParseError,
MalformedDerive,
+ MethodCallIllegalSizedBound,
MismatchedArgCount,
MismatchedTupleStructPatArgCount,
MissingFields,
@@ -596,6 +597,11 @@ pub struct InvalidLhsOfAssignment {
}
#[derive(Debug)]
+pub struct MethodCallIllegalSizedBound {
+ pub call_expr: InFile<ExprOrPatPtr>,
+}
+
+#[derive(Debug)]
pub struct PatternArgInExternFn {
pub node: InFile<AstPtr<ast::Pat>>,
}
@@ -984,6 +990,9 @@ impl<'db> AnyDiagnostic<'db> {
let lhs = expr_syntax(lhs)?;
InvalidLhsOfAssignment { lhs }.into()
}
+ &InferenceDiagnostic::MethodCallIllegalSizedBound { call_expr } => {
+ MethodCallIllegalSizedBound { call_expr: expr_syntax(call_expr)? }.into()
+ }
&InferenceDiagnostic::TypeMustBeKnown { at_point, ref top_term } => {
let at_point = span_syntax(at_point)?;
let top_term = top_term.as_ref().map(|top_term| match top_term.as_ref().kind() {