Skip to content

Commit 630628f

Browse files
authored
Merge pull request #20022 from ChayimFriedman2/type-mismatch-exp
fix: Never make type mismatch diagnostic stable, even when there is a fix
2 parents 2b0c726 + b46593e commit 630628f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

crates/ide-diagnostics/src/handlers/type_mismatch.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub(crate) fn type_mismatch(ctx: &DiagnosticsContext<'_>, d: &hir::TypeMismatch<
3939
cov_mark::hit!(type_mismatch_range_adjustment);
4040
Some(salient_token_range)
4141
});
42-
let mut diag = Diagnostic::new(
42+
Diagnostic::new(
4343
DiagnosticCode::RustcHardError("E0308"),
4444
format!(
4545
"expected {}, found {}",
@@ -52,11 +52,7 @@ pub(crate) fn type_mismatch(ctx: &DiagnosticsContext<'_>, d: &hir::TypeMismatch<
5252
),
5353
display_range,
5454
)
55-
.with_fixes(fixes(ctx, d));
56-
if diag.fixes.is_some() {
57-
diag.experimental = false;
58-
}
59-
diag
55+
.with_fixes(fixes(ctx, d))
6056
}
6157

6258
fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::TypeMismatch<'_>) -> Option<Vec<Assist>> {

0 commit comments

Comments
 (0)