feat: support completions inside cfg!() - #23384
Conversation
This comment has been minimized.
This comment has been minimized.
|
The new implementation of the macro feels very wrong and I object to it. What I support instead is expanding to a |
There is a feature: Expand If expanded as built-in expr, how to output the result and predicate, like |
|
We will not. This is not better than your approach, and I can tolerate that. |
Example
---
```rust
fn main() {
if cfg!($0)
}
```
**Before this PR**
Complete list is empty
**After this PR**
```text
ba all
ba any
ba not
ba true
...
```
0fe3335 to
95e5552
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Looks like the behavior is in line with expectations |
|
Yeah, don't worry, it's image storage for the changelog. |

Example
Before this PR
Complete list is empty
After this PR
Known Problems
Inline macroExpand macro recursivetrue->builtin #cfg(test), use feat: support hover on cfg predicate #23390 insteadcfg_select! {}New false negative:let cfg!(true) = true;, maybe similar False negative: missing match arm when constant in trait #23383