@@ -4,23 +4,28 @@ The tracking issue for this feature is: [#125704](https://github.com/rust-lang/r
44
55------------------------
66
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.
88
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
1010names and values.
1111
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() ` |
2124
2225To be used like this:
2326
2427``` bash
2528rustc --print=check-cfg -Zunstable-options lib.rs
2629```
30+
31+ [ check-cfg ] : https://doc.rust-lang.org/nightly/rustc/check-cfg.html
0 commit comments