22344 Commits

Author SHA1 Message Date
Weihang Lo 230e325f0b fix(config): [env] relative paths definition (#16957)
### What does this PR try to resolve?

`EnvConfigValue` was wrapped in `Value<T>`,
which captured the table-level `Definition` for path resolution.

1. In `merge_helper`,
we merge all keys in a table but not the definition of the table itself:

<https://github.com/rust-lang/cargo/blob/60960cbe4148295890ccd0f2890c2fb5dd9a0914/src/cargo/util/context/config_value.rs?plain=1#L177-L199>

It is probably hard to defined the source definition of a merged struct
though, perhaps people shouldn't access it to do anything meaningful.

2. When deserializing a `[env]` struct with `Value<T>`,
   `Value<T>` delegate to `ValueDeserializer` to deserialize the value,
   which only takes the struct definition into account.
   And that turns out to be the stale table definition:

<https://github.com/rust-lang/cargo/blob/60960cbe4148295890ccd0f2890c2fb5dd9a0914/src/cargo/util/context/de.rs?plain=1#L119-L137>

3. Unlike file config discovery,
   `include` is loaded before the including config,
   hence its definition is stale and is used.

This caused in rust-lang/cargo#16954 that `[env]` struct got a stale old
config source definition.

### How to test and review this PR?

New regression tests should have covered cases in
<https://github.com/rust-lang/cargo/issues/16954>, and also captured the
non-canonicalized case which is a separate issue.

This fix doesn't touch the core problem that a merged `Value<T>` table
holds a stale source definition. Holding either new or old doesn't seem
correct to me, as it is a merged one. This is really a footgun.

Fixes rust-lang/cargo#16954
2026-05-05 04:09:25 +00:00
Weihang Lo b8ba2f003e fix(config): [env] relative paths definition
`EnvConfigValue` was wrapped in `Value<T>`,
which captured the table-level `Definition` for path resolution.

1. In merge_helper,
   we merge all keys in a table but not the definition of the table itself:
   <https://github.com/rust-lang/cargo/blob/60960cbe4148295890ccd0f2890c2fb5dd9a0914/src/cargo/util/context/config_value.rs?plain=1#L177-L199>

   It is probably hard to defined the source definition of a merged struct though, perhaps people shouldn't access it to do anything meaningful.

2. When deserializing a `[env]` struct with `Value<T>`,
   `Value<T>` delegate to `ValueDeserializer` to deserialize the value,
   which only takes the struct definition into account.
   And that turns out to be the stale table definition:
   <https://github.com/rust-lang/cargo/blob/60960cbe4148295890ccd0f2890c2fb5dd9a0914/src/cargo/util/context/de.rs?plain=1#L119-L137>

3. Unlike file config discovery,
   `include` is loaded before the including config,
   hence its definition is stale and is used.

This caused in rust-lang/cargo#16954
that `[env]` struct got a stale old config source definition.

This fix doesn't touch the core problem that
A merged `Value<T>` table holds a stale source definition.
Holding either new or old doesn't seem correct to me,
as it is a merged one. This is really a footgun.
2026-05-04 21:43:13 -04:00
Weihang Lo b4a488ce63 test(config): [env] relative paths definition
https://github.com/rust-lang/cargo/issues/16954
2026-05-04 21:41:41 -04:00
Ed Page 5fbaf43c48 fix(config): normalize included config paths (#16964)
### What does this PR try to resolve?

Extracted from <https://github.com/rust-lang/cargo/pull/16957>.

Without normalizing included config paths,
`Definition::root()` will do `parent().parent()`
on non-normalized paths containing `..` segments.
And that will remove `..` and result in wrong path resolution.

### How to test and review this PR?

Two tested are added to showcase the buggy behavior, especially
`env_relative_path_included_from_upper_level` which was a wrong path
resolution.
2026-05-04 23:25:34 +00:00
Weihang Lo e4e626924c fix(config): normalize included config paths
Without normalizing included config paths,
`Definition::root()` will do `parent().parent()`
on non-normalized paths containing `..` segments.
And that will remove `..` and result in wrong path resolution.
2026-05-04 17:54:12 -04:00
Weihang Lo c14ccdf9f0 test(config): [env] relative paths definition
https://github.com/rust-lang/cargo/issues/16954
2026-05-04 17:39:04 -04:00
Weihang Lo 29af5bea54 Fix heading level of build.warnings documentation. (#16961)
### What does this PR try to resolve?

The hierarchy of the configuration documentation is incorrect.
`build.warnings` needs to be one deeper to be under the `[build]`
section.

### How to test and review this PR?

You can check the outline as GitHub sees it at
<https://github.com/kpreid/cargo/blob/99fbe956ab2a42a81a458ace66114d033d6da9f2/src/doc/src/reference/config.md>.
I haven’t built the book to test that, but the fix seems obvious enough.
2026-05-04 18:01:47 +00:00
Kevin Reid 99fbe956ab Fix heading level of build.warnings documentation.
It needs to be one deeper to be under the `[build]` section.
2026-05-04 09:27:31 -07:00
Eric Huss 4f9b520753 chore(deps): update compatible (#16952)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [blake3](https://redirect.github.com/BLAKE3-team/BLAKE3) |
workspace.dependencies | patch | `1.8.4` → `1.8.5` |
| [clap](https://redirect.github.com/clap-rs/clap) |
workspace.dependencies | patch | `4.6.0` → `4.6.1` |
| [clap_complete](https://redirect.github.com/clap-rs/clap) |
workspace.dependencies | patch | `4.6.0` → `4.6.3` |
| [openssl-src](https://redirect.github.com/alexcrichton/openssl-src-rs)
| workspace.dependencies | minor | `=300.5.4` → `=300.6.0` |
| [snapbox](https://redirect.github.com/assert-rs/snapbox) |
workspace.dependencies | patch | `1.2.0` → `1.2.1` |
| [toml_edit](https://redirect.github.com/toml-rs/toml) |
workspace.dependencies | patch | `0.25.10+spec-1.1.0` → `0.25.11` |

---

### Release Notes

<details>
<summary>BLAKE3-team/BLAKE3 (blake3)</summary>

###
[`v1.8.5`](https://redirect.github.com/BLAKE3-team/BLAKE3/releases/tag/1.8.5)

[Compare
Source](https://redirect.github.com/BLAKE3-team/BLAKE3/compare/1.8.4...1.8.5)

version 1.8.5

Changes since 1.8.4:

- Forcibly disable LTO when compiling C intrinsics from the Rust build.
  This fixes a build break on Arch Linux ARM:

[#&#8203;550](https://redirect.github.com/BLAKE3-team/BLAKE3/issues/550)

</details>

<details>
<summary>clap-rs/clap (clap)</summary>

###
[`v4.6.1`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#461---2026-04-15)

[Compare
Source](https://redirect.github.com/clap-rs/clap/compare/v4.6.0...v4.6.1)

##### Fixes

- *(derive)* Ensure rebuilds happen when an read env variable is changed

</details>

<details>
<summary>alexcrichton/openssl-src-rs (openssl-src)</summary>

###
[`v300.6.0`](https://redirect.github.com/alexcrichton/openssl-src-rs/compare/300.5.5+3.5.5...300.6.0+3.6.2)

[Compare
Source](https://redirect.github.com/alexcrichton/openssl-src-rs/compare/300.5.5+3.5.5...300.6.0+3.6.2)

###
[`v300.5.5`](https://redirect.github.com/alexcrichton/openssl-src-rs/compare/300.5.4+3.5.4...300.5.5+3.5.5)

[Compare
Source](https://redirect.github.com/alexcrichton/openssl-src-rs/compare/300.5.4+3.5.4...300.5.5+3.5.5)

</details>

<details>
<summary>assert-rs/snapbox (snapbox)</summary>

###
[`v1.2.1`](https://redirect.github.com/assert-rs/snapbox/compare/snapbox-v1.2.0...snapbox-v1.2.1)

[Compare
Source](https://redirect.github.com/assert-rs/snapbox/compare/snapbox-v1.2.0...snapbox-v1.2.1)

</details>

<details>
<summary>toml-rs/toml (toml_edit)</summary>

###
[`v0.25.11`](https://redirect.github.com/toml-rs/toml/compare/v0.25.10...v0.25.11)

[Compare
Source](https://redirect.github.com/toml-rs/toml/compare/v0.25.10...v0.25.11)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 5am on the first day of the month"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rust-lang/cargo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNTkuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE1OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2026-05-01 22:36:41 +00:00
Weihang Lo 6fba4bb5f0 feat(lints): Add deny-by-default text_direction_codepoint lints (#16950)
### What does this PR try to resolve?

These are meant to mirror
-
https://doc.rust-lang.org/nightly/rustc/lints/listing/deny-by-default.html#text-direction-codepoint-in-comment
-
https://doc.rust-lang.org/nightly/rustc/lints/listing/deny-by-default.html#text-direction-codepoint-in-literal

Note: on publish we strip comments but the codepoints will still be
unescaped in literals. I considered escaping by default in `toml` but
there can be legitimate reasons to use these code points unescaped,
hence why there are two lints.

Fixes #16374
Fixes #16373

Closes #16452

### How to test and review this PR?
2026-05-01 22:09:56 +00:00
Eric Huss bf714730ec Update remaining dependencies
Updating cargo-platform v0.3.2 -> v0.3.3
Updating cmov v0.5.2 -> v0.5.3
Updating ctutils v0.4.0 -> v0.4.2
Updating gix-fs v0.21.0 -> v0.21.1
Updating hybrid-array v0.4.10 -> v0.4.11
Updating idna_adapter v1.2.1 -> v1.2.2
Updating js-sys v0.3.95 -> v0.3.97
Updating leb128 v0.2.5 -> v0.2.6
Updating orion v0.17.13 -> v0.17.14
Updating rand v0.9.2 -> v0.9.4
Updating rayon v1.11.0 -> v1.12.0
Updating reqwest v0.13.2 -> v0.13.3
Updating rustls v0.23.39 -> v0.23.40
Updating sqlite-wasm-rs v0.5.2 -> v0.5.3
Updating wasm-bindgen v0.2.118 -> v0.2.120
Updating wasm-bindgen-futures v0.4.68 -> v0.4.70
Updating wasm-bindgen-macro v0.2.118 -> v0.2.120
Updating wasm-bindgen-macro-support v0.2.118 -> v0.2.120
Updating wasm-bindgen-shared v0.2.118 -> v0.2.120
Updating web-sys v0.3.95 -> v0.3.97
2026-05-01 14:36:28 -07:00
Eric Huss ecb08e8f57 Update curl-sys to 0.4.88
This updates curl-sys to get curl 8.20.0 which contains a number of
fixes. See https://github.com/alexcrichton/curl-rust/pull/649

This also switches to a newer version of windows-sys which uses
raw-dylib instead.
2026-05-01 14:35:39 -07:00
Ed Page 612527df70 feat(lints): text_direction_codepoint_in_literal lint
Fixes #16373
2026-05-01 16:33:56 -05:00
enthropy7 a3ca5ff5d4 feat(lints): text_direction_codepoint_in_comment lint
Fixes #16374
2026-05-01 16:33:56 -05:00
enthropy7 3a9438f485 test(lints): Establish cases for text direction codepoint lints 2026-05-01 16:33:56 -05:00
Eric Huss 081aa5a8f9 Unpin opeensl-src
300.6.0 contains OpenSSL 3.6.2 which contains the fix
https://github.com/openssl/openssl/pull/29827 that should resolve the
ppc64 issue.
2026-05-01 14:30:49 -07:00
Eric Huss cb222b49a9 chore(deps): update embarkstudios/cargo-deny-action action to v2.0.17 (#16953)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[EmbarkStudios/cargo-deny-action](https://redirect.github.com/EmbarkStudios/cargo-deny-action)
| action | patch | `v2.0.15` → `v2.0.17` |

---

### Release Notes

<details>
<summary>EmbarkStudios/cargo-deny-action
(EmbarkStudios/cargo-deny-action)</summary>

###
[`v2.0.17`](https://redirect.github.com/EmbarkStudios/cargo-deny-action/releases/tag/v2.0.17):
Release 2.0.17 - cargo-deny 0.19.2

[Compare
Source](https://redirect.github.com/EmbarkStudios/cargo-deny-action/compare/v2.0.16...v2.0.17)

##### Fixed

-
[PR#845](https://redirect.github.com/EmbarkStudios/cargo-deny/pull/845)
fixed structural issues with SARIF output, resolving
[#&#8203;818](https://redirect.github.com/EmbarkStudios/cargo-deny/issues/818).
Thanks
[@&#8203;KyleChamberlin](https://redirect.github.com/KyleChamberlin)!

###
[`v2.0.16`](https://redirect.github.com/EmbarkStudios/cargo-deny-action/releases/tag/v2.0.16):
Release 2.0.16 - cargo-deny 0.19.1

[Compare
Source](https://redirect.github.com/EmbarkStudios/cargo-deny-action/compare/v2.0.15...v2.0.16)

##### Fixed

-
[PR#833](https://redirect.github.com/EmbarkStudios/cargo-deny/pull/833)
fixed an issue where the maximum advisory database staleness was over 14
years instead of the intended 90 days.
-
[PR#839](https://redirect.github.com/EmbarkStudios/cargo-deny/pull/839)
fixed an issue where unsound advisories would appear for transitive
dependencies despite requesting them only for workspace dependencies,
resolving
[#&#8203;829](https://redirect.github.com/EmbarkStudios/cargo-deny/issues/829).
-
[PR#840](https://redirect.github.com/EmbarkStudios/cargo-deny/pull/840)
resolved
[#&#8203;797](https://redirect.github.com/EmbarkStudios/cargo-deny/issues/797)
by passing `--filter-platform` when collecting cargo metadata if only a
single target was requested either in the config or via the command
line.
-
[PR#841](https://redirect.github.com/EmbarkStudios/cargo-deny/pull/841)
fixed an issue where `--frozen` would not disable fetching of the
advisory DB, resolving
[#&#8203;759](https://redirect.github.com/EmbarkStudios/cargo-deny/issues/759).
-
[PR#842](https://redirect.github.com/EmbarkStudios/cargo-deny/pull/842)
and
[PR#844](https://redirect.github.com/EmbarkStudios/cargo-deny/pull/844)
updated crates. Notably `krates` was updated to resolve two issues with
crates being pruned from the graph used when running checks. Resolving
these two issues may mean that updating cargo-deny may highlight issues
that were previously hidden.
-
[EmbarkStudios/krates#106](https://redirect.github.com/EmbarkStudios/krates/issues/106)
would fail to pull in crates brought in via a feature if that crate had
its `lib` target renamed by the package author.
-
[EmbarkStudios/krates#109](https://redirect.github.com/EmbarkStudios/krates/issues/109)
would fail to bring in optional dependencies if they were brought in by
a weak feature in a crate *also* brought in by a weak feature.

##### Changed

-
[PR#830](https://redirect.github.com/EmbarkStudios/cargo-deny/pull/830)
removed `gix` in favor of shelling out to `git`. This massively improves
build times and eases maintenance as `gix` bumps minor versions quite
frequently. If cargo-deny is used in an environment that for some reason
allows internet access but doesn't have `git` available, the advisory
database would need to be updated before calling cargo-deny.
-
[PR#838](https://redirect.github.com/EmbarkStudios/cargo-deny/pull/838)
removed `rustsec` in favor of manually implemented advisory parsing and
checking, with a nightly cron job that checks that the implementation
exactly matches rustsec on the official rustsec advisory db.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 5am on the first day of the month"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rust-lang/cargo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNTkuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE1OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2026-05-01 10:04:37 +00:00
renovate[bot] fab92f5e06 chore(deps): update embarkstudios/cargo-deny-action action to v2.0.17 2026-05-01 03:36:35 +00:00
renovate[bot] 6a10f9d664 chore(deps): update compatible 2026-05-01 03:36:29 +00:00
Weihang Lo 60960cbe41 docs(guide): Switch from third-party to first-party unused deps detection (#16946)
### What does this PR try to resolve?

With #16938 merged, the quality is high enough to generally recommend,
even to dig through potential false positives.

### How to test and review this PR?
2026-04-29 20:10:55 +00:00
Weihang Lo bbc9162a83 Remove curl dependency from crates-io crate (#16936)
### What does this PR try to resolve?

Converts the crates-io crate to be HTTP Client agnostic. It now uses a
trait to execute HTTP requests. This enables users of the library to use
any HTTP library they like, rather than only supporting `curl`.

Within cargo, an `HttpClient` using `http_async` is added (which uses
curl internally).

cc #16845

### How to test and review this PR?

Commit by commit. Could be tested on on live crates.io, but I have not
done this.
2026-04-28 17:00:03 +00:00
Arlo Siemsen 9efb2beec5 Convert crates-io crate to use http_async
This is a breaking change in the crates-io crate.

It removes the dependency on curl. Users using this crate will need
to provide their own implementation of the HttpClient trait using
curl or another http request library.
2026-04-28 10:51:29 -05:00
Arlo Siemsen dc905272ab Add non_exhaustive to Error enum 2026-04-28 10:51:29 -05:00
Arlo Siemsen 62fe7be45b Add enum for crates.io token errors 2026-04-28 10:51:29 -05:00
Arlo Siemsen 55bce970a0 Only set upload when the body has non-zero length
This is needed since in our testing framework we use
file:// URLs. With upload(true), the test files are overwritten as empty
before they are read. This leads to the yank tests failing.

In a real (non-file://) registry api, this would have no impact.
2026-04-28 10:51:29 -05:00
Arlo Siemsen 7ad82eb762 Add timeout to request_blocking
The request_blocking method does not use the `Client`-level
timeout management, since it blocks, running the request
on the current thread. This leaves the request_blocking
method with no timeout configured.

The change adds the timeout for consistency with the `http::http_handle`
method.
2026-04-28 10:51:29 -05:00
Ed Page 8c06287fae docs(guide): Switch from third-party to first-party unused deps detection
With #16938 merged, the quality is high enough to generally recommend,
even to dig through potential false positives.
2026-04-28 10:35:49 -05:00
Weihang Lo 9ec6002f06 chore(deps): update gix to 0.83 (#16945)
Note that the existing version (0.82.0) is yanked.
2026-04-28 14:54:56 +00:00
Weihang Lo 00c3cceeb4 fix(compile): Where possible, hint about misplaced deps (#16940)
### What does this PR try to resolve?

Sometimes a normal dependency is actually a dev-dependency.
For any of the dev-dependencies we build, we can let users know that an
unused dep might be a misplaced dep. This check came from #8437 but I
originally punted on it due to the complexity of having the right
information. Through the refactors done in this, I found it became easy
to report this. The help could be improved to show the insertion of the
dev-dependency with a removal of the normal dependency but that is being
left to a future exercise to limit the scope of this.

This also improves the quality of the logged messages for people who are
ok with the false positives that we can't report.

### How to test and review this PR?
2026-04-28 14:14:19 +00:00
Arlo Siemsen e487cf766e chore(deps): update gix to 0.83 2026-04-28 09:07:55 -05:00
Ed Page 6f0317a932 fix(compile): Where possible, hint about misplaced deps
Sometimes a normal dependency is actually a dev-dependency.
For any of the dev-dependencies we build, we can let users know that an
unused dep might be a misplaced dep.
2026-04-28 08:37:06 -05:00
Ed Page 2ae1bfdf6c test(lints): Show implicit dev behavior with --all-targets 2026-04-28 08:37:06 -05:00
Ed Page 01d77a4cc6 refactor(compile): Reduce trace noise from normal deps inherited in dev 2026-04-28 08:37:06 -05:00
Ed Page 9eb7311e5a refactor(compile): Reduce redundant checks
Through the re-ordering of things,
the check has become redundant and can be removed.
2026-04-28 08:37:05 -05:00
Ed Page a023b10e5e refactor(compile): Consolidate untracked checks 2026-04-28 08:36:19 -05:00
Ed Page 06db11079d refactor(compile): Consolidate almost all lint applicability checks 2026-04-28 08:36:19 -05:00
Ed Page 06a8aa7a22 refactor(compile): Iterate over unused externs, rather than all externs
The one side effect is we won't list used export in traces.
2026-04-28 08:36:19 -05:00
Ed Page 6c84e950ec refactor(compile): Track unused deps as we go
Instead of saving off all unused externs and checking the externs
against them,
let's take the intersection of the unused externs.

This makes the logging messages much better for unreported unused
externs.
2026-04-28 08:36:18 -05:00
Arlo Siemsen 38dba85b34 Remove windows-sys from home (#16918)
### What does this PR try to resolve?

This replaces the windows specific implementation of home with the one
from std::env::home_dir as it logically matches, allowing the removal of
the windows-sys dependency.

### How to test and review this PR?

~Run the `test_with_without` unit test to confirm it works the same.~
`home` doesn't contain any tests itself as
https://github.com/rust-lang/cargo/pull/16918#issuecomment-4289165369
requested I remove the target specific code, presumably windows CI will
break if the std implementation is different in some way.
2026-04-28 02:39:28 +00:00
Eric Huss cd4abae4fc docs(resolver): --precise <yanked> is on stable (#16944)
*
https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html#cargo-180-2024-07-25
* https://github.com/rust-lang/cargo/pull/13974
2026-04-28 01:11:11 +00:00
Weihang Lo 8918258e3f docs(resolver): --precise <yanked> is on stable 2026-04-27 20:34:27 -04:00
Jake Shadle 5bc96802aa Address feedback 2026-04-27 10:23:14 +02:00
Jake Shadle af21c3f833 Remove windows-sys dependency from home
The std implementation of std::env::home_dir uses the same logic as home's windows specific implementation, so it can be removed entirely, getting rid of the windows-sys dependency
2026-04-27 10:09:49 +02:00
Weihang Lo 3c4678d6a9 Update gix to 0.82 (with security fixes and hardened parsers) (#16941)
This seems to have been an eventless update locally.

### Tasks

* [x] pass CI
2026-04-25 04:08:01 +00:00
Sebastian Thiel 9947f12543 Update gix to 0.82 (with security fixes and hardened parsers) 2026-04-25 10:28:27 +08:00
Weihang Lo eb9b60f1f6 chore: Remove unused deps (#16938)
### What does this PR try to resolve?

Likely won't make an impact to build times since these dependencies are
still used somewhere but they at least make things clearer. Maybe people
using these crates as libraries can benefit.

### How to test and review this PR?

As found by
```
CARGO_LOG=cargo::core::compiler::unused_deps=debug nargo check --workspace
```
2026-04-24 20:52:07 +00:00
Weihang Lo e5de173a30 feat(compile): Stabilize build.warnings (#16796)
*[View all
comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/cargo/pull/16796)*

### What does this PR try to resolve?

This allows users to either
- hide warnings (#14258)
- error on warnings (#8424)

`build.warnings` serves a similar purpose as `RUSTFLAGS=-Dwarnings` /
`RUSTFLAGS=-Awarnings` but without invalidation caches.

`build.warnings = "deny"` will
- only errors for lint warnings and not hard warnings
- only errors for local warnings and not non-local warnings visible with
`--verbose --verbose`
- stop the build without `--keep-going`

(this matches `RUSTFLAGS=-Dwarnings`)

These conditions were not originally met and also came as feedback from
rust-lang/rust which has been dogfooding this since the merge of
rust-lang/rust#148332.

`build.warnings = "allow"` will
- only hide lint warnings and not hard warnings
  - Note: `RUSTFLAGS=-Awarnings` will suppress rustc hard warnings
- hide non-local warnings for `--verbose --verbose`
- hide the warning summary line (number of warnings per crate)

Closes #14802

### How to test and review this PR?

My main concern over this was how the naming scheme would extend to
https://github.com/rust-lang/rfcs/pull/3730 but that RFC has not gained
much interest

`build` seems as good of a home as any.
2026-04-24 20:35:58 +00:00
Ed Page 71aa9d8699 refactor(compile): Track unused_externs as a Set 2026-04-24 11:56:10 -05:00
Ed Page 4269047090 chore(rustfix): Bump version 2026-04-24 11:35:17 -05:00
Ed Page e9aff3453b refactor(compile): Be consistent in unused_externs type 2026-04-24 11:34:50 -05:00