rust-analyzer
fails to resolve/auto-complete constants of associated types.
#18935
Labels
rust-analyzer
fails to resolve/auto-complete constants of associated types.
#18935
rust-analyzer
fails to resolve/auto-complete constants of associated types.What was I doing?
I wanted to have multiple associated constants on a type (implemented by a proc macro), but I wanted them grouped/nested together under another associated type.
Basically I wanted something like
MyType::CONSTS::MY_CONST
(instead of adding them directly on the type likeMyType::CONST_1
,MyType::CONST_2
,MyType::CONST_3
, and so on).What was my issue?
I can do
<MyType as MyConstTrait>::CONSTS::MY_CONST
and my code will compile and run properly, but none of the constants are suggested.The only auto-complete suggestions are
into
,try_into
,from
, andtry_from
.See below for full (minimal) implementation.
rust-analyzer version:
0.4.2262-standalone
rustc version:
rustc 1.84.0-nightly (b91a3a056 2024-11-07)
editor or extension: I have the same issue using rust-analyzer on both VSCode and Neovim
relevant settings:
N/A
repository link (if public, optional): (eg. rust-analyzer)
code snippet to reproduce:
The text was updated successfully, but these errors were encountered: