We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 42da194 + 87ec058 commit 2f6881cCopy full SHA for 2f6881c
clippy_lints/src/utils/mod.rs
@@ -539,8 +539,11 @@ impl<'a> DiagnosticWrapper<'a> {
539
fn docs_link(&mut self, lint: &'static Lint) {
540
if env::var("CLIPPY_DISABLE_DOCS_LINKS").is_err() {
541
self.0.help(&format!(
542
- "for further information visit https://rust-lang.github.io/rust-clippy/v{}/index.html#{}",
543
- env!("CARGO_PKG_VERSION"),
+ "for further information visit https://rust-lang.github.io/rust-clippy/{}/index.html#{}",
+ &option_env!("RUST_RELEASE_NUM").map_or("master".to_string(), |n| {
544
+ // extract just major + minor version and ignore patch versions
545
+ format!("rust-{}", n.rsplitn(2, '.').nth(1).unwrap())
546
+ }),
547
lint.name_lower().replacen("clippy::", "", 1)
548
));
549
}
0 commit comments