about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlucarlig <luca.carlig@huawei.com>2024-02-26 14:37:17 +0400
committerlucarlig <luca.carlig@huawei.com>2024-02-26 18:59:05 +0400
commit80bafa5d45e7a2aaae5af94e93765b51464cfe72 (patch)
tree82cfd49b09c2ffd57ff743d443916d385d2fd171
parenta2c1d565e576efb5f3abce367723711afe65c8cd (diff)
downloadrust-80bafa5d45e7a2aaae5af94e93765b51464cfe72.tar.gz
rust-80bafa5d45e7a2aaae5af94e93765b51464cfe72.zip
add cargo.toml lint section way of adding lints
-rw-r--r--book/src/configuration.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/book/src/configuration.md b/book/src/configuration.md
index 05520346456..0dd4fa62467 100644
--- a/book/src/configuration.md
+++ b/book/src/configuration.md
@@ -79,6 +79,15 @@ interested in:
 cargo clippy -- -A clippy::all -W clippy::useless_format -W clippy::...
 ```
 
+The last way to allow/disallow lints is to use `Cargo.toml` using [the lints section](https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-lints-section)):
+
+To deny `clippy::enum_glob_use`
+
+```toml
+[lints.clippy]
+enum_glob_use = "deny"
+```
+
 ### Specifying the minimum supported Rust version
 
 Projects that intend to support old versions of Rust can disable lints pertaining to newer features by specifying the