File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ static GROUP_DESCRIPTIONS: &[(&str, &str)] = &[
28
28
( "deprecated-safe" , "Lints for functions which were erroneously marked as safe in the past" ) ,
29
29
] ;
30
30
31
+ pub fn exists ( name : & str ) -> bool {
32
+ GROUP_DESCRIPTIONS . iter ( ) . any ( |& ( n, _) | n == name)
33
+ }
34
+
31
35
type LintGroups = BTreeMap < String , BTreeSet < String > > ;
32
36
33
37
impl < ' a > LintExtractor < ' a > {
Original file line number Diff line number Diff line change @@ -584,9 +584,15 @@ impl<'a> LintExtractor<'a> {
584
584
fn add_renamed_lints ( lints : & mut Vec < Lint > ) {
585
585
for ( level, names) in RENAMES {
586
586
for ( from, to) in * names {
587
+ let doc = if groups:: exists ( to) {
588
+ format ! ( "The lint `{from}` has been renamed to the group `{to}`." )
589
+ } else {
590
+ format ! ( "The lint `{from}` has been renamed to [`{to}`](#{to})." )
591
+ } ;
592
+
587
593
lints. push ( Lint {
588
594
name : from. to_string ( ) ,
589
- doc : vec ! [ format! ( "The lint `{from}` has been renamed to [`{to}`](#{to})." ) ] ,
595
+ doc : vec ! [ doc ] ,
590
596
level : * level,
591
597
path : PathBuf :: new ( ) ,
592
598
lineno : 0 ,
You can’t perform that action at this time.
0 commit comments