Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/patterns.rs')
-rw-r--r--crates/hir-ty/src/tests/patterns.rs52
1 files changed, 34 insertions, 18 deletions
diff --git a/crates/hir-ty/src/tests/patterns.rs b/crates/hir-ty/src/tests/patterns.rs
index 5e040a60e2..1c1f7055ef 100644
--- a/crates/hir-ty/src/tests/patterns.rs
+++ b/crates/hir-ty/src/tests/patterns.rs
@@ -111,8 +111,10 @@ fn infer_literal_pattern() {
if let "foo" = any() {}
if let 1 = any() {}
if let 1u32 = any() {}
+ if let 1f16 = any() {}
if let 1f32 = any() {}
if let 1.0 = any() {}
+ if let 1f128 = any() {}
if let true = any() {}
}
"#,
@@ -121,7 +123,7 @@ fn infer_literal_pattern() {
19..26 'loop {}': !
24..26 '{}': ()
37..38 'x': &'? i32
- 46..208 '{ ...) {} }': ()
+ 46..263 '{ ...) {} }': ()
52..75 'if let...y() {}': ()
55..72 'let "f... any()': bool
59..64 '"foo"': &'static str
@@ -145,25 +147,39 @@ fn infer_literal_pattern() {
124..126 '{}': ()
131..153 'if let...y() {}': ()
134..150 'let 1f... any()': bool
- 138..142 '1f32': f32
- 138..142 '1f32': f32
- 145..148 'any': fn any<f32>() -> f32
- 145..150 'any()': f32
+ 138..142 '1f16': f16
+ 138..142 '1f16': f16
+ 145..148 'any': fn any<f16>() -> f16
+ 145..150 'any()': f16
151..153 '{}': ()
- 158..179 'if let...y() {}': ()
- 161..176 'let 1.0 = any()': bool
- 165..168 '1.0': f64
- 165..168 '1.0': f64
- 171..174 'any': fn any<f64>() -> f64
- 171..176 'any()': f64
- 177..179 '{}': ()
- 184..206 'if let...y() {}': ()
- 187..203 'let tr... any()': bool
- 191..195 'true': bool
- 191..195 'true': bool
- 198..201 'any': fn any<bool>() -> bool
- 198..203 'any()': bool
+ 158..180 'if let...y() {}': ()
+ 161..177 'let 1f... any()': bool
+ 165..169 '1f32': f32
+ 165..169 '1f32': f32
+ 172..175 'any': fn any<f32>() -> f32
+ 172..177 'any()': f32
+ 178..180 '{}': ()
+ 185..206 'if let...y() {}': ()
+ 188..203 'let 1.0 = any()': bool
+ 192..195 '1.0': f64
+ 192..195 '1.0': f64
+ 198..201 'any': fn any<f64>() -> f64
+ 198..203 'any()': f64
204..206 '{}': ()
+ 211..234 'if let...y() {}': ()
+ 214..231 'let 1f... any()': bool
+ 218..223 '1f128': f128
+ 218..223 '1f128': f128
+ 226..229 'any': fn any<f128>() -> f128
+ 226..231 'any()': f128
+ 232..234 '{}': ()
+ 239..261 'if let...y() {}': ()
+ 242..258 'let tr... any()': bool
+ 246..250 'true': bool
+ 246..250 'true': bool
+ 253..256 'any': fn any<bool>() -> bool
+ 253..258 'any()': bool
+ 259..261 '{}': ()
"#]],
);
}