about summary refs log tree commit diff
diff options
context:
space:
mode:
authorllogiq <bogusandre@gmail.com>2025-01-17 21:30:54 +0000
committerGitHub <noreply@github.com>2025-01-17 21:30:54 +0000
commit10045db878644252c64175c326c4baf61a9202de (patch)
tree00679a3de37e346379130ed42d8506e8b6075e44
parente359e88088f2e60a883b11a4a167537a98c55467 (diff)
parent3f4aa9bf6e3816408c8a516d57010b5ae70728fe (diff)
downloadrust-10045db878644252c64175c326c4baf61a9202de.tar.gz
rust-10045db878644252c64175c326c4baf61a9202de.zip
Update doc wildcard_dependencies (#13810)
Currently
https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies
doc doesn't contain explanation how it should be so added more details

----

changelog: none
-rw-r--r--clippy_lints/src/cargo/mod.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/clippy_lints/src/cargo/mod.rs b/clippy_lints/src/cargo/mod.rs
index 96a2b161464..60371dcd771 100644
--- a/clippy_lints/src/cargo/mod.rs
+++ b/clippy_lints/src/cargo/mod.rs
@@ -161,6 +161,15 @@ declare_clippy_lint! {
     /// [dependencies]
     /// regex = "*"
     /// ```
+    /// Use instead:
+    /// ```toml
+    /// [dependencies]
+    /// # allow patch updates, but not minor or major version changes
+    /// some_crate_1 = "~1.2.3"
+    ///
+    /// # pin the version to a specific version
+    /// some_crate_2 = "=1.2.3"
+    /// ```
     #[clippy::version = "1.32.0"]
     pub WILDCARD_DEPENDENCIES,
     cargo,