rename TreePtr -> TreeArc
This is much clearer about the semantics
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user