11use  clippy_utils:: diagnostics:: span_lint_and_sugg; 
2- use  clippy_utils:: source:: { snippet ,  snippet_with_context} ; 
2+ use  clippy_utils:: source:: { snippet_with_applicability ,  snippet_with_context} ; 
33use  clippy_utils:: { SpanlessEq ,  is_lint_allowed,  peel_blocks_with_stmt,  sym} ; 
44use  rustc_errors:: Applicability ; 
55use  rustc_hir:: { Closure ,  Expr ,  ExprKind } ; 
@@ -147,9 +147,9 @@ fn get_and_then_snippets(
147147    msg_span :  Span , 
148148    app :  & mut  Applicability , 
149149)  -> AndThenSnippets  { 
150-     let  cx_snippet = snippet ( cx,  cx_span,  "cx" ) ; 
151-     let  lint_snippet = snippet ( cx,  lint_span,  ".." ) ; 
152-     let  span_snippet = snippet ( cx,  span_span,  "span" ) ; 
150+     let  cx_snippet = snippet_with_applicability ( cx,  cx_span,  "cx" ,  app ) ; 
151+     let  lint_snippet = snippet_with_applicability ( cx,  lint_span,  ".." ,  app ) ; 
152+     let  span_snippet = snippet_with_applicability ( cx,  span_span,  "span" ,  app ) ; 
153153    let  msg_snippet = snippet_with_context ( cx,  msg_span,  expr_ctxt,  r#""...""# ,  app) . 0 ; 
154154
155155    AndThenSnippets  { 
@@ -174,7 +174,8 @@ fn span_suggestion_snippets<'hir>(
174174)  -> SpanSuggestionSnippets  { 
175175    let  help_snippet = snippet_with_context ( cx,  span_call_args[ 1 ] . span ,  expr_ctxt,  r#""...""# ,  app) . 0 ; 
176176    let  sugg_snippet = snippet_with_context ( cx,  span_call_args[ 2 ] . span ,  expr_ctxt,  ".." ,  app) . 0 ; 
177-     let  applicability_snippet = snippet ( cx,  span_call_args[ 3 ] . span ,  "Applicability::MachineApplicable" ) ; 
177+     let  applicability_snippet =
178+         snippet_with_applicability ( cx,  span_call_args[ 3 ] . span ,  "Applicability::MachineApplicable" ,  app) ; 
178179
179180    SpanSuggestionSnippets  { 
180181        help :  help_snippet, 
0 commit comments