about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crates/ide/src/inlay_hints/adjustment.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/ide/src/inlay_hints/adjustment.rs b/crates/ide/src/inlay_hints/adjustment.rs
index 47e854e4bd7..9f6984b59e9 100644
--- a/crates/ide/src/inlay_hints/adjustment.rs
+++ b/crates/ide/src/inlay_hints/adjustment.rs
@@ -609,4 +609,20 @@ fn a() {
             "#,
         );
     }
+
+    #[test]
+    fn bug() {
+        check_with_config(
+            InlayHintsConfig { adjustment_hints: AdjustmentHints::Always, ..DISABLED_CONFIG },
+            r#"
+fn main() {
+    // These should be identical, but they are not...
+
+    let () = return;
+    let (): () = return;
+               //^^^^^^<never-to-any>
+}
+            "#,
+        )
+    }
 }