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:
Nick Spain 2021-01-01 15:41:41 +11:00
parent 71c9a884d1
commit 1c009c9f12

View file

@ -151,7 +151,8 @@ fn target_data_for_def(
S: HasSource<Ast = Ast>,
Ast: AstNode + ast::VisibilityOwner,
{
let source = x.source(db)?;
#[allow(deprecated)]
let source = x.source_old(db);
let in_file_syntax = source.syntax();
let file_id = in_file_syntax.file_id;
let syntax = in_file_syntax.value;