Rename *Owner traits to Has*

This commit is contained in:
Lukas Wirth 2021-09-27 12:54:24 +02:00
parent a28c5d7311
commit b6ed91a6de
101 changed files with 393 additions and 397 deletions

View file

@ -27,7 +27,7 @@ use either::Either;
use hir::{AsAssocItem, FieldSource, HasSource, InFile, ModuleSource, Semantics};
use stdx::never;
use syntax::{
ast::{self, NameOwner},
ast::{self, HasName},
lex_single_syntax_kind, AstNode, SyntaxKind, TextRange, T,
};
use text_edit::{TextEdit, TextEditBuilder};
@ -156,7 +156,7 @@ impl Definition {
fn name_range<D>(def: D, sema: &Semantics<RootDatabase>) -> Option<FileRange>
where
D: HasSource,
D::Ast: ast::NameOwner,
D::Ast: ast::HasName,
{
let src = def.source(sema.db)?;
let name = src.value.name()?;