diff --git a/crates/ide-diagnostics/src/handlers/remove_unnecessary_else.rs b/crates/ide-diagnostics/src/handlers/remove_unnecessary_else.rs
index 7bfd64596ed2f..9c63d79d91033 100644
--- a/crates/ide-diagnostics/src/handlers/remove_unnecessary_else.rs
+++ b/crates/ide-diagnostics/src/handlers/remove_unnecessary_else.rs
@@ -491,13 +491,12 @@ fn test2() {
 }
 "#,
         );
-        check_diagnostics_with_disabled(
+        check_diagnostics(
             r#"
-fn test3() {
+fn test3() -> u8 {
     foo(if a { return 1 } else { 0 })
 }
 "#,
-            std::iter::once("E0308".to_owned()),
         );
     }
 }