rename TreePtr -> TreeArc

This is much clearer about the semantics
This commit is contained in:
Aleksey Kladov 2019-01-11 19:59:06 +03:00
parent aad1bf877e
commit 2d3940d0ab
25 changed files with 197 additions and 197 deletions

View file

@ -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)
}