Merge commit '20b085d500
' into clippy-subtree-update
This commit is contained in:
parent
fc15bc169e
commit
80c6f8ff7b
124 changed files with 1666 additions and 757 deletions
|
@ -10,7 +10,7 @@ use super::SINGLE_CHAR_ADD_STR;
|
|||
/// lint for length-1 `str`s as argument for `insert_str`
|
||||
pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, receiver: &hir::Expr<'_>, args: &[hir::Expr<'_>]) {
|
||||
let mut applicability = Applicability::MachineApplicable;
|
||||
if let Some(extension_string) = get_hint_if_single_char_arg(cx, &args[1], &mut applicability) {
|
||||
if let Some(extension_string) = get_hint_if_single_char_arg(cx, &args[1], &mut applicability, false) {
|
||||
let base_string_snippet =
|
||||
snippet_with_applicability(cx, receiver.span.source_callsite(), "_", &mut applicability);
|
||||
let pos_arg = snippet_with_applicability(cx, args[0].span, "..", &mut applicability);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue