Encode edition within FileId in the hir layer

This commit is contained in:
Lukas Wirth 2024-07-17 17:35:40 +02:00
parent 92268627a8
commit 5264f86242
160 changed files with 1117 additions and 824 deletions

View file

@ -137,7 +137,7 @@ pub(crate) fn external_docs(
sysroot: Option<&str>,
) -> Option<DocumentationLinks> {
let sema = &Semantics::new(db);
let file = sema.parse(file_id).syntax().clone();
let file = sema.parse_guess_edition(file_id).syntax().clone();
let token = pick_best_token(file.token_at_offset(offset), |kind| match kind {
IDENT | INT_NUMBER | T![self] => 3,
T!['('] | T![')'] => 2,