Make code slightly more uniform
This commit is contained in:
parent
2fbc08e2ce
commit
44f878d75f
1 changed files with 2 additions and 2 deletions
|
@ -590,7 +590,7 @@ impl<'a> Parser<'a> {
|
||||||
)
|
)
|
||||||
} else if expected.is_empty() {
|
} else if expected.is_empty() {
|
||||||
(
|
(
|
||||||
format!("unexpected token: {}", actual),
|
format!("unexpected token: {actual}"),
|
||||||
(self.prev_token.span, "unexpected token after this".to_string()),
|
(self.prev_token.span, "unexpected token after this".to_string()),
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -1497,7 +1497,7 @@ impl<'a> Parser<'a> {
|
||||||
MultiSugg {
|
MultiSugg {
|
||||||
msg: format!("use `{}= 1` instead", kind.op.chr()),
|
msg: format!("use `{}= 1` instead", kind.op.chr()),
|
||||||
patches: vec![
|
patches: vec![
|
||||||
(pre_span, format!("{{ let {} = ", tmp_var)),
|
(pre_span, format!("{{ let {tmp_var} = ")),
|
||||||
(post_span, format!("; {} {}= 1; {} }}", base_src, kind.op.chr(), tmp_var)),
|
(post_span, format!("; {} {}= 1; {} }}", base_src, kind.op.chr(), tmp_var)),
|
||||||
],
|
],
|
||||||
applicability: Applicability::HasPlaceholders,
|
applicability: Applicability::HasPlaceholders,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue