File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 1- {
2- "rust-analyzer.cargo.cfgs" : {
3- // This adds an extra cfg to rust-analyzer so we can prevent it from
4- // analyzing tests with a lot of generated code. These can cause it to
5- // hang or run slowly in general, which is bad for workflows.
6- "rust_analyzer" : null ,
7- }
8- }
1+ {
2+ // Extra cfgs added to rust-analyzer.
3+ "rust-analyzer.cargo.cfgs" : [
4+ // Expensive-to-compile tests can `cfg(not(rust_analyzer))` to avoid
5+ // slowing developers down.
6+ " rust_analyzer" ,
7+ // Converting unions to bytes currently requires a `cfg` feature.
8+ // Used in some tests.
9+ // See https://github.com/google/zerocopy/discussions/1802.
10+ " zerocopy_derive_union_into_bytes"
11+ ],
12+ // The above list is duplicated so that the `cfg`s are also used in `cargo check`.
13+ // See https://github.com/rust-lang/rust-analyzer/issues/19926.
14+ "rust-analyzer.cargo.extraEnv" : {
15+ "RUSTFLAGS" : " --cfg rust_analyzer --cfg zerocopy_derive_union_into_bytes"
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments