We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
fn parent_fn()
hir::Param
hir::SelfParam
1 parent 223238d commit 1afeea8Copy full SHA for 1afeea8
crates/hir/src/lib.rs
@@ -2108,6 +2108,10 @@ pub struct Param {
2108
}
2109
2110
impl Param {
2111
+ pub fn parent_fn(&self) -> Function {
2112
+ self.func
2113
+ }
2114
+
2115
pub fn ty(&self) -> &Type {
2116
&self.ty
2117
@@ -2172,6 +2176,10 @@ impl SelfParam {
2172
2176
.map(|value| InFile { file_id, value })
2173
2177
2174
2178
2179
2180
+ Function::from(self.func)
2181
2182
2175
2183
pub fn ty(&self, db: &dyn HirDatabase) -> Type {
2184
let substs = TyBuilder::placeholder_subst(db, self.func);
2185
let callable_sig =
0 commit comments