diff options
author | Nick Spain <[email protected]> | 2021-01-01 04:41:41 +0000 |
---|---|---|
committer | Nick Spain <[email protected]> | 2021-01-02 10:53:52 +0000 |
commit | 1c009c9f1243d81c5caee082ce638d60c955a1bb (patch) | |
tree | a8409c758a35c679fe02c6d5fce46744d00788e0 | |
parent | 71c9a884d1d9b27bf9da8ce7d328d74349db54a2 (diff) |
Go back to use of source_old() in offset_target_and_file_id as it's not as simple as I thought
-rw-r--r-- | crates/assists/src/handlers/fix_visibility.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/fix_visibility.rs b/crates/assists/src/handlers/fix_visibility.rs index aa6aed9c2..f5cd5f9da 100644 --- a/crates/assists/src/handlers/fix_visibility.rs +++ b/crates/assists/src/handlers/fix_visibility.rs | |||
@@ -151,7 +151,8 @@ fn target_data_for_def( | |||
151 | S: HasSource<Ast = Ast>, | 151 | S: HasSource<Ast = Ast>, |
152 | Ast: AstNode + ast::VisibilityOwner, | 152 | Ast: AstNode + ast::VisibilityOwner, |
153 | { | 153 | { |
154 | let source = x.source(db)?; | 154 | #[allow(deprecated)] |
155 | let source = x.source_old(db); | ||
155 | let in_file_syntax = source.syntax(); | 156 | let in_file_syntax = source.syntax(); |
156 | let file_id = in_file_syntax.file_id; | 157 | let file_id = in_file_syntax.file_id; |
157 | let syntax = in_file_syntax.value; | 158 | let syntax = in_file_syntax.value; |