Skip to content

Commit 0ca60e9

Browse files
committed
Auto merge of #13881 - Muscraft:lints-unstable-docs, r=weihanglo
chore: Add cargo-lints to unstable docs When originally implementing a linting system for `cargo`, I missed adding it to the unstable docs. This PR adds (basic) documentation for `[lints.cargo]`/`-Zcargo-lints` to the unstable docs.
2 parents e6603b7 + b345514 commit 0ca60e9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: src/doc/src/reference/unstable.md

+22
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ For the latest nightly, see the [nightly version] of this page.
9898
* [artifact dependencies](#artifact-dependencies) --- Allow build artifacts to be included into other build artifacts and build them for different targets.
9999
* [Edition 2024](#edition-2024) — Adds support for the 2024 Edition.
100100
* [Profile `trim-paths` option](#profile-trim-paths-option) --- Control the sanitization of file paths in build outputs.
101+
* [`[lints.cargo]`](#lintscargo) --- Allows configuring lints for Cargo.
101102
* Information and metadata
102103
* [Build-plan](#build-plan) --- Emits JSON information on which commands will be run.
103104
* [unit-graph](#unit-graph) --- Emits JSON for Cargo's internal graph structure.
@@ -1521,6 +1522,27 @@ cargo-features = ["open-namespaces"]
15211522
# ...
15221523
```
15231524

1525+
## `[lints.cargo]`
1526+
1527+
* Tracking Issue: [#12235](https://github.com/rust-lang/cargo/issues/12235)
1528+
1529+
A new `lints` tool table for `cargo` that can be used to configure lints emitted
1530+
by `cargo` itself when `-Zcargo-lints` is used
1531+
```toml
1532+
[lints.cargo]
1533+
implicit-features = "warn"
1534+
```
1535+
1536+
This will work with
1537+
[RFC 2906 `workspace-deduplicate`](https://rust-lang.github.io/rfcs/2906-cargo-workspace-deduplicate.html):
1538+
```toml
1539+
[workspace.lints.cargo]
1540+
implicit-features = "warn"
1541+
1542+
[lints]
1543+
workspace = true
1544+
```
1545+
15241546
# Stabilized and removed features
15251547

15261548
## Compile progress

0 commit comments

Comments
 (0)