mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +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
|
@ -1,6 +1,6 @@
|
|||
use ide_db::SymbolKind;
|
||||
use syntax::{
|
||||
ast::{self, AttrsOwner, GenericParamsOwner, NameOwner},
|
||||
ast::{self, HasAttrs, HasGenericParams, HasName},
|
||||
match_ast, AstNode, AstToken, NodeOrToken, SourceFile, SyntaxNode, SyntaxToken, TextRange,
|
||||
WalkEvent,
|
||||
};
|
||||
|
@ -74,11 +74,11 @@ pub(crate) fn file_structure(file: &SourceFile) -> Vec<StructureNode> {
|
|||
}
|
||||
|
||||
fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
|
||||
fn decl<N: NameOwner + AttrsOwner>(node: N, kind: StructureNodeKind) -> Option<StructureNode> {
|
||||
fn decl<N: HasName + HasAttrs>(node: N, kind: StructureNodeKind) -> Option<StructureNode> {
|
||||
decl_with_detail(&node, None, kind)
|
||||
}
|
||||
|
||||
fn decl_with_type_ref<N: NameOwner + AttrsOwner>(
|
||||
fn decl_with_type_ref<N: HasName + HasAttrs>(
|
||||
node: &N,
|
||||
type_ref: Option<ast::Type>,
|
||||
kind: StructureNodeKind,
|
||||
|
@ -91,7 +91,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
|
|||
decl_with_detail(node, detail, kind)
|
||||
}
|
||||
|
||||
fn decl_with_detail<N: NameOwner + AttrsOwner>(
|
||||
fn decl_with_detail<N: HasName + HasAttrs>(
|
||||
node: &N,
|
||||
detail: Option<String>,
|
||||
kind: StructureNodeKind,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue