aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/tests
diff options
context:
space:
mode:
authorMarcus Klaas de Vries <[email protected]>2019-01-10 17:08:54 +0000
committerMarcus Klaas de Vries <[email protected]>2019-01-14 12:54:31 +0000
commit1574715be5d3fc7e07160708810dcbc9c1b01733 (patch)
treec482c99282393d75606c4487d316103b14208561 /crates/ra_hir/src/ty/tests
parent5f5dc20d85dead5fbd51d163451f796255c9faea (diff)
Use type variables to determine exact type for ambiguous numeric literals
Diffstat (limited to 'crates/ra_hir/src/ty/tests')
-rw-r--r--crates/ra_hir/src/ty/tests/data/basics.txt2
-rw-r--r--crates/ra_hir/src/ty/tests/data/literals.txt9
-rw-r--r--crates/ra_hir/src/ty/tests/data/struct.txt4
3 files changed, 8 insertions, 7 deletions
diff --git a/crates/ra_hir/src/ty/tests/data/basics.txt b/crates/ra_hir/src/ty/tests/data/basics.txt
index 4a3b69b7e..e65fe07aa 100644
--- a/crates/ra_hir/src/ty/tests/data/basics.txt
+++ b/crates/ra_hir/src/ty/tests/data/basics.txt
@@ -10,4 +10,4 @@
10[76; 82) '1usize': usize 10[76; 82) '1usize': usize
11[88; 94) '1isize': isize 11[88; 94) '1isize': isize
12[100; 106) '"test"': &str 12[100; 106) '"test"': &str
13[112; 118) '1.0f32': [unknown] 13[112; 118) '1.0f32': f32
diff --git a/crates/ra_hir/src/ty/tests/data/literals.txt b/crates/ra_hir/src/ty/tests/data/literals.txt
index e139d57a8..df435edd7 100644
--- a/crates/ra_hir/src/ty/tests/data/literals.txt
+++ b/crates/ra_hir/src/ty/tests/data/literals.txt
@@ -1,10 +1,11 @@
1[11; 135) '{ ...lse] }': () 1[11; 146) '{ ...lse] }': ()
2[17; 21) '5i32': i32 2[17; 21) '5i32': i32
3[27; 34) '"hello"': &str 3[27; 34) '"hello"': &str
4[40; 48) 'b"bytes"': &[u8] 4[40; 48) 'b"bytes"': &[u8]
5[54; 57) ''c'': char 5[54; 57) ''c'': char
6[63; 67) 'b'b'': u8 6[63; 67) 'b'b'': u8
7[73; 77) '3.14': [unknown] 7[73; 77) '3.14': {float}
8[83; 87) '5000': [unknown] 8[83; 87) '5000': {integer}
9[93; 108) '(0u32, -5isize)': [unknown] 9[93; 108) '(0u32, -5isize)': [unknown]
10[114; 133) '[true,...false]': () 10[114; 119) 'false': bool
11[125; 144) '[true,...false]': ()
diff --git a/crates/ra_hir/src/ty/tests/data/struct.txt b/crates/ra_hir/src/ty/tests/data/struct.txt
index 7b324c82f..dcdf61363 100644
--- a/crates/ra_hir/src/ty/tests/data/struct.txt
+++ b/crates/ra_hir/src/ty/tests/data/struct.txt
@@ -2,14 +2,14 @@
2[82; 83) 'c': [unknown] 2[82; 83) 'c': [unknown]
3[86; 87) 'C': [unknown] 3[86; 87) 'C': [unknown]
4[86; 90) 'C(1)': [unknown] 4[86; 90) 'C(1)': [unknown]
5[88; 89) '1': [unknown] 5[88; 89) '1': {integer}
6[96; 97) 'B': [unknown] 6[96; 97) 'B': [unknown]
7[107; 108) 'a': A 7[107; 108) 'a': A
8[114; 133) 'A { b:...C(1) }': A 8[114; 133) 'A { b:...C(1) }': A
9[121; 122) 'B': B 9[121; 122) 'B': B
10[127; 128) 'C': [unknown] 10[127; 128) 'C': [unknown]
11[127; 131) 'C(1)': C 11[127; 131) 'C(1)': C
12[129; 130) '1': [unknown] 12[129; 130) '1': {integer}
13[139; 140) 'a': A 13[139; 140) 'a': A
14[139; 142) 'a.b': B 14[139; 142) 'a.b': B
15[148; 149) 'a': A 15[148; 149) 'a': A