mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Rename *Owner
traits to Has*
This commit is contained in:
parent
a28c5d7311
commit
b6ed91a6de
101 changed files with 393 additions and 397 deletions
|
@ -17,7 +17,7 @@ use rustc_hash::{FxHashMap, FxHashSet};
|
|||
use smallvec::{smallvec, SmallVec};
|
||||
use syntax::{
|
||||
algo::skip_trivia_token,
|
||||
ast::{self, GenericParamsOwner, LoopBodyOwner},
|
||||
ast::{self, HasGenericParams, HasLoopBody},
|
||||
match_ast, AstNode, Direction, SyntaxNode, SyntaxNodePtr, SyntaxToken, TextRange, TextSize,
|
||||
};
|
||||
|
||||
|
@ -682,7 +682,7 @@ impl<'db> SemanticsImpl<'db> {
|
|||
fn resolve_lifetime_param(&self, lifetime: &ast::Lifetime) -> Option<LifetimeParam> {
|
||||
let text = lifetime.text();
|
||||
let lifetime_param = lifetime.syntax().ancestors().find_map(|syn| {
|
||||
let gpl = ast::AnyGenericParamsOwner::cast(syn)?.generic_param_list()?;
|
||||
let gpl = ast::AnyHasGenericParams::cast(syn)?.generic_param_list()?;
|
||||
gpl.lifetime_params()
|
||||
.find(|tp| tp.lifetime().as_ref().map(|lt| lt.text()).as_ref() == Some(&text))
|
||||
})?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue