Unnamed repository; edit this file 'description' to name the repository.
Add a "bug" test for adjustment hints to check for status quo
Maybe Waffle 2023-01-09
parent 12b7f9f · commit a9676cf
-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 47e854e4bd..9f6984b59e 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>
+}
+ "#,
+ )
+ }
}