Skip to content

Commit f4618c8

Browse files
committed
Add a "bug" test for adjustment hints to check for status quo
1 parent 14fc9ae commit f4618c8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

crates/ide/src/inlay_hints/adjustment.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,22 @@ fn never() -> ! {
509509
510510
fn or_else() {
511511
let () = () else { return };
512+
}
513+
"#,
514+
)
515+
}
516+
517+
#[test]
518+
fn bug() {
519+
check_with_config(
520+
InlayHintsConfig { adjustment_hints: AdjustmentHints::Always, ..DISABLED_CONFIG },
521+
r#"
522+
fn main() {
523+
// These should be identical, but they are not...
524+
525+
let () = return;
526+
let (): () = return;
527+
//^^^^^^<never-to-any>
512528
}
513529
"#,
514530
)

0 commit comments

Comments
 (0)