Skip to content

Commit a20de73

Browse files
committed
Move --check-cfg documentation to stable books
1 parent 909fcfc commit a20de73

38 files changed

+137
-134
lines changed

compiler/rustc_lint/src/context/diagnostics/check_cfg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pub(super) fn unexpected_cfg_name(
168168
diag.note("see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration");
169169
} else {
170170
diag.help(format!("to expect this configuration use `--check-cfg={inst}`"));
171-
diag.note("see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration");
171+
diag.note("see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration");
172172
}
173173
}
174174

@@ -272,6 +272,6 @@ pub(super) fn unexpected_cfg_value(
272272
if !is_cfg_a_well_know_name {
273273
diag.help(format!("to expect this configuration use `--check-cfg={inst}`"));
274274
}
275-
diag.note("see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration");
275+
diag.note("see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration");
276276
}
277277
}

compiler/rustc_session/src/config/cfg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl CheckCfg {
257257
// `tests/ui/check-cfg/well-known-values.rs` (in order to test the
258258
// expected values of the new config) and bless the all directory.
259259
//
260-
// Don't forget to update `src/doc/unstable-book/src/compiler-flags/check-cfg.md`
260+
// Don't forget to update `src/doc/rustc/src/check-cfg.md`
261261
// in the unstable book as well!
262262

263263
ins!(sym::debug_assertions, no_values);

src/doc/rustc/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
- [Profile-guided Optimization](profile-guided-optimization.md)
7878
- [Instrumentation-based Code Coverage](instrument-coverage.md)
7979
- [Linker-plugin-based LTO](linker-plugin-lto.md)
80+
- [Checking conditional configurations](check-cfg.md)
8081
- [Exploit Mitigations](exploit-mitigations.md)
8182
- [Symbol Mangling](symbol-mangling/index.md)
8283
- [v0 Symbol Format](symbol-mangling/v0.md)

src/doc/unstable-book/src/compiler-flags/check-cfg.md src/doc/rustc/src/check-cfg.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
# `check-cfg`
2-
3-
The tracking issue for this feature is: [#82450](https://github.com/rust-lang/rust/issues/82450).
4-
5-
------------------------
6-
7-
This feature enables checking of conditional configuration.
1+
# Checking conditional configurations
82

93
`rustc` accepts the `--check-cfg` option, which specifies whether to check conditions and how to
104
check them. The `--check-cfg` option takes a value, called the _check cfg specification_.

src/doc/rustc/src/command-line-arguments.md

+10
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ The value can either be a single identifier or two identifiers separated by `=`.
1818
For examples, `--cfg 'verbose'` or `--cfg 'feature="serde"'`. These correspond
1919
to `#[cfg(verbose)]` and `#[cfg(feature = "serde")]` respectively.
2020

21+
<a id="option-check-cfg"></a>
22+
## `--check-cfg`: enables checking conditional configurations
23+
24+
This flag will enable checking conditional configurations.
25+
Refer to the [Checking conditional configurations](check-cfg.md) of this book
26+
for further details and explanation.
27+
28+
For examples, `--check-cfg 'cfg(verbose)'` or `--check-cfg 'cfg(feature, values("serde"))'`.
29+
These correspond to `#[cfg(verbose)]` and `#[cfg(feature = "serde")]` respectively.
30+
2131
<a id="option-l-search-path"></a>
2232
## `-L`: add a directory to the library search path
2333

src/doc/rustdoc/src/command-line-arguments.md

+14
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,20 @@ This flag accepts the same values as `rustc --cfg`, and uses it to configure
131131
compilation. The example above uses `feature`, but any of the `cfg` values
132132
are acceptable.
133133

134+
## `--check-cfg`: check configuration flags
135+
136+
This flag accepts the same values as `rustc --check-cfg`, and uses it to
137+
check configuration flags.
138+
139+
Using this flag looks like this:
140+
141+
```bash
142+
$ rustdoc src/lib.rs --check-cfg='cfg(my_cfg, values("foo", "bar"))'
143+
```
144+
145+
The example above check every well known names and values (`target_os`, `doc`, `test`, ...)
146+
and check the values of `my_cfg`: `foo` and `bar`.
147+
134148
## `--extern`: specify a dependency's location
135149

136150
Using this flag looks like this:

src/doc/rustdoc/src/unstable-features.md

-16
Original file line numberDiff line numberDiff line change
@@ -618,22 +618,6 @@ crate being documented (`foobar`) and a path to output the calls
618618
To scrape examples from test code, e.g. functions marked `#[test]`, then
619619
add the `--scrape-tests` flag.
620620

621-
### `--check-cfg`: check configuration flags
622-
623-
* Tracking issue: [#82450](https://github.com/rust-lang/rust/issues/82450)
624-
625-
This flag accepts the same values as `rustc --check-cfg`, and uses it to check configuration flags.
626-
627-
Using this flag looks like this:
628-
629-
```bash
630-
$ rustdoc src/lib.rs -Z unstable-options \
631-
--check-cfg='cfg(feature, values("foo", "bar"))'
632-
```
633-
634-
The example above check every well known names and values (`target_os`, `doc`, `test`, ...)
635-
and check the values of `feature`: `foo` and `bar`.
636-
637621
### `--generate-link-to-definition`: Generate links on types in source code
638622

639623
* Tracking issue: [#89095](https://github.com/rust-lang/rust/issues/89095)

tests/rustdoc-ui/check-cfg.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | #[cfg(uniz)]
55
| ^^^^ help: there is a config with a similar name: `unix`
66
|
77
= help: to expect this configuration use `--check-cfg=cfg(uniz)`
8-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
8+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
99
= note: `#[warn(unexpected_cfgs)]` on by default
1010

1111
warning: 1 warning emitted

tests/rustdoc-ui/doctest/check-cfg-test.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(feature = "invalid")]
66
|
77
= note: expected values for `feature` are: `test`
88
= help: to expect this configuration use `--check-cfg=cfg(feature, values("invalid"))`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

1212
warning: 1 warning emitted

tests/ui/check-cfg/allow-same-level.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(FALSE)]
66
|
77
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(FALSE)`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

1212
warning: 1 warning emitted

tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(value)]
66
|
77
= help: expected names are: `bar`, `bee`, `clippy`, `cow`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(value)`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

1212
warning: 1 warning emitted

tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(my_value)]
66
|
77
= help: expected names are: `bar`, `clippy`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(my_value)`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111
help: found config with similar value
1212
|

tests/ui/check-cfg/cfg-value-for-cfg-name.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(linux)]
66
|
77
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(linux)`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

1212
warning: unexpected `cfg` condition name: `linux`
@@ -16,7 +16,7 @@ LL | #[cfg(linux = "os-name")]
1616
| ^^^^^^^^^^^^^^^^^
1717
|
1818
= help: to expect this configuration use `--check-cfg=cfg(linux, values("os-name"))`
19-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
19+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
2020

2121
warning: 2 warnings emitted
2222

tests/ui/check-cfg/compact-names.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(target(os = "linux", architecture = "arm"))]
66
|
77
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(target_architecture, values("arm"))`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

1212
warning: 1 warning emitted

tests/ui/check-cfg/compact-values.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | #[cfg(target(os = "linux", pointer_width = "X"))]
55
| ^^^^^^^^^^^^^^^^^^^
66
|
77
= note: expected values for `target_pointer_width` are: `16`, `32`, `64`
8-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
8+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
99
= note: `#[warn(unexpected_cfgs)]` on by default
1010

1111
warning: 1 warning emitted

tests/ui/check-cfg/concat-values.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(my_cfg)]
66
|
77
= note: expected values for `my_cfg` are: `bar`, `foo`
88
= help: to expect this configuration use `--check-cfg=cfg(my_cfg)`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

1212
warning: unexpected `cfg` condition value: `unk`
@@ -17,7 +17,7 @@ LL | #[cfg(my_cfg = "unk")]
1717
|
1818
= note: expected values for `my_cfg` are: `bar`, `foo`
1919
= help: to expect this configuration use `--check-cfg=cfg(my_cfg, values("unk"))`
20-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
20+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
2121

2222
warning: 2 warnings emitted
2323

tests/ui/check-cfg/diagnotics.rustc.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(featur)]
66
|
77
= help: expected values for `feature` are: `foo`
88
= help: to expect this configuration use `--check-cfg=cfg(featur)`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

1212
warning: unexpected `cfg` condition name: `featur`
@@ -16,7 +16,7 @@ LL | #[cfg(featur = "foo")]
1616
| ^^^^^^^^^^^^^^
1717
|
1818
= help: to expect this configuration use `--check-cfg=cfg(featur, values("foo"))`
19-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
19+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
2020
help: there is a config with a similar name and value
2121
|
2222
LL | #[cfg(feature = "foo")]
@@ -30,7 +30,7 @@ LL | #[cfg(featur = "fo")]
3030
|
3131
= help: expected values for `feature` are: `foo`
3232
= help: to expect this configuration use `--check-cfg=cfg(featur, values("fo"))`
33-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
33+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
3434
help: there is a config with a similar name and different values
3535
|
3636
LL | #[cfg(feature = "foo")]
@@ -43,7 +43,7 @@ LL | #[cfg(no_value)]
4343
| ^^^^^^^^ help: there is a config with a similar name: `no_values`
4444
|
4545
= help: to expect this configuration use `--check-cfg=cfg(no_value)`
46-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
46+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
4747

4848
warning: unexpected `cfg` condition name: `no_value`
4949
--> $DIR/diagnotics.rs:26:7
@@ -52,7 +52,7 @@ LL | #[cfg(no_value = "foo")]
5252
| ^^^^^^^^^^^^^^^^
5353
|
5454
= help: to expect this configuration use `--check-cfg=cfg(no_value, values("foo"))`
55-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
55+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
5656
help: there is a config with a similar name and no value
5757
|
5858
LL | #[cfg(no_values)]
@@ -68,7 +68,7 @@ LL | #[cfg(no_values = "bar")]
6868
|
6969
= note: no expected value for `no_values`
7070
= help: to expect this configuration use `--check-cfg=cfg(no_values, values("bar"))`
71-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
71+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
7272

7373
warning: 6 warnings emitted
7474

tests/ui/check-cfg/empty-values.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(foo = "foo")]
66
|
77
= note: no expected values for `foo`
88
= help: to expect this configuration use `--check-cfg=cfg(foo, values("foo"))`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

1212
warning: unexpected `cfg` condition value: (none)
@@ -17,7 +17,7 @@ LL | #[cfg(foo)]
1717
|
1818
= note: no expected values for `foo`
1919
= help: to expect this configuration use `--check-cfg=cfg(foo)`
20-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
20+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
2121

2222
warning: 2 warnings emitted
2323

tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[cfg(unknown_key = "value")]
66
|
77
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
9-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
9+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

1212
warning: unexpected `cfg` condition value: `value`
@@ -18,7 +18,7 @@ LL | #[cfg(test = "value")]
1818
| help: remove the value
1919
|
2020
= note: no expected value for `test`
21-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
21+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
2222

2323
warning: unexpected `cfg` condition name: `feature`
2424
--> $DIR/exhaustive-names-values.rs:17:7
@@ -27,7 +27,7 @@ LL | #[cfg(feature = "unk")]
2727
| ^^^^^^^^^^^^^^^
2828
|
2929
= help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
30-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
30+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
3131

3232
warning: unexpected `cfg` condition name: `feature`
3333
--> $DIR/exhaustive-names-values.rs:24:7
@@ -36,7 +36,7 @@ LL | #[cfg(feature = "std")]
3636
| ^^^^^^^^^^^^^^^
3737
|
3838
= help: to expect this configuration use `--check-cfg=cfg(feature, values("std"))`
39-
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
39+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
4040

4141
warning: 4 warnings emitted
4242

0 commit comments

Comments
 (0)