diff options
| author | Urgau <urgau@numericable.fr> | 2023-05-01 14:17:56 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2023-10-13 13:34:21 +0200 |
| commit | e5e95eba457b17a1f8005403fa0287e1cd8d82f3 (patch) | |
| tree | 9cb5a4e065201ae300016981179cd0e449a127cc /src/doc/rustdoc | |
| parent | a4a10bdf29a13b8773948c8938d2af47c03becb9 (diff) | |
MCP636: Add simpler and more explicit syntax to check-cfg
This add a new form and deprecated the other ones:
- cfg(name1, ..., nameN, values("value1", "value2", ... "valueN"))
- cfg(name1, ..., nameN) or cfg(name1, ..., nameN, values())
- cfg(any())
It also changes the default exhaustiveness to be enable-by-default in
the presence of any --check-cfg arguments.
Diffstat (limited to 'src/doc/rustdoc')
| -rw-r--r-- | src/doc/rustdoc/src/unstable-features.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index 199b5d69a1c..41602dec44c 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -628,10 +628,10 @@ Using this flag looks like this: ```bash $ rustdoc src/lib.rs -Z unstable-options \ - --check-cfg='names()' --check-cfg='values(feature, "foo", "bar")' + --check-cfg='cfg(feature, values("foo", "bar"))' ``` -The example above check every well known names (`target_os`, `doc`, `test`, ... via `names()`) +The example above check every well known names and values (`target_os`, `doc`, `test`, ...) and check the values of `feature`: `foo` and `bar`. ### `--generate-link-to-definition`: Generate links on types in source code |
