11use clippy_utils:: diagnostics:: span_lint_and_then;
22use itertools:: Itertools ;
3- use rustc_errors:: { Applicability , SuggestionStyle } ;
3+ use rustc_errors:: Applicability ;
44use rustc_lint:: LateContext ;
55use rustc_span:: { BytePos , Span } ;
66use std:: ops:: Range ;
@@ -59,12 +59,11 @@ pub(super) fn check(
5959 && ( doc_comment == "///" || doc_comment == "//!" )
6060 {
6161 // suggest filling in a blank line
62- diag. span_suggestion_with_style (
62+ diag. span_suggestion_verbose (
6363 line_break_span. shrink_to_lo ( ) ,
6464 "if this should be its own paragraph, add a blank doc comment line" ,
6565 format ! ( "\n {doc_comment}" ) ,
6666 Applicability :: MaybeIncorrect ,
67- SuggestionStyle :: ShowAlways ,
6867 ) ;
6968 if ccount > 0 || blockquote_level > 0 {
7069 diag. help ( "if this not intended to be a quote at all, escape it with `\\ >`" ) ;
@@ -79,12 +78,11 @@ pub(super) fn check(
7978 if ccount == 0 && blockquote_level == 0 {
8079 // simpler suggestion style for indentation
8180 let indent = list_indentation - lcount;
82- diag. span_suggestion_with_style (
81+ diag. span_suggestion_verbose (
8382 span. shrink_to_hi ( ) ,
8483 "indent this line" ,
8584 std:: iter:: repeat ( " " ) . take ( indent) . join ( "" ) ,
8685 Applicability :: MaybeIncorrect ,
87- SuggestionStyle :: ShowAlways ,
8886 ) ;
8987 diag. help ( "if this is supposed to be its own paragraph, add a blank line" ) ;
9088 return ;
@@ -107,12 +105,11 @@ pub(super) fn check(
107105 suggested. push_str ( text) ;
108106 }
109107 }
110- diag. span_suggestion_with_style (
108+ diag. span_suggestion_verbose (
111109 span,
112110 "add markers to start of line" ,
113111 suggested,
114112 Applicability :: MachineApplicable ,
115- SuggestionStyle :: ShowAlways ,
116113 ) ;
117114 diag. help ( "if this not intended to be a quote at all, escape it with `\\ >`" ) ;
118115 } ) ;
0 commit comments