internal: Mark unresolved field, unresolved method and expected function diagnostics experimental

This commit is contained in:
Lukas Wirth 2023-03-06 22:24:38 +01:00
parent a360fab9a3
commit 34a3187ee8
3 changed files with 3 additions and 0 deletions

View file

@ -14,6 +14,7 @@ pub(crate) fn expected_function(
format!("expected function, found {}", d.found.display(ctx.sema.db)), format!("expected function, found {}", d.found.display(ctx.sema.db)),
ctx.sema.diagnostics_display_range(d.call.clone().map(|it| it.into())).range, ctx.sema.diagnostics_display_range(d.call.clone().map(|it| it.into())).range,
) )
.experimental()
} }
#[cfg(test)] #[cfg(test)]

View file

@ -32,6 +32,7 @@ pub(crate) fn unresolved_field(
ctx.sema.diagnostics_display_range(d.expr.clone().map(|it| it.into())).range, ctx.sema.diagnostics_display_range(d.expr.clone().map(|it| it.into())).range,
) )
.with_fixes(fixes(ctx, d)) .with_fixes(fixes(ctx, d))
.experimental()
} }
fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::UnresolvedField) -> Option<Vec<Assist>> { fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::UnresolvedField) -> Option<Vec<Assist>> {

View file

@ -32,6 +32,7 @@ pub(crate) fn unresolved_method(
ctx.sema.diagnostics_display_range(d.expr.clone().map(|it| it.into())).range, ctx.sema.diagnostics_display_range(d.expr.clone().map(|it| it.into())).range,
) )
.with_fixes(fixes(ctx, d)) .with_fixes(fixes(ctx, d))
.experimental()
} }
fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::UnresolvedMethodCall) -> Option<Vec<Assist>> { fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::UnresolvedMethodCall) -> Option<Vec<Assist>> {