diff options
author | Marcus Klaas de Vries <[email protected]> | 2019-01-11 08:47:31 +0000 |
---|---|---|
committer | Marcus Klaas de Vries <[email protected]> | 2019-01-14 12:55:49 +0000 |
commit | 81bc8e4973fefd0ff31d08206c374fb58aa8b6e0 (patch) | |
tree | 08c6df5a8b97cf7fb03d46b8ca8859b0be7a5de6 /crates/ra_hir/src/ty | |
parent | 1574715be5d3fc7e07160708810dcbc9c1b01733 (diff) |
don't try to treat arrays and tuples as literals
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/tests/data/literals.txt | 10 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/tests/data/struct.txt | 4 |
3 files changed, 6 insertions, 10 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index 0c43415a6..53ea99874 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -144,9 +144,7 @@ fn test() { | |||
144 | b'b'; | 144 | b'b'; |
145 | 3.14; | 145 | 3.14; |
146 | 5000; | 146 | 5000; |
147 | (0u32, -5isize); | ||
148 | false; | 147 | false; |
149 | [true, true, false] | ||
150 | } | 148 | } |
151 | "#, | 149 | "#, |
152 | "literals.txt", | 150 | "literals.txt", |
diff --git a/crates/ra_hir/src/ty/tests/data/literals.txt b/crates/ra_hir/src/ty/tests/data/literals.txt index df435edd7..8d6079c98 100644 --- a/crates/ra_hir/src/ty/tests/data/literals.txt +++ b/crates/ra_hir/src/ty/tests/data/literals.txt | |||
@@ -1,11 +1,9 @@ | |||
1 | [11; 146) '{ ...lse] }': () | 1 | [11; 101) '{ ...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': {float} | 7 | [73; 77) '3.14': f64 |
8 | [83; 87) '5000': {integer} | 8 | [83; 87) '5000': i32 |
9 | [93; 108) '(0u32, -5isize)': [unknown] | 9 | [93; 98) 'false': bool |
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 dcdf61363..be9e12d02 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': {integer} | 5 | [88; 89) '1': i32 |
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': {integer} | 12 | [129; 130) '1': i32 |
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 |