mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
rename TreePtr -> TreeArc
This is much clearer about the semantics
This commit is contained in:
parent
aad1bf877e
commit
2d3940d0ab
25 changed files with 197 additions and 197 deletions
|
@ -7,7 +7,7 @@ pub mod mock;
|
|||
|
||||
use std::panic;
|
||||
|
||||
use ra_syntax::{TextUnit, TextRange, SourceFile, TreePtr};
|
||||
use ra_syntax::{TextUnit, TextRange, SourceFile, TreeArc};
|
||||
|
||||
pub use crate::{
|
||||
cancellation::{Canceled, Cancelable},
|
||||
|
@ -40,13 +40,13 @@ pub trait BaseDatabase: salsa::Database + panic::RefUnwindSafe {
|
|||
|
||||
salsa::query_group! {
|
||||
pub trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase {
|
||||
fn source_file(file_id: FileId) -> TreePtr<SourceFile> {
|
||||
fn source_file(file_id: FileId) -> TreeArc<SourceFile> {
|
||||
type SourceFileQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreePtr<SourceFile> {
|
||||
fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreeArc<SourceFile> {
|
||||
let text = db.file_text(file_id);
|
||||
SourceFile::parse(&*text)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue