You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when importing SOME_CONSTANT (use other_file_1::SOME_CONSTANT) before doing the quick fix everything works as expected
the panic message starts with Can't find [email protected] in AstIdMap, what it tries to find has a length of 27, just like other_file_1::SOME_CONSTANT (including other_file_1::), the start position, 202, is where SOME_CONSTANT starts on line 11
The text was updated successfully, but these errors were encountered:
Culprit seems to be that PathTransform::apply (specifically ide_db::path_transform::Ctx::transform_path) looks up resolution information based on the mutable versions of the syntax nodes instead of the original syntax nodes, so after transform_path it'll be looking up a CONST_ARG with the wrong span.
rust-analyzer version: rust-analyzer version: 0.4.1979-standalone
rustc version: rustc 1.80.0-nightly (9cdfe285c 2024-05-22)
editor or extension: code oss
relevant settings: None
code snippet to reproduce:
panic log
useful info that might help debugging:
SOME_CONSTANT
(use other_file_1::SOME_CONSTANT
) before doing the quick fix everything works as expectedCan't find [email protected] in AstIdMap
, what it tries to find has a length of 27, just likeother_file_1::SOME_CONSTANT
(includingother_file_1::
), the start position, 202, is whereSOME_CONSTANT
starts on line 11The text was updated successfully, but these errors were encountered: