@@ -1002,7 +1002,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1002
1002
// More generally, the expected type wants a tuple variant with one field of an
1003
1003
// N-arity-tuple, e.g., `V_i((p_0, .., p_N))`. Meanwhile, the user supplied a pattern
1004
1004
// 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) {
1006
1006
// #67037: only do this if we could successfully type-check the expected type against
1007
1007
// the tuple struct pattern. Otherwise the substs could get out of range on e.g.,
1008
1008
// `let P() = U;` where `P != U` with `struct P<T>(T);`.
@@ -1015,13 +1015,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1015
1015
}
1016
1016
_ => false ,
1017
1017
} ;
1018
- if missing_parenthesis {
1018
+ if missing_parentheses {
1019
1019
let ( left, right) = match subpats {
1020
1020
// This is the zero case; we aim to get the "hi" part of the `QPath`'s
1021
1021
// span as the "lo" and then the "hi" part of the pattern's span as the "hi".
1022
1022
// This looks like:
1023
1023
//
1024
- // help: missing parenthesis
1024
+ // help: missing parentheses
1025
1025
// |
1026
1026
// L | let A(()) = A(());
1027
1027
// | ^ ^
@@ -1030,14 +1030,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1030
1030
// last sub-pattern. In the case of `A(x)` the first and last may coincide.
1031
1031
// This looks like:
1032
1032
//
1033
- // help: missing parenthesis
1033
+ // help: missing parentheses
1034
1034
// |
1035
1035
// L | let A((x, y)) = A((1, 2));
1036
1036
// | ^ ^
1037
1037
[ first, ..] => ( first. span . shrink_to_lo ( ) , subpats. last ( ) . unwrap ( ) . span ) ,
1038
1038
} ;
1039
1039
err. multipart_suggestion (
1040
- "missing parenthesis " ,
1040
+ "missing parentheses " ,
1041
1041
vec ! [ ( left, "(" . to_string( ) ) , ( right. shrink_to_hi( ) , ")" . to_string( ) ) ] ,
1042
1042
Applicability :: MachineApplicable ,
1043
1043
) ;
0 commit comments