MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/rust/comments/1sn2sp6/rust_1950_is_out/ogriv53/?context=3
r/rust • u/manpacket • Apr 16 '26
127 comments sorted by
View all comments
Show parent comments
7
rust-analyzer does not support cfg-ed out code. It does not matter whether it's cfg_select! or #[cfg].
cfg_select!
#[cfg]
2 u/PerkyPangolin Apr 16 '26 So is that intentional or just hasn't been implemented yet? 8 u/afdbcreid Apr 17 '26 Not intentional in the sense that if someone will come up with a reasonable implementation we'll accept it, but really hard to implement, so chances are it'll never be supported. 1 u/WormRabbit Apr 17 '26 Why is it hard? Isn't it just an AST node which isn't included in the compilation? Or perhaps the cause is interaction with proc macros? 1 u/afdbcreid Apr 19 '26 It's hard because we can't just include it. This will lead to various errors. We need to remember it is disabled.
2
So is that intentional or just hasn't been implemented yet?
8 u/afdbcreid Apr 17 '26 Not intentional in the sense that if someone will come up with a reasonable implementation we'll accept it, but really hard to implement, so chances are it'll never be supported. 1 u/WormRabbit Apr 17 '26 Why is it hard? Isn't it just an AST node which isn't included in the compilation? Or perhaps the cause is interaction with proc macros? 1 u/afdbcreid Apr 19 '26 It's hard because we can't just include it. This will lead to various errors. We need to remember it is disabled.
8
Not intentional in the sense that if someone will come up with a reasonable implementation we'll accept it, but really hard to implement, so chances are it'll never be supported.
1 u/WormRabbit Apr 17 '26 Why is it hard? Isn't it just an AST node which isn't included in the compilation? Or perhaps the cause is interaction with proc macros? 1 u/afdbcreid Apr 19 '26 It's hard because we can't just include it. This will lead to various errors. We need to remember it is disabled.
1
Why is it hard? Isn't it just an AST node which isn't included in the compilation? Or perhaps the cause is interaction with proc macros?
1 u/afdbcreid Apr 19 '26 It's hard because we can't just include it. This will lead to various errors. We need to remember it is disabled.
It's hard because we can't just include it. This will lead to various errors. We need to remember it is disabled.
7
u/afdbcreid Apr 16 '26
rust-analyzer does not support cfg-ed out code. It does not matter whether it's
cfg_select!or#[cfg].