clippy: fix up include_str! spans in diagnostics
This commit is contained in:
parent
4b10cb20bc
commit
24e1071d21
4 changed files with 8 additions and 9 deletions
|
|
@ -300,7 +300,7 @@ impl<'tcx> LateLintPass<'tcx> for StringLitAsBytes {
|
|||
e.span,
|
||||
"calling `as_bytes()` on `include_str!(..)`",
|
||||
"consider using `include_bytes!(..)` instead",
|
||||
snippet_with_applicability(cx, receiver.span, r#""foo""#, &mut applicability).replacen(
|
||||
snippet_with_applicability(cx, receiver.span.source_callsite(), r#""foo""#, &mut applicability).replacen(
|
||||
"include_str",
|
||||
"include_bytes",
|
||||
1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue