From 88e81bca9f83157afec49c4cddcdf25497cfe507 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Fri, 24 May 2024 17:09:21 +0200 Subject: [PATCH 1/2] Fix typos in cargo-specifics.md --- src/doc/rustc/src/check-cfg/cargo-specifics.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/rustc/src/check-cfg/cargo-specifics.md b/src/doc/rustc/src/check-cfg/cargo-specifics.md index bfa6016192614..e3b8b537c42c7 100644 --- a/src/doc/rustc/src/check-cfg/cargo-specifics.md +++ b/src/doc/rustc/src/check-cfg/cargo-specifics.md @@ -8,7 +8,7 @@ be an implementation detail, at least --check-cfg and the unexpected_cfgs are ow rustc, not Cargo. --> -This document is intented to summarize the principal ways Cargo interacts with +This document is intended to summarize the principal ways Cargo interacts with the `unexpected_cfgs` lint and `--check-cfg` flag. It is not intended to provide individual details, for that refer to the [`--check-cfg` documentation](../check-cfg.md) and to the [Cargo book](../../cargo/index.html). @@ -37,11 +37,11 @@ implementation detail and is therefor not documented in Cargo, we therefor do th *See the [`[lints]` section in the Cargo book][cargo-lints-table] for more details.* -When using a staticlly known custom config (ie. not dependant on a build-script), Cargo provides +When using a statically known custom config (ie. not dependant on a build-script), Cargo provides the custom lint config `check-cfg` under `[lints.rust.unexpected_cfgs]`. It can be used to set custom static [`--check-cfg`](../check-cfg.md) args, it is mainly useful when -the list of expected cfgs is known is advance. +the list of expected cfgs is known in advance. `Cargo.toml`: ```toml From 964e88555ba6a9fc41d3a19e114b77ed5064bad9 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 5 Jun 2024 13:34:21 -0700 Subject: [PATCH 2/2] Fix some wording in cargo-specifics.md --- src/doc/rustc/src/check-cfg/cargo-specifics.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/doc/rustc/src/check-cfg/cargo-specifics.md b/src/doc/rustc/src/check-cfg/cargo-specifics.md index e3b8b537c42c7..bd4bebbc874a6 100644 --- a/src/doc/rustc/src/check-cfg/cargo-specifics.md +++ b/src/doc/rustc/src/check-cfg/cargo-specifics.md @@ -3,7 +3,7 @@ @@ -17,7 +17,7 @@ to the [Cargo book](../../cargo/index.html). *See the [`[features]` section in the Cargo book][cargo-features] for more details.* -With the `[features]` table Cargo provides a mechanism to express conditional compilation and +With the `[features]` table, Cargo provides a mechanism to express conditional compilation and optional dependencies. Cargo *automatically* declares corresponding cfgs for every feature as expected. @@ -32,12 +32,12 @@ my_feature = [] ## `check-cfg` in `[lints.rust]` table - + *See the [`[lints]` section in the Cargo book][cargo-lints-table] for more details.* -When using a statically known custom config (ie. not dependant on a build-script), Cargo provides +When using a statically known custom config (i.e., not dependent on a build-script), Cargo provides the custom lint config `check-cfg` under `[lints.rust.unexpected_cfgs]`. It can be used to set custom static [`--check-cfg`](../check-cfg.md) args, it is mainly useful when