@@ -1002,7 +1002,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10021002 // More generally, the expected type wants a tuple variant with one field of an
10031003 // N-arity-tuple, e.g., `V_i((p_0, .., p_N))`. Meanwhile, the user supplied a pattern
10041004 // with the subpatterns directly in the tuple variant pattern, e.g., `V_i(p_0, .., p_N)`.
1005- let missing_parenthesis = match ( & expected. kind ( ) , fields, had_err) {
1005+ let missing_parentheses = match ( & expected. kind ( ) , fields, had_err) {
10061006 // #67037: only do this if we could successfully type-check the expected type against
10071007 // the tuple struct pattern. Otherwise the substs could get out of range on e.g.,
10081008 // `let P() = U;` where `P != U` with `struct P<T>(T);`.
@@ -1015,13 +1015,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10151015 }
10161016 _ => false ,
10171017 } ;
1018- if missing_parenthesis {
1018+ if missing_parentheses {
10191019 let ( left, right) = match subpats {
10201020 // This is the zero case; we aim to get the "hi" part of the `QPath`'s
10211021 // span as the "lo" and then the "hi" part of the pattern's span as the "hi".
10221022 // This looks like:
10231023 //
1024- // help: missing parenthesis
1024+ // help: missing parentheses
10251025 // |
10261026 // L | let A(()) = A(());
10271027 // | ^ ^
@@ -1030,14 +1030,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10301030 // last sub-pattern. In the case of `A(x)` the first and last may coincide.
10311031 // This looks like:
10321032 //
1033- // help: missing parenthesis
1033+ // help: missing parentheses
10341034 // |
10351035 // L | let A((x, y)) = A((1, 2));
10361036 // | ^ ^
10371037 [ first, ..] => ( first. span . shrink_to_lo ( ) , subpats. last ( ) . unwrap ( ) . span ) ,
10381038 } ;
10391039 err. multipart_suggestion (
1040- "missing parenthesis " ,
1040+ "missing parentheses " ,
10411041 vec ! [ ( left, "(" . to_string( ) ) , ( right. shrink_to_hi( ) , ")" . to_string( ) ) ] ,
10421042 Applicability :: MachineApplicable ,
10431043 ) ;
0 commit comments