File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -539,8 +539,11 @@ impl<'a> DiagnosticWrapper<'a> {
539
539
fn docs_link ( & mut self , lint : & ' static Lint ) {
540
540
if env:: var ( "CLIPPY_DISABLE_DOCS_LINKS" ) . is_err ( ) {
541
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" ) ,
542
+ "for further information visit https://rust-lang.github.io/rust-clippy/{}/index.html#{}" ,
543
+ & 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
+ } ) ,
544
547
lint. name_lower( ) . replacen( "clippy::" , "" , 1 )
545
548
) ) ;
546
549
}
You can’t perform that action at this time.
0 commit comments