aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-01-13 10:58:41 +0000
committerFlorian Diebold <[email protected]>2019-01-19 15:02:06 +0000
commitfa7f9d696f5863dbf28b3d0ef14c1bc9143b2d21 (patch)
tree6dbf221c3ccb3474fd37ff241961359169abae71 /crates/ra_hir/src/ty.rs
parent5862542dedd5aca9bbdcba19c5f8cd895591005d (diff)
Make Module impl methods crate-private, update some comments
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 }