aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-24 14:54:18 +0000
committerAleksey Kladov <[email protected]>2019-01-24 14:54:18 +0000
commit60a607d33f1c50acd0a4218da32abe35b2941e38 (patch)
treefa1e5e1785cb04186ed07e04e3e5c1c73bb83c79 /crates/ra_hir/src/ty
parentc57a8579888643e73e12dd0ca23e81f88608c52f (diff)
new struct id
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r--crates/ra_hir/src/ty/method_resolution.rs8
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap12
2 files changed, 10 insertions, 10 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs
index 0084b24dc..9a571c2aa 100644
--- a/crates/ra_hir/src/ty/method_resolution.rs
+++ b/crates/ra_hir/src/ty/method_resolution.rs
@@ -7,16 +7,16 @@ use std::sync::Arc;
7use rustc_hash::FxHashMap; 7use rustc_hash::FxHashMap;
8 8
9use crate::{ 9use crate::{
10 HirDatabase, DefId, module_tree::ModuleId, Module, Crate, Name, Function, 10 HirDatabase, module_tree::ModuleId, Module, Crate, Name, Function,
11 impl_block::{ImplId, ImplBlock, ImplItem}, 11 impl_block::{ImplId, ImplBlock, ImplItem},
12 generics::GenericParams 12 generics::GenericParams,
13 ty::{AdtDef, Ty}
13}; 14};
14use super::Ty;
15 15
16/// This is used as a key for indexing impls. 16/// This is used as a key for indexing impls.
17#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] 17#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
18pub enum TyFingerprint { 18pub enum TyFingerprint {
19 Adt(DefId), 19 Adt(AdtDef),
20 // we'll also want to index impls for primitive types etc. 20 // we'll also want to index impls for primitive types etc.
21} 21}
22 22
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap
index c4a2d5cf8..8747fae18 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap
@@ -1,19 +1,19 @@
1--- 1---
2created: "2019-01-22T14:45:00.058678600+00:00" 2created: "2019-01-24T14:51:32.808861856+00:00"
3creator: insta@0.4.0 3creator: insta@0.5.2
4expression: "&result" 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs" 5source: crates/ra_hir/src/ty/tests.rs
6--- 6---
7[72; 154) '{ ...a.c; }': () 7[72; 154) '{ ...a.c; }': ()
8[82; 83) 'c': [unknown] 8[82; 83) 'c': [unknown]
9[86; 87) 'C': [unknown] 9[86; 87) 'C': C
10[86; 90) 'C(1)': [unknown] 10[86; 90) 'C(1)': [unknown]
11[88; 89) '1': i32 11[88; 89) '1': i32
12[96; 97) 'B': [unknown] 12[96; 97) 'B': B
13[107; 108) 'a': A 13[107; 108) 'a': A
14[114; 133) 'A { b:...C(1) }': A 14[114; 133) 'A { b:...C(1) }': A
15[121; 122) 'B': B 15[121; 122) 'B': B
16[127; 128) 'C': [unknown] 16[127; 128) 'C': C
17[127; 131) 'C(1)': C 17[127; 131) 'C(1)': C
18[129; 130) '1': i32 18[129; 130) '1': i32
19[139; 140) 'a': A 19[139; 140) 'a': A