aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/snapshots
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-01 22:37:59 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-01 22:37:59 +0000
commit4447019f4b5f24728bb7b91b161755ddb373c74c (patch)
treec53ff3531cbbad182e821eb92fa9ad201d2bff0c /crates/ra_hir/src/ty/snapshots
parent2b5c226e86892113bcab478cdf4c9adaf1e7b2f6 (diff)
parentc5852f422ff45adaa21815c1a15e03b067a56a82 (diff)
Merge #693
693: Name resolution refactoring r=matklad a=flodiebold This is still very WIP, but it's becoming quite big and I want to make sure this isn't going in a completely bad direction :sweat_smile:. I'm not really happy with how the path resolution looks, and I'm not sure `PerNs<Resolution>` is the best return type -- there are 'this cannot happen in the (types/values) namespace' cases everywhere. I also want to unify the `resolver` and `nameres` namespaces once I'm done switching everything to `Resolver`. Also, `Resolver` only has a lifetime because it needs to have a reference to the `ItemMap` during import resolution :confused: The differences in the completion snapshots are almost completely just ordering (except it completes `Self` as well now), so I changed it to sort the completions before snapshotting. Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/snapshots')
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap8
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap8
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_type_param.snap14
3 files changed, 15 insertions, 15 deletions
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap
index 8ff6e55a6..91c48897c 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap
@@ -1,12 +1,12 @@
1--- 1---
2created: "2019-01-26T18:16:16.530712344+00:00" 2created: "2019-01-27T14:52:29.934503829+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: "&result" 4expression: "&result"
5source: crates/ra_hir/src/ty/tests.rs 5source: crates/ra_hir/src/ty/tests.rs
6--- 6---
7[10; 11) 't': [unknown] 7[10; 11) 't': T
8[21; 26) '{ t }': [unknown] 8[21; 26) '{ t }': T
9[23; 24) 't': [unknown] 9[23; 24) 't': T
10[38; 98) '{ ...(1); }': () 10[38; 98) '{ ...(1); }': ()
11[44; 46) 'id': fn id<u32>(T) -> T 11[44; 46) 'id': fn id<u32>(T) -> T
12[44; 52) 'id(1u32)': u32 12[44; 52) 'id(1u32)': u32
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap
index f21bffa75..626f31252 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-01-26T17:46:03.866825843+00:00" 2created: "2019-01-27T14:52:29.938713255+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: "&result" 4expression: "&result"
5source: crates/ra_hir/src/ty/tests.rs 5source: crates/ra_hir/src/ty/tests.rs
@@ -8,9 +8,9 @@ source: crates/ra_hir/src/ty/tests.rs
8[65; 87) '{ ... }': [unknown] 8[65; 87) '{ ... }': [unknown]
9[75; 79) 'self': A<[unknown]> 9[75; 79) 'self': A<[unknown]>
10[75; 81) 'self.x': [unknown] 10[75; 81) 'self.x': [unknown]
11[99; 100) 't': [unknown] 11[99; 100) 't': T
12[110; 115) '{ t }': [unknown] 12[110; 115) '{ t }': T
13[112; 113) 't': [unknown] 13[112; 113) 't': T
14[135; 261) '{ ....x() }': i128 14[135; 261) '{ ....x() }': i128
15[146; 147) 'x': i32 15[146; 147) 'x': i32
16[150; 151) '1': i32 16[150; 151) '1': i32
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_type_param.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_type_param.snap
index a99323264..216d1e41f 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_type_param.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_type_param.snap
@@ -1,15 +1,15 @@
1--- 1---
2created: "2019-01-27T16:54:18.368427685+00:00" 2created: "2019-01-27T20:38:32.153717698+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: "&result" 4expression: "&result"
5source: crates/ra_hir/src/ty/tests.rs 5source: crates/ra_hir/src/ty/tests.rs
6--- 6---
7[10; 11) 'x': [unknown] 7[10; 11) 'x': T
8[21; 30) '{ x }': [unknown] 8[21; 30) '{ x }': T
9[27; 28) 'x': [unknown] 9[27; 28) 'x': T
10[44; 45) 'x': &[unknown] 10[44; 45) 'x': &T
11[56; 65) '{ x }': &[unknown] 11[56; 65) '{ x }': &T
12[62; 63) 'x': &[unknown] 12[62; 63) 'x': &T
13[77; 157) '{ ...(1); }': () 13[77; 157) '{ ...(1); }': ()
14[87; 88) 'y': u32 14[87; 88) 'y': u32
15[91; 96) '10u32': u32 15[91; 96) '10u32': u32