1
1
use clippy_utils:: diagnostics:: span_lint_and_then;
2
2
use itertools:: Itertools ;
3
- use rustc_errors:: { Applicability , SuggestionStyle } ;
3
+ use rustc_errors:: Applicability ;
4
4
use rustc_lint:: LateContext ;
5
5
use rustc_span:: { BytePos , Span } ;
6
6
use std:: ops:: Range ;
@@ -59,12 +59,11 @@ pub(super) fn check(
59
59
&& ( doc_comment == "///" || doc_comment == "//!" )
60
60
{
61
61
// suggest filling in a blank line
62
- diag. span_suggestion_with_style (
62
+ diag. span_suggestion_verbose (
63
63
line_break_span. shrink_to_lo ( ) ,
64
64
"if this should be its own paragraph, add a blank doc comment line" ,
65
65
format ! ( "\n {doc_comment}" ) ,
66
66
Applicability :: MaybeIncorrect ,
67
- SuggestionStyle :: ShowAlways ,
68
67
) ;
69
68
if ccount > 0 || blockquote_level > 0 {
70
69
diag. help ( "if this not intended to be a quote at all, escape it with `\\ >`" ) ;
@@ -79,12 +78,11 @@ pub(super) fn check(
79
78
if ccount == 0 && blockquote_level == 0 {
80
79
// simpler suggestion style for indentation
81
80
let indent = list_indentation - lcount;
82
- diag. span_suggestion_with_style (
81
+ diag. span_suggestion_verbose (
83
82
span. shrink_to_hi ( ) ,
84
83
"indent this line" ,
85
84
std:: iter:: repeat ( " " ) . take ( indent) . join ( "" ) ,
86
85
Applicability :: MaybeIncorrect ,
87
- SuggestionStyle :: ShowAlways ,
88
86
) ;
89
87
diag. help ( "if this is supposed to be its own paragraph, add a blank line" ) ;
90
88
return ;
@@ -107,12 +105,11 @@ pub(super) fn check(
107
105
suggested. push_str ( text) ;
108
106
}
109
107
}
110
- diag. span_suggestion_with_style (
108
+ diag. span_suggestion_verbose (
111
109
span,
112
110
"add markers to start of line" ,
113
111
suggested,
114
112
Applicability :: MachineApplicable ,
115
- SuggestionStyle :: ShowAlways ,
116
113
) ;
117
114
diag. help ( "if this not intended to be a quote at all, escape it with `\\ >`" ) ;
118
115
} ) ;
0 commit comments