-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
no-such-field for #[cfg(not(test))]
with StructOpt
#11657
Labels
A-macro
macro expansion
Comments
|
cc #8434 |
bors
added a commit
that referenced
this issue
Mar 12, 2024
cfg Attribute Stripping for Proc Macro Expansion This will attempt to process cfg attributes and cfg_attr attributes for proc macro expansion. ![image](https://github.com/rust-lang/rust-analyzer/assets/11785959/b85ef203-14a5-44c9-9b67-59a65a5f2d96) Closes #8434 , #11657, and #13904
Fixed in #16789 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
=>
cargo test
cargo build
cargo build --release
don't show any errors.The error occurs only in combination with
#[derive(StructOpt)]
.Full source:
https://github.com/kolloch/no-such-field
itemtree.rs
Strips
#[cfg(not(test))]
items from main but not from struct:cargo expand
rust-analyzer version: (eg. output of "Rust Analyzer: Show RA Version" command)
rust-analyzer version: 5fae65dd2 2022-03-07 stable
rustc version: (eg. output of
rustc -V
)rustc 1.59.0 (9d1b2106e 2022-02-23)
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTUP_HOME
orCARGO_HOME
)💌 thank you for providing rust analyzer
The text was updated successfully, but these errors were encountered: