mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
make Parse fields private
this is in preparation for the new rowan API
This commit is contained in:
parent
2e466bb365
commit
deab4caa7b
31 changed files with 109 additions and 99 deletions
|
@ -19,8 +19,8 @@ pub(crate) fn goto_definition(
|
|||
db: &RootDatabase,
|
||||
position: FilePosition,
|
||||
) -> Option<RangeInfo<Vec<NavigationTarget>>> {
|
||||
let file = db.parse(position.file_id).tree;
|
||||
let syntax = file.syntax();
|
||||
let parse = db.parse(position.file_id);
|
||||
let syntax = parse.tree().syntax();
|
||||
if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, position.offset) {
|
||||
let navs = reference_definition(db, position.file_id, name_ref).to_vec();
|
||||
return Some(RangeInfo::new(name_ref.syntax().range(), navs.to_vec()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue