aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r--crates/ra_hir/src/ty.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs
index b9a48929d..8e93a4457 100644
--- a/crates/ra_hir/src/ty.rs
+++ b/crates/ra_hir/src/ty.rs
@@ -242,7 +242,8 @@ pub enum Ty {
242 // Opaque(DefId, Substs), 242 // Opaque(DefId, Substs),
243 /// A type parameter; for example, `T` in `fn f<T>(x: T) {} 243 /// A type parameter; for example, `T` in `fn f<T>(x: T) {}
244 Param { 244 Param {
245 /// The index of the parameter. 245 /// The index of the parameter (starting with parameters from the
246 /// surrounding impl, then the current function).
246 idx: u32, 247 idx: u32,
247 /// The name of the parameter, for displaying. 248 /// The name of the parameter, for displaying.
248 name: Name, 249 name: Name,
@@ -440,7 +441,9 @@ impl Ty {
440 if (idx as usize) < substs.0.len() { 441 if (idx as usize) < substs.0.len() {
441 substs.0[idx as usize].clone() 442 substs.0[idx as usize].clone()
442 } else { 443 } else {
443 // TODO it's yet unclear to me whether we need to shift the indices here 444 // TODO: does this indicate a bug? i.e. should we always
445 // have substs for all type params? (they might contain the
446 // params themselves again...)
444 Ty::Param { idx, name } 447 Ty::Param { idx, name }
445 } 448 }
446 } 449 }