Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/tests/simple.rs')
-rw-r--r--crates/hir_ty/src/tests/simple.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/crates/hir_ty/src/tests/simple.rs b/crates/hir_ty/src/tests/simple.rs
index 675f9038f0..df7b3df3d5 100644
--- a/crates/hir_ty/src/tests/simple.rs
+++ b/crates/hir_ty/src/tests/simple.rs
@@ -996,9 +996,9 @@ fn main(foo: Foo) {
50..106 'if tru... }': ()
53..57 'true': bool
58..66 '{ }': ()
- 72..106 'if fal... }': i32
+ 72..106 'if fal... }': ()
75..80 'false': bool
- 81..106 '{ ... }': i32
+ 81..106 '{ ... }': ()
91..94 'foo': Foo
91..100 'foo.field': i32
"#]],
@@ -1094,10 +1094,10 @@ fn infer_inherent_method() {
expect![[r#"
31..35 'self': A
37..38 'x': u32
- 52..54 '{}': ()
+ 52..54 '{}': i32
106..110 'self': &A
112..113 'x': u64
- 127..129 '{}': ()
+ 127..129 '{}': i64
147..148 'a': A
153..201 '{ ...(1); }': ()
159..160 'a': A
@@ -1129,7 +1129,7 @@ fn infer_inherent_method_str() {
"#,
expect![[r#"
39..43 'self': &str
- 52..54 '{}': ()
+ 52..54 '{}': i32
68..88 '{ ...o(); }': ()
74..79 '"foo"': &str
74..85 '"foo".foo()': i32
@@ -1419,7 +1419,7 @@ fn infer_impl_generics_basic() {
206..210 'self': A<X, Y>
206..212 'self.y': Y
214..215 't': T
- 244..341 '{ ...(1); }': ()
+ 244..341 '{ ...(1); }': i128
254..255 'a': A<u64, i64>
258..280 'A { x:...1i64 }': A<u64, i64>
265..269 '1u64': u64
@@ -1456,7 +1456,7 @@ fn infer_impl_generics_with_autoderef() {
"#,
expect![[r#"
77..81 'self': &Option<T>
- 97..99 '{}': ()
+ 97..99 '{}': Option<&T>
110..111 'o': Option<u32>
126..164 '{ ...f(); }': ()
132..145 '(&o).as_ref()': Option<&u32>
@@ -1852,7 +1852,7 @@ fn closure_return() {
}
"#,
expect![[r#"
- 16..58 '{ ...; }; }': ()
+ 16..58 '{ ...; }; }': u32
26..27 'x': || -> usize
30..55 '|| -> ...n 1; }': || -> usize
42..55 '{ return 1; }': usize
@@ -1871,7 +1871,7 @@ fn closure_return_unit() {
}
"#,
expect![[r#"
- 16..47 '{ ...; }; }': ()
+ 16..47 '{ ...; }; }': u32
26..27 'x': || -> ()
30..44 '|| { return; }': || -> ()
33..44 '{ return; }': ()
@@ -1889,7 +1889,7 @@ fn closure_return_inferred() {
}
"#,
expect![[r#"
- 16..46 '{ ..." }; }': ()
+ 16..46 '{ ..." }; }': u32
26..27 'x': || -> &str
30..43 '|| { "test" }': || -> &str
33..43 '{ "test" }': &str
@@ -2628,11 +2628,11 @@ fn main() {
expect![[r#"
104..108 'self': &Box<T>
188..192 'self': &Box<Foo<T>>
- 218..220 '{}': ()
+ 218..220 '{}': &T
242..246 'self': &Box<Foo<T>>
- 275..277 '{}': ()
+ 275..277 '{}': &Foo<T>
297..301 'self': Box<Foo<T>>
- 322..324 '{}': ()
+ 322..324 '{}': Foo<T>
338..559 '{ ...r(); }': ()
348..353 'boxed': Box<Foo<i32>>
356..359 'Box': Box<Foo<i32>>(Foo<i32>) -> Box<Foo<i32>>