diff options
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r-- | crates/ra_hir/src/ty.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index 4a37e0268..d9a50b230 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -16,7 +16,7 @@ use std::sync::Arc; | |||
16 | use std::ops::Deref; | 16 | use std::ops::Deref; |
17 | use std::{fmt, mem}; | 17 | use std::{fmt, mem}; |
18 | 18 | ||
19 | use crate::{Name, AdtDef, type_ref::Mutability, db::HirDatabase, Trait, GenericParams}; | 19 | use crate::{Name, AdtDef, type_ref::Mutability, db::HirDatabase, Trait, GenericParams, TypeAlias}; |
20 | use display::{HirDisplay, HirFormatter}; | 20 | use display::{HirDisplay, HirFormatter}; |
21 | 21 | ||
22 | pub(crate) use lower::{TypableDef, type_for_def, type_for_field, callable_item_sig, generic_predicates, generic_defaults}; | 22 | pub(crate) use lower::{TypableDef, type_for_def, type_for_field, callable_item_sig, generic_predicates, generic_defaults}; |
@@ -100,6 +100,15 @@ pub struct ApplicationTy { | |||
100 | pub parameters: Substs, | 100 | pub parameters: Substs, |
101 | } | 101 | } |
102 | 102 | ||
103 | /// A "projection" type corresponds to an (unnormalized) | ||
104 | /// projection like `<P0 as Trait<P1..Pn>>::Foo`. Note that the | ||
105 | /// trait and all its parameters are fully known. | ||
106 | #[derive(Clone, PartialEq, Eq, Debug, Hash)] | ||
107 | pub struct ProjectionTy { | ||
108 | pub associated_ty: TypeAlias, | ||
109 | pub parameters: Substs, | ||
110 | } | ||
111 | |||
103 | /// A type. | 112 | /// A type. |
104 | /// | 113 | /// |
105 | /// See also the `TyKind` enum in rustc (librustc/ty/sty.rs), which represents | 114 | /// See also the `TyKind` enum in rustc (librustc/ty/sty.rs), which represents |