From 60a607d33f1c50acd0a4218da32abe35b2941e38 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 24 Jan 2019 17:54:18 +0300 Subject: new struct id --- crates/ra_hir/src/ty/method_resolution.rs | 8 ++++---- crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'crates/ra_hir/src/ty') 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; use rustc_hash::FxHashMap; use crate::{ - HirDatabase, DefId, module_tree::ModuleId, Module, Crate, Name, Function, + HirDatabase, module_tree::ModuleId, Module, Crate, Name, Function, impl_block::{ImplId, ImplBlock, ImplItem}, - generics::GenericParams + generics::GenericParams, + ty::{AdtDef, Ty} }; -use super::Ty; /// This is used as a key for indexing impls. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum TyFingerprint { - Adt(DefId), + Adt(AdtDef), // we'll also want to index impls for primitive types etc. } 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 @@ --- -created: "2019-01-22T14:45:00.058678600+00:00" -creator: insta@0.4.0 +created: "2019-01-24T14:51:32.808861856+00:00" +creator: insta@0.5.2 expression: "&result" -source: "crates\\ra_hir\\src\\ty\\tests.rs" +source: crates/ra_hir/src/ty/tests.rs --- [72; 154) '{ ...a.c; }': () [82; 83) 'c': [unknown] -[86; 87) 'C': [unknown] +[86; 87) 'C': C [86; 90) 'C(1)': [unknown] [88; 89) '1': i32 -[96; 97) 'B': [unknown] +[96; 97) 'B': B [107; 108) 'a': A [114; 133) 'A { b:...C(1) }': A [121; 122) 'B': B -[127; 128) 'C': [unknown] +[127; 128) 'C': C [127; 131) 'C(1)': C [129; 130) '1': i32 [139; 140) 'a': A -- cgit v1.2.3