fix: Resolve generic parameters within use captures

This commit is contained in:
Lukas Wirth 2024-12-05 14:37:38 +01:00
parent 7f39ee3fce
commit d6b62265b5
5 changed files with 90 additions and 2 deletions

View file

@ -642,9 +642,9 @@ impl Resolver {
})
}
pub fn generic_params(&self) -> Option<&Arc<GenericParams>> {
pub fn generic_params(&self) -> Option<&GenericParams> {
self.scopes().find_map(|scope| match scope {
Scope::GenericParams { params, .. } => Some(params),
Scope::GenericParams { params, .. } => Some(&**params),
_ => None,
})
}