Unnamed repository; edit this file 'description' to name the repository.
Add `fn index()` accessor for `hir::Param`
Vincent Esche 2024-03-05
parent 1afeea8 · commit bf14131
-rw-r--r--crates/hir/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index ffdf169bbb..5eed7ecd5b 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -2112,6 +2112,10 @@ impl Param {
self.func
}
+ pub fn index(&self) -> usize {
+ self.idx
+ }
+
pub fn ty(&self) -> &Type {
&self.ty
}