Unnamed repository; edit this file 'description' to name the repository.
fix: use check_infer_with_mismatches in binop_lhs_never_place_diverges test
Albab-Hasan 2 months ago
parent b3feb5f · commit 2f12839
-rw-r--r--crates/hir-ty/src/tests/never_type.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/hir-ty/src/tests/never_type.rs b/crates/hir-ty/src/tests/never_type.rs
index 912b4a5ad5..4349c22e0c 100644
--- a/crates/hir-ty/src/tests/never_type.rs
+++ b/crates/hir-ty/src/tests/never_type.rs
@@ -820,7 +820,7 @@ fn foo() -> i32 {
#[test]
fn binop_lhs_never_place_diverges() {
- check_no_mismatches(
+ check_infer_with_mismatches(
r#"
//- minicore: sized, add
fn foo() -> i32 {
@@ -830,6 +830,18 @@ fn foo() -> i32 {
}
}
"#,
+ expect![[r#"
+ 16..97 '{ ... } }': i32
+ 22..95 'unsafe... }': i32
+ 43..44 'p': *const !
+ 57..58 '0': i32
+ 57..63 '0 as _': *const !
+ 77..79 '_x': {unknown}
+ 82..84 '*p': !
+ 82..88 '*p + 1': <! as Add<i32>>::Output
+ 83..84 'p': *const !
+ 87..88 '1': i32
+ "#]],
);
}