@@ -114,7 +114,7 @@ pub fn in_macro(span: Span) -> bool {
114114// sources that the user has no control over. 
115115// For some reason these attributes don't have any expansion info on them, so 
116116// we have to check it this way until there is a better way. 
117- pub  fn  is_present_in_source < ' a ,   T :  LintContext < ' a > > ( cx :  & T ,  span :  Span )  -> bool  { 
117+ pub  fn  is_present_in_source < T :  LintContext > ( cx :  & T ,  span :  Span )  -> bool  { 
118118    if  let  Some ( snippet)  = snippet_opt ( cx,  span)  { 
119119        if  snippet. is_empty ( )  { 
120120            return  false ; 
@@ -455,7 +455,7 @@ pub fn contains_name(name: Name, expr: &Expr) -> bool {
455455/// ```rust,ignore 
456456/// snippet(cx, expr.span, "..") 
457457/// ``` 
458- pub  fn  snippet < ' a ,  ' b ,   T :  LintContext < ' b > > ( cx :  & T ,  span :  Span ,  default :  & ' a  str )  -> Cow < ' a ,  str >  { 
458+ pub  fn  snippet < ' a ,  T :  LintContext > ( cx :  & T ,  span :  Span ,  default :  & ' a  str )  -> Cow < ' a ,  str >  { 
459459    snippet_opt ( cx,  span) . map_or_else ( || Cow :: Borrowed ( default) ,  From :: from) 
460460} 
461461
@@ -465,7 +465,7 @@ pub fn snippet<'a, 'b, T: LintContext<'b>>(cx: &T, span: Span, default: &'a str)
465465/// - If the span is inside a macro, change the applicability level to `MaybeIncorrect`. 
466466/// - If the default value is used and the applicability level is `MachineApplicable`, change it to 
467467/// `HasPlaceholders` 
468- pub  fn  snippet_with_applicability < ' a ,  ' b ,   T :  LintContext < ' b > > ( 
468+ pub  fn  snippet_with_applicability < ' a ,  T :  LintContext > ( 
469469    cx :  & T , 
470470    span :  Span , 
471471    default :  & ' a  str , 
@@ -487,12 +487,12 @@ pub fn snippet_with_applicability<'a, 'b, T: LintContext<'b>>(
487487
488488/// Same as `snippet`, but should only be used when it's clear that the input span is 
489489/// not a macro argument. 
490- pub  fn  snippet_with_macro_callsite < ' a ,  ' b ,   T :  LintContext < ' b > > ( cx :  & T ,  span :  Span ,  default :  & ' a  str )  -> Cow < ' a ,  str >  { 
490+ pub  fn  snippet_with_macro_callsite < ' a ,  T :  LintContext > ( cx :  & T ,  span :  Span ,  default :  & ' a  str )  -> Cow < ' a ,  str >  { 
491491    snippet ( cx,  span. source_callsite ( ) ,  default) 
492492} 
493493
494494/// Converts a span to a code snippet. Returns `None` if not available. 
495- pub  fn  snippet_opt < ' a ,   T :  LintContext < ' a > > ( cx :  & T ,  span :  Span )  -> Option < String >  { 
495+ pub  fn  snippet_opt < T :  LintContext > ( cx :  & T ,  span :  Span )  -> Option < String >  { 
496496    cx. sess ( ) . source_map ( ) . span_to_snippet ( span) . ok ( ) 
497497} 
498498
@@ -506,14 +506,14 @@ pub fn snippet_opt<'a, T: LintContext<'a>>(cx: &T, span: Span) -> Option<String>
506506/// ```rust,ignore 
507507/// snippet_block(cx, expr.span, "..") 
508508/// ``` 
509- pub  fn  snippet_block < ' a ,  ' b ,   T :  LintContext < ' b > > ( cx :  & T ,  span :  Span ,  default :  & ' a  str )  -> Cow < ' a ,  str >  { 
509+ pub  fn  snippet_block < ' a ,  T :  LintContext > ( cx :  & T ,  span :  Span ,  default :  & ' a  str )  -> Cow < ' a ,  str >  { 
510510    let  snip = snippet ( cx,  span,  default) ; 
511511    trim_multiline ( snip,  true ) 
512512} 
513513
514514/// Same as `snippet_block`, but adapts the applicability level by the rules of 
515515/// `snippet_with_applicabiliy`. 
516- pub  fn  snippet_block_with_applicability < ' a ,  ' b ,   T :  LintContext < ' b > > ( 
516+ pub  fn  snippet_block_with_applicability < ' a ,  T :  LintContext > ( 
517517    cx :  & T , 
518518    span :  Span , 
519519    default :  & ' a  str , 
@@ -524,7 +524,7 @@ pub fn snippet_block_with_applicability<'a, 'b, T: LintContext<'b>>(
524524} 
525525
526526/// Returns a new Span that covers the full last line of the given Span 
527- pub  fn  last_line_of_span < ' a ,   T :  LintContext < ' a > > ( cx :  & T ,  span :  Span )  -> Span  { 
527+ pub  fn  last_line_of_span < T :  LintContext > ( cx :  & T ,  span :  Span )  -> Span  { 
528528    let  source_map_and_line = cx. sess ( ) . source_map ( ) . lookup_line ( span. lo ( ) ) . unwrap ( ) ; 
529529    let  line_no = source_map_and_line. line ; 
530530    let  line_start = & source_map_and_line. sf . lines [ line_no] ; 
@@ -533,12 +533,7 @@ pub fn last_line_of_span<'a, T: LintContext<'a>>(cx: &T, span: Span) -> Span {
533533
534534/// Like `snippet_block`, but add braces if the expr is not an `ExprKind::Block`. 
535535/// Also takes an `Option<String>` which can be put inside the braces. 
536- pub  fn  expr_block < ' a ,  ' b ,  T :  LintContext < ' b > > ( 
537-     cx :  & T , 
538-     expr :  & Expr , 
539-     option :  Option < String > , 
540-     default :  & ' a  str , 
541- )  -> Cow < ' a ,  str >  { 
536+ pub  fn  expr_block < ' a ,  T :  LintContext > ( cx :  & T ,  expr :  & Expr ,  option :  Option < String > ,  default :  & ' a  str )  -> Cow < ' a ,  str >  { 
542537    let  code = snippet_block ( cx,  expr. span ,  default) ; 
543538    let  string = option. unwrap_or_default ( ) ; 
544539    if  in_macro_or_desugar ( expr. span )  { 
0 commit comments