mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Go back to use of source_old() in offset_target_and_file_id as it's not as simple as I thought
This commit is contained in:
parent
71c9a884d1
commit
1c009c9f12
1 changed files with 2 additions and 1 deletions
|
@ -151,7 +151,8 @@ fn target_data_for_def(
|
||||||
S: HasSource<Ast = Ast>,
|
S: HasSource<Ast = Ast>,
|
||||||
Ast: AstNode + ast::VisibilityOwner,
|
Ast: AstNode + ast::VisibilityOwner,
|
||||||
{
|
{
|
||||||
let source = x.source(db)?;
|
#[allow(deprecated)]
|
||||||
|
let source = x.source_old(db);
|
||||||
let in_file_syntax = source.syntax();
|
let in_file_syntax = source.syntax();
|
||||||
let file_id = in_file_syntax.file_id;
|
let file_id = in_file_syntax.file_id;
|
||||||
let syntax = in_file_syntax.value;
|
let syntax = in_file_syntax.value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue