1
Fork 0

Some "parenthesis" and "parentheses" fixes

This commit is contained in:
r00ster91 2021-10-17 12:04:01 +02:00
parent 7fbd4ce276
commit 3c1d55422a
30 changed files with 100 additions and 100 deletions

View file

@ -300,7 +300,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let end = callee_span.shrink_to_hi();
err.multipart_suggestion(
"if you meant to create this closure and immediately call it, surround the \
closure with parenthesis",
closure with parentheses",
vec![(start, "(".to_string()), (end, ")".to_string())],
Applicability::MaybeIncorrect,
);
@ -383,7 +383,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
call_expr.span,
&format!(
"`{}` is a unit variant, you need to write it \
without the parenthesis",
without the parentheses",
path
),
path.to_string(),

View file

@ -492,7 +492,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
other_ty: Ty<'tcx>,
op: hir::BinOp,
is_assign: IsAssign,
) -> bool /* did we suggest to call a function because of missing parenthesis? */ {
) -> bool /* did we suggest to call a function because of missing parentheses? */ {
err.span_label(span, ty.to_string());
if let FnDef(def_id, _) = *ty.kind() {
let source_map = self.tcx.sess.source_map();