-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Parsing of the thread_local
macro doesn't work
#15585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hmm odd, this works fine for me on current r-a nightly, though I am on windows with 1.74-nightly rust. I don't think anything changed in std lib there though |
Doesn't work for me on Linux, not sure if we support macros 2.0. |
Sorry I didn't mention earlier, my system is linux and for nightly - the same behavior $ rust-analyzer --version
rust-analyzer 1.74.0-nightly (62ebe3a 2023-09-08)
$ rustc -V
rustc 1.74.0-nightly (62ebe3a2b 2023-09-08)
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy |
Doesn't work on macos. |
Expands more or less correctly now, can you confirm @sergey-tikhonenko? |
I see the same behaviour for both versions:
LSP method = "rust-analyzer/expandMacro" returns the following expansion = see LSP log
PS.
|
|
Thanks, as a workaround, this works for me. |
Summary
Parsing of the
thread_local
macro doesn't work for me. Also the following methods don't work for thethread_local
macro and theTLV
variable:Looks like recursive macro expansion doesn't work, see output for detail. It returns the
thread_local_inner
macro instead of an expanded code.Code
Expand output
LSP log
LSP Log for hover, definition, references
But
cargo expand
works as expected:rust-analyzer version: rust-analyzer 0.3.1649-standalone
rustc version: rustc 1.72.0 (5680fa18f 2023-08-23)
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTC
,RUSTUP_HOME
orCARGO_HOME
)$ rustup -V
rustup 1.26.0 (5af9b94 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active
rustc
version isrustc 1.72.0 (5680fa18f 2023-08-23)
The text was updated successfully, but these errors were encountered: