]> git.lizzy.rs Git - rust.git/commitdiff
fix typo
authorEsteban Küber <esteban@kuber.com.ar>
Thu, 2 May 2019 22:53:09 +0000 (15:53 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Thu, 2 May 2019 22:53:09 +0000 (15:53 -0700)
src/librustc_typeck/check/mod.rs
src/libsyntax/parse/parser.rs
src/test/ui/error-codes/E0423.stderr
src/test/ui/parser/expr-as-stmt.stderr
src/test/ui/parser/match-arrows-block-then-binop.stderr
src/test/ui/parser/struct-literal-in-for.stderr
src/test/ui/parser/struct-literal-in-if.stderr
src/test/ui/parser/struct-literal-in-match-discriminant.stderr
src/test/ui/parser/struct-literal-in-while.stderr
src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr
src/test/ui/struct-literal-variant-in-if.stderr

index 61270716dfcbce318a8f3b4935666fa1edc454ad..a0050b1359679e1024e6079b3fd8ed815e2008fa 100644 (file)
@@ -4182,7 +4182,7 @@ fn check_expr_kind(
                                     {
                                         err.span_suggestion(
                                             *sp,
-                                            "parenthesis are required to parse this \
+                                            "parentheses are required to parse this \
                                              as an expression",
                                             format!("({})", snippet),
                                             Applicability::MachineApplicable,
index fbd1203dec94af0ffd1f45503f1940480535c323..02e6c5e1c8dbf04b8d827c17e95028daf33592ef 100644 (file)
@@ -2934,7 +2934,7 @@ fn parse_bottom_expr(&mut self) -> PResult<'a, P<Expr>> {
                                 if let Ok(snippet) = self.sess.source_map().span_to_snippet(*sp) {
                                     err.span_suggestion(
                                         *sp,
-                                        "parenthesis are required to parse this as an expression",
+                                        "parentheses are required to parse this as an expression",
                                         format!("({})", snippet),
                                         Applicability::MachineApplicable,
                                     );
@@ -2979,7 +2979,7 @@ fn maybe_parse_struct_expr(
                     "struct literals are not allowed here",
                 );
                 err.multipart_suggestion(
-                    "surround the struct literal with parenthesis",
+                    "surround the struct literal with parentheses",
                     vec![
                         (lo.shrink_to_lo(), "(".to_string()),
                         (expr.span.shrink_to_hi(), ")".to_string()),
@@ -3661,7 +3661,7 @@ fn parse_assoc_expr_with(&mut self,
                     .unwrap_or_else(|_| pprust::expr_to_string(&lhs));
                 err.span_suggestion(
                     lhs.span,
-                    "parenthesis are required to parse this as an expression",
+                    "parentheses are required to parse this as an expression",
                     format!("({})", snippet),
                     Applicability::MachineApplicable,
                 );
@@ -4982,7 +4982,7 @@ fn parse_pat_with_range_pat(
                             if let Ok(snippet) = self.sess.source_map().span_to_snippet(*sp) {
                                 err.span_suggestion(
                                     *sp,
-                                    "parenthesis are required to parse this as an expression",
+                                    "parentheses are required to parse this as an expression",
                                     format!("({})", snippet),
                                     Applicability::MachineApplicable,
                                 );
index 5cb7121a0d1c38e0731fddfb569223922d8df9cd..ec240003f91822e6eaa23e120aa98e854bf1800f 100644 (file)
@@ -3,7 +3,7 @@ error: struct literals are not allowed here
    |
 LL |     if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); }
    |                                ^^^^^^^^^^^^^^^^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); }
    |                                ^                ^
@@ -19,7 +19,7 @@ error: struct literals are not allowed here
    |
 LL |     for _ in std::ops::Range { start: 0, end: 10 } {}
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     for _ in (std::ops::Range { start: 0, end: 10 }) {}
    |              ^                                     ^
index 1725ba944c50f6a274a223ea1dcd00dc78656640..a11209998a7d50b0e7ffdc2653df794f0ea175da 100644 (file)
@@ -4,7 +4,7 @@ error: expected expression, found `+`
 LL |     {2} + {2}
    |     --- ^ expected expression
    |     |
-   |     help: parenthesis are required to parse this as an expression: `({2})`
+   |     help: parentheses are required to parse this as an expression: `({2})`
 
 error: expected expression, found `+`
   --> $DIR/expr-as-stmt.rs:12:9
@@ -12,7 +12,7 @@ error: expected expression, found `+`
 LL |     {2} + 2
    |     --- ^ expected expression
    |     |
-   |     help: parenthesis are required to parse this as an expression: `({2})`
+   |     help: parentheses are required to parse this as an expression: `({2})`
 
 error: expected expression, found `+`
   --> $DIR/expr-as-stmt.rs:18:12
@@ -20,13 +20,13 @@ error: expected expression, found `+`
 LL |     { 42 } + foo;
    |     ------ ^ expected expression
    |     |
-   |     help: parenthesis are required to parse this as an expression: `({ 42 })`
+   |     help: parentheses are required to parse this as an expression: `({ 42 })`
 
 error: expected expression, found `&&`
   --> $DIR/expr-as-stmt.rs:30:5
    |
 LL |     if let Some(x) = a { true } else { false }
-   |     ------------------------------------------ help: parenthesis are required to parse this as an expression: `(if let Some(x) = a { true } else { false })`
+   |     ------------------------------------------ help: parentheses are required to parse this as an expression: `(if let Some(x) = a { true } else { false })`
 LL |     &&
    |     ^^ expected expression
 
@@ -35,7 +35,7 @@ error: expected expression, found `>`
    |
 LL |     } > 0
    |       ^ expected expression
-help: parenthesis are required to parse this as an expression
+help: parentheses are required to parse this as an expression
    |
 LL |     (match x {
 LL |         _ => 1,
@@ -84,7 +84,7 @@ error[E0614]: type `{integer}` cannot be dereferenced
 LL |     { 3 } * 3
    |     ----- ^^^
    |     |
-   |     help: parenthesis are required to parse this as an expression: `({ 3 })`
+   |     help: parentheses are required to parse this as an expression: `({ 3 })`
 
 error: aborting due to 10 previous errors
 
index 0d7f81645b46a68f558eae76f81bb6905dc7b25e..bb7df30783acd40945491941e974d3bbb1be50b5 100644 (file)
@@ -3,7 +3,7 @@ error: expected pattern, found `+`
    |
 LL |       } + 5
    |         ^ expected pattern
-help: parenthesis are required to parse this as an expression
+help: parentheses are required to parse this as an expression
    |
 LL |       0 => ({
 LL |         0
index 3c3f6e7f032f6edb6e8b6812e51c93b65b516492..29af72a5d23d0ae06c8f2a5a1874dea3db4383b9 100644 (file)
@@ -6,7 +6,7 @@ LL |       for x in Foo {
 LL | |         x: 3
 LL | |     }.hi() {
    | |_____^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     for x in (Foo {
 LL |         x: 3
index 851c495abb4b0cea865e2da2c1cbb624b5c00307..e76c1cb45dd4e0e8bdf03ad5c74d27e6df032a5e 100644 (file)
@@ -6,7 +6,7 @@ LL |       if Foo {
 LL | |         x: 3
 LL | |     }.hi() {
    | |_____^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     if (Foo {
 LL |         x: 3
index 0058e8981cd25685e98bb3b44290bcef103d0162..95b0882b7aeb5ec466533ac0eb8f77d71963e314 100644 (file)
@@ -6,7 +6,7 @@ LL |       match Foo {
 LL | |         x: 3
 LL | |     } {
    | |_____^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     match (Foo {
 LL |         x: 3
index 9959a57be8596a6d6b43b8b8cad7421121577d2e..acd31b477dc27d7f431cb6045f45c0ac76f97ab1 100644 (file)
@@ -6,7 +6,7 @@ LL |       while Foo {
 LL | |         x: 3
 LL | |     }.hi() {
    | |_____^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     while (Foo {
 LL |         x: 3
index 81f7a91ddb38ad2ce56c23d8ef5f37b05700b4d5..24078074161e6f08744e7d7bbf46c7a24c53c4b5 100644 (file)
@@ -6,7 +6,7 @@ LL |       while || Foo {
 LL | |         x: 3
 LL | |     }.hi() {
    | |_____^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     while || (Foo {
 LL |         x: 3
index 55f23baea7aa8831c65d5bddad33d3e0563e07b2..f91b9d7dce60fda07a9042bbf9b8ab9e0b4e61e8 100644 (file)
@@ -3,7 +3,7 @@ error: struct literals are not allowed here
    |
 LL |     if x == E::I { field1: true, field2: 42 } {}
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     if x == (E::I { field1: true, field2: 42 }) {}
    |             ^                                 ^
@@ -13,7 +13,7 @@ error: struct literals are not allowed here
    |
 LL |     if x == E::V { field: false } {}
    |             ^^^^^^^^^^^^^^^^^^^^^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     if x == (E::V { field: false }) {}
    |             ^                     ^
@@ -23,7 +23,7 @@ error: struct literals are not allowed here
    |
 LL |     if x == E::J { field: -42 } {}
    |             ^^^^^^^^^^^^^^^^^^^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     if x == (E::J { field: -42 }) {}
    |             ^                   ^
@@ -33,7 +33,7 @@ error: struct literals are not allowed here
    |
 LL |     if x == E::K { field: "" } {}
    |             ^^^^^^^^^^^^^^^^^^
-help: surround the struct literal with parenthesis
+help: surround the struct literal with parentheses
    |
 LL |     if x == (E::K { field: "" }) {}
    |             ^                  ^