mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
somewhat better name
This commit is contained in:
parent
1ec1bd8139
commit
171f6e6d00
@ -299,7 +299,7 @@ impl Analysis {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the syntax tree of the file.
|
/// Gets the syntax tree of the file.
|
||||||
pub fn file_syntax(&self, file_id: FileId) -> TreeArc<SourceFile> {
|
pub fn parse(&self, file_id: FileId) -> TreeArc<SourceFile> {
|
||||||
self.db.source_file(file_id).clone()
|
self.db.source_file(file_id).clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ pub fn handle_completion(
|
|||||||
let mut res = false;
|
let mut res = false;
|
||||||
if let Some(ctx) = params.context {
|
if let Some(ctx) = params.context {
|
||||||
if ctx.trigger_character.unwrap_or_default() == ":" {
|
if ctx.trigger_character.unwrap_or_default() == ":" {
|
||||||
let source_file = world.analysis().file_syntax(position.file_id);
|
let source_file = world.analysis().parse(position.file_id);
|
||||||
let syntax = source_file.syntax();
|
let syntax = source_file.syntax();
|
||||||
let text = syntax.text();
|
let text = syntax.text();
|
||||||
if let Some(next_char) = text.char_at(position.offset) {
|
if let Some(next_char) = text.char_at(position.offset) {
|
||||||
|
Loading…
Reference in New Issue
Block a user