aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/snapshots
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-02-25 07:27:47 +0000
committerVille Penttinen <[email protected]>2019-02-25 08:51:46 +0000
commit18b0bd9bffeeeaf664f4a21894d5bfff51e82b32 (patch)
treede8c51b51b8324d6566143e7b73997c4c61a3f70 /crates/ra_hir/src/ty/snapshots
parent7ffff9c74caae108db53366e3b90857b7c405c6c (diff)
Add const type inference
Diffstat (limited to 'crates/ra_hir/src/ty/snapshots')
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap14
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_const.snap14
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_static.snap16
3 files changed, 37 insertions, 7 deletions
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap
index 131d1fa16..51f3fd4c0 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap
@@ -1,14 +1,14 @@
1--- 1---
2created: "2019-02-21T21:51:46.497925200Z" 2created: "2019-02-25T08:36:33.885804400Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_hir/src/ty/tests.rs 4source: crates/ra_hir/src/ty/tests.rs
5expression: "&result" 5expression: "&result"
6--- 6---
7[227; 305) '{ ...:ID; }': () 7[227; 305) '{ ...:ID; }': ()
8[237; 238) 'x': [unknown] 8[237; 238) 'x': u32
9[241; 252) 'Struct::FOO': [unknown] 9[241; 252) 'Struct::FOO': u32
10[262; 263) 'y': [unknown] 10[262; 263) 'y': u32
11[266; 275) 'Enum::BAR': [unknown] 11[266; 275) 'Enum::BAR': u32
12[285; 286) 'z': [unknown] 12[285; 286) 'z': u32
13[289; 302) 'TraitTest::ID': [unknown] 13[289; 302) 'TraitTest::ID': u32
14 14
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_const.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_const.snap
new file mode 100644
index 000000000..a5eba3980
--- /dev/null
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_const.snap
@@ -0,0 +1,14 @@
1---
2created: "2019-02-25T07:26:34.115351100Z"
3creator: [email protected]
4source: crates/ra_hir/src/ty/tests.rs
5expression: "&result"
6---
7[95; 213) '{ ...NST; }': ()
8[138; 139) 'x': [unknown]
9[142; 153) 'LOCAL_CONST': [unknown]
10[163; 164) 'z': u32
11[167; 179) 'GLOBAL_CONST': u32
12[189; 191) 'id': u32
13[194; 210) 'Foo::A..._CONST': u32
14
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_static.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_static.snap
new file mode 100644
index 000000000..ffe9ca66d
--- /dev/null
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_static.snap
@@ -0,0 +1,16 @@
1---
2created: "2019-02-25T07:26:41.480764900Z"
3creator: [email protected]
4source: crates/ra_hir/src/ty/tests.rs
5expression: "&result"
6---
7[85; 280) '{ ...MUT; }': ()
8[173; 174) 'x': [unknown]
9[177; 189) 'LOCAL_STATIC': [unknown]
10[199; 200) 'y': [unknown]
11[203; 219) 'LOCAL_...IC_MUT': [unknown]
12[229; 230) 'z': [unknown]
13[233; 246) 'GLOBAL_STATIC': [unknown]
14[256; 257) 'w': [unknown]
15[260; 277) 'GLOBAL...IC_MUT': [unknown]
16