mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Encode edition within FileId in the hir layer
This commit is contained in:
parent
92268627a8
commit
5264f86242
160 changed files with 1117 additions and 824 deletions
|
@ -24,7 +24,7 @@ pub(crate) fn goto_implementation(
|
|||
FilePosition { file_id, offset }: FilePosition,
|
||||
) -> Option<RangeInfo<Vec<NavigationTarget>>> {
|
||||
let sema = Semantics::new(db);
|
||||
let source_file = sema.parse(file_id);
|
||||
let source_file = sema.parse_guess_edition(file_id);
|
||||
let syntax = source_file.syntax().clone();
|
||||
|
||||
let original_token = pick_best_token(syntax.token_at_offset(offset), |kind| match kind {
|
||||
|
@ -117,7 +117,7 @@ fn impls_for_trait_item(
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ide_db::base_db::FileRange;
|
||||
use ide_db::FileRange;
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::fixture;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue