aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/traits
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-11 16:21:55 +0000
committerGitHub <[email protected]>2019-11-11 16:21:55 +0000
commitf742803c6a5a632af6e0aecb123920d1962e5fee (patch)
tree1b0f7c7b0f430d4174ca05e5464b3af98128bafe /crates/ra_hir/src/ty/traits
parenta599147b4232c0d4f6b071a3a96e86f903f4cf52 (diff)
parentc5a18c44e5211282c22b9ca7aae8700ee8ca1817 (diff)
Merge #2213
2213: Hir generic param r=flodiebold a=matklad r? @flodiebold This should make the life of IDE easier: before, it got `GenericParam(u32)` which was of questionable utility. Now, it's a proper code_model type, so it can gain `source`, `name`, `module` and all the other hir methods, should the IDE need them. Moreover, IDE now doesn't care about internal representation of generic param, which seems like a long-term win. The problem is, of course, that we now have to types named `GenericParam` in hir: this code_model type, and an internal type with an index which doesn't know about the parent. I think it's fine for the time being, but, after we finish cratefication of hir, this local `GenericParam` should move to `hir_def` or `hir_ty`, and *maybe* restrucured as `ParamId / PramData` pair. Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/traits')
-rw-r--r--crates/ra_hir/src/ty/traits/chalk.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs
index c694952f3..14c54b9fb 100644
--- a/crates/ra_hir/src/ty/traits/chalk.rs
+++ b/crates/ra_hir/src/ty/traits/chalk.rs
@@ -16,13 +16,13 @@ use ra_db::salsa::{InternId, InternKey};
16use super::{Canonical, ChalkContext, Impl, Obligation}; 16use super::{Canonical, ChalkContext, Impl, Obligation};
17use crate::{ 17use crate::{
18 db::HirDatabase, 18 db::HirDatabase,
19 generics::GenericDef, 19 generics::{GenericDef, HasGenericParams},
20 ty::display::HirDisplay, 20 ty::display::HirDisplay,
21 ty::{ 21 ty::{
22 ApplicationTy, GenericPredicate, Namespace, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, 22 ApplicationTy, GenericPredicate, Namespace, ProjectionTy, Substs, TraitRef, Ty, TypeCtor,
23 TypeWalk, 23 TypeWalk,
24 }, 24 },
25 AssocItem, Crate, HasGenericParams, ImplBlock, Trait, TypeAlias, 25 AssocItem, Crate, ImplBlock, Trait, TypeAlias,
26}; 26};
27 27
28/// This represents a trait whose name we could not resolve. 28/// This represents a trait whose name we could not resolve.