From f66f053c8513661917fc68f8e2631647373531a3 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 18 Jul 2024 12:27:43 -0400 Subject: [PATCH 1/3] Clarify how to disable warnings in deps --- src/building/new-target.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/building/new-target.md b/src/building/new-target.md index 4c58f303f..9e6aad3ed 100644 --- a/src/building/new-target.md +++ b/src/building/new-target.md @@ -141,6 +141,13 @@ to the `deny-warnings` setting in `config.toml`, the build may suddenly start to fail. To work around the warnings, you may want to disable `deny-warnings` in the config, or modify the dependency to remove the warnings. +```toml +# /config.toml +[rust] +deny-warnings = false +``` + + [`libc`]: https://crates.io/crates/libc [`cc`]: https://crates.io/crates/cc [patch]: https://doc.rust-lang.org/stable/cargo/reference/overriding-dependencies.html#the-patch-section From db318ea288ce82b091f756d1046d8066ea8eb6fd Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Mon, 23 Sep 2024 10:49:39 -0400 Subject: [PATCH 2/3] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> --- src/building/new-target.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/building/new-target.md b/src/building/new-target.md index 9e6aad3ed..f66c3b02e 100644 --- a/src/building/new-target.md +++ b/src/building/new-target.md @@ -142,7 +142,7 @@ to fail. To work around the warnings, you may want to disable `deny-warnings` in the config, or modify the dependency to remove the warnings. ```toml -# /config.toml +# config.toml [rust] deny-warnings = false ``` From 239b5acdde8f9bdf556b65e9394e11aedebebf1d Mon Sep 17 00:00:00 2001 From: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:59:17 +0200 Subject: [PATCH 3/3] elaborate on warnings --- src/building/new-target.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/building/new-target.md b/src/building/new-target.md index f66c3b02e..1d9fa1b52 100644 --- a/src/building/new-target.md +++ b/src/building/new-target.md @@ -138,8 +138,10 @@ After this, run `cargo update -p libc` to update the lockfiles. Beware that if you patch to a local `path` dependency, this will enable warnings for that dependency. Some dependencies are not warning-free, and due to the `deny-warnings` setting in `config.toml`, the build may suddenly start -to fail. To work around the warnings, you may want to disable `deny-warnings` -in the config, or modify the dependency to remove the warnings. +to fail. +To work around warnings, you may want to: +- Modify the dependency to remove the warnings +- Or for local development purposes, suppress the warnings by setting deny-warnings = false in config.toml. ```toml # config.toml @@ -147,7 +149,6 @@ in the config, or modify the dependency to remove the warnings. deny-warnings = false ``` - [`libc`]: https://crates.io/crates/libc [`cc`]: https://crates.io/crates/cc [patch]: https://doc.rust-lang.org/stable/cargo/reference/overriding-dependencies.html#the-patch-section