@@ -4,23 +4,28 @@ The tracking issue for this feature is: [#125704](https://github.com/rust-lang/r
4
4
5
5
------------------------
6
6
7
- This option of the ` --print ` flag print the list of expected cfgs.
7
+ This option of the ` --print ` flag print the list of all the expected cfgs.
8
8
9
- This is related to the ` --check-cfg ` flag which allows specifying arbitrary expected
9
+ This is related to the [ ` --check-cfg ` flag] [ check-cfg ] which allows specifying arbitrary expected
10
10
names and values.
11
11
12
- This print option works similarly to ` --print=cfg ` (modulo check-cfg specifics):
13
- - * check_cfg syntax* : * output of --print=check-cfg*
14
- - ` cfg(windows) ` : ` windows `
15
- - ` cfg(feature, values("foo", "bar")) ` : ` feature="foo" ` and ` feature="bar" `
16
- - ` cfg(feature, values(none(), "")) ` : ` feature ` and ` feature="" `
17
- - ` cfg(feature, values(any())) ` : ` feature=any() `
18
- - ` cfg(feature, values()) ` : ` feature= `
19
- - ` cfg(any()) ` : ` any() `
20
- - * nothing* : ` any()=any() `
12
+ This print option works similarly to ` --print=cfg ` (modulo check-cfg specifics).
13
+
14
+ | ` --check-cfg ` | ` --print=check-cfg ` |
15
+ | -----------------------------------| -----------------------------|
16
+ | ` cfg(foo) ` | ` foo ` |
17
+ | ` cfg(foo, values("bar")) ` | ` foo="bar" ` |
18
+ | ` cfg(foo, values(none(), "bar")) ` | ` foo ` & ` foo="bar" ` |
19
+ | | * check-cfg specific syntax* |
20
+ | ` cfg(foo, values(any()) ` | ` foo=any() ` |
21
+ | ` cfg(foo, values()) ` | ` foo= ` |
22
+ | ` cfg(any()) ` | ` any() ` |
23
+ | * none* | ` any()=any() ` |
21
24
22
25
To be used like this:
23
26
24
27
``` bash
25
28
rustc --print=check-cfg -Zunstable-options lib.rs
26
29
```
30
+
31
+ [ check-cfg ] : https://doc.rust-lang.org/nightly/rustc/check-cfg.html
0 commit comments