diff options
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r-- | crates/ra_hir/src/ty.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index e7c39487d..6a79af35b 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -234,6 +234,17 @@ impl TraitRef { | |||
234 | } | 234 | } |
235 | } | 235 | } |
236 | 236 | ||
237 | /// Basically a claim (currently not validated / checked) that the contained | ||
238 | /// type / trait ref contains no inference variables; any inference variables it | ||
239 | /// contained have been replaced by bound variables, and `num_vars` tells us how | ||
240 | /// many there are. This is used to erase irrelevant differences between types | ||
241 | /// before using them in queries. | ||
242 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
243 | pub(crate) struct Canonical<T> { | ||
244 | pub value: T, | ||
245 | pub num_vars: usize, | ||
246 | } | ||
247 | |||
237 | /// A function signature as seen by type inference: Several parameter types and | 248 | /// A function signature as seen by type inference: Several parameter types and |
238 | /// one return type. | 249 | /// one return type. |
239 | #[derive(Clone, PartialEq, Eq, Debug)] | 250 | #[derive(Clone, PartialEq, Eq, Debug)] |