mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Fix 14142: Annotate lifetime paramaters in doctest runnables
This commit is contained in:
parent
c867cbf9b6
commit
9942cc425b
3 changed files with 155 additions and 6 deletions
|
@ -459,6 +459,13 @@ impl Resolver {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn generic_params(&self) -> Option<&Interned<GenericParams>> {
|
||||
self.scopes().find_map(|scope| match scope {
|
||||
Scope::GenericParams { params, .. } => Some(params),
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn body_owner(&self) -> Option<DefWithBodyId> {
|
||||
self.scopes().find_map(|scope| match scope {
|
||||
Scope::ExprScope(it) => Some(it.owner),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue