]> git.lizzy.rs Git - rust.git/commitdiff
review comments: typo and rewording
authorEsteban Küber <esteban@kuber.com.ar>
Thu, 8 Aug 2019 23:56:57 +0000 (16:56 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Fri, 9 Aug 2019 14:18:05 +0000 (07:18 -0700)
18 files changed:
src/librustc_typeck/check/mod.rs
src/test/ui/block-result/consider-removing-last-semi.stderr
src/test/ui/block-result/issue-11714.stderr
src/test/ui/block-result/issue-13428.stderr
src/test/ui/coercion/coercion-missing-tail-expected-type.stderr
src/test/ui/issues/issue-32323.stderr
src/test/ui/issues/issue-35241.stderr
src/test/ui/issues/issue-43162.stderr
src/test/ui/issues/issue-44023.stderr
src/test/ui/issues/issue-6458-4.stderr
src/test/ui/liveness/liveness-forgot-ret.stderr
src/test/ui/liveness/liveness-missing-ret2.stderr
src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
src/test/ui/missing/missing-return.stderr
src/test/ui/parser/issue-62881.stderr
src/test/ui/parser/issue-62895.stderr
src/test/ui/resolve/privacy-enum-ctor.stderr
src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr

index 086f3d419576add588f2362ba646705fe7913a88..4fb28db6e94fa09c29530badc86613449f445f7b 100644 (file)
@@ -3711,8 +3711,8 @@ fn check_block_with_expected(
                         if let Some(fn_span) = fn_span {
                             err.span_label(
                                 fn_span,
-                                "this function implicitly returns `()` as its body has no tail \
-                                 or `return` expression",
+                                "implicitly returns `()` as its body has no tail or `return` \
+                                 expression",
                             );
                         }
                     }, false);
@@ -3880,10 +3880,10 @@ fn suggest_fn_call(
                         sugg_call = fields.iter().map(|_| "_").collect::<Vec<_>>().join(", ");
                         match hir.as_local_hir_id(def_id).and_then(|hir_id| hir.def_kind(hir_id)) {
                             Some(hir::def::DefKind::Ctor(hir::def::CtorOf::Variant, _)) => {
-                                msg = "instatiate this tuple variant";
+                                msg = "instantiate this tuple variant";
                             }
                             Some(hir::def::DefKind::Ctor(hir::def::CtorOf::Struct, _)) => {
-                                msg = "instatiate this tuple struct";
+                                msg = "instantiate this tuple struct";
                             }
                             _ => {}
                         }
index 4c421e6ada405ef7a5f7cb404e86390b2eafcb25..f4984ca446309d83d88ba24dd63387b1efa5afaf 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn f() -> String {
    |    -      ^^^^^^ expected struct `std::string::String`, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     0u8;
 LL |     "bla".to_string();
    |                      - help: consider removing this semicolon
@@ -18,7 +18,7 @@ error[E0308]: mismatched types
 LL | fn g() -> String {
    |    -      ^^^^^^ expected struct `std::string::String`, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     "this won't work".to_string();
 LL |     "removeme".to_string();
    |                           - help: consider removing this semicolon
index a0bdbd693f2cfc8c2c2af7d55dabba8ac150455c..cfb42c601279a9abdc5304b4a3a2fa8806310ffa 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn blah() -> i32 {
    |    ----      ^^^ expected i32, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 ...
 LL |     ;
    |     - help: consider removing this semicolon
index 53f8eaa1ae227b1576079f8c81477a795419636c..f7cafab3d773bdc3250146dd61596ec369915721 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn foo() -> String {
    |    ---      ^^^^^^ expected struct `std::string::String`, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 ...
 LL |     ;
    |     - help: consider removing this semicolon
@@ -18,7 +18,7 @@ error[E0308]: mismatched types
 LL | fn bar() -> String {
    |    ---      ^^^^^^ expected struct `std::string::String`, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     "foobar".to_string()
 LL |     ;
    |     - help: consider removing this semicolon
index fde41567d80024b86d4511bfe40d579775d5df1a..955793e8586e7d221e2253632019a8caa08088f6 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn plus_one(x: i32) -> i32 {
    |    --------            ^^^ expected i32, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     x + 1;
    |          - help: consider removing this semicolon
    |
@@ -17,7 +17,7 @@ error[E0308]: mismatched types
 LL | fn foo() -> Result<u8, u64> {
    |    ---      ^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     Ok(1);
    |          - help: consider removing this semicolon
    |
index 138b058f44d9e88c9959fe11989627c530510167..6256dc0c550226f3dfe774e26199cc437d02bc25 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | pub fn f<'a, T: Tr<'a>>() -> <T as Tr<'a>>::Out {}
    |        -                     ^^^^^^^^^^^^^^^^^^ expected associated type, found ()
    |        |
-   |        this function implicitly returns `()` as its body has no tail or `return` expression
+   |        implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected type `<T as Tr<'a>>::Out`
               found type `()`
index 8befc6873857ee011b12fa179851c7f380c6fa42..586146cbaa4ee9fc1eee9fce581fa7eaaa6a6616 100644 (file)
@@ -8,7 +8,7 @@ LL | fn test() -> Foo { Foo }
    |              ---   ^^^
    |              |     |
    |              |     expected struct `Foo`, found fn item
-   |              |     help: use parentheses to instatiate this tuple struct: `Foo(_)`
+   |              |     help: use parentheses to instantiate this tuple struct: `Foo(_)`
    |              expected `Foo` because of return type
    |
    = note: expected type `Foo`
index e90531bce3e867757073649dd259893a20b2bfe8..6d3e8b5ba2323a3c814be17ca77312c14107020d 100644 (file)
@@ -16,7 +16,7 @@ error[E0308]: mismatched types
 LL | fn foo() -> bool {
    |    ---      ^^^^ expected bool, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |
 LL |     break true;
    |               - help: consider removing this semicolon
index 4a27531b4be8fb3e74d09b1d5e5993cfb4155a55..258ffe558e9ba283aef71e1330d709f3320ab936 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn საჭმელად_გემრიელი_სადილი ( ) -> isize {
    |    ------------------------        ^^^^^ expected isize, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected type `isize`
               found type `()`
index 4db3daede758f36e6e7e1b2b8235896cabe7869f..ecf729e1032b15f63291a372b62e0264e35cbe57 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn foo(b: bool) -> Result<bool,String> {
    |    ---             ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     Err("bar".to_string());
    |                           - help: consider removing this semicolon
    |
index 24106f775794cfaecb5796678942db270ff4d30c..4baf351f7eb2d52c31bca83c3fc433780a706f1a 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn f(a: isize) -> isize { if god_exists(a) { return 5; }; }
    |    -              ^^^^^ expected isize, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected type `isize`
               found type `()`
index 9502e4467499c934a247ddc15d56115a6dc591c0..1f60560b45043928ddbd4cff2323fc71d2edcbeb 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn f() -> isize {
    |    -      ^^^^^ expected isize, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected type `isize`
               found type `()`
index 7ee4cb178a6c5ff6546df679344a0d61e2c5e29c..2497d93daa494628cbd367d3247addec99c8ae49 100644 (file)
@@ -5,7 +5,7 @@ LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } }
    |                                ---      ^^^    - help: consider removing this semicolon
    |                                |        |
    |                                |        expected i32, found ()
-   |                                this function implicitly returns `()` as its body has no tail or `return` expression
+   |                                implicitly returns `()` as its body has no tail or `return` expression
 ...
 LL |     test!();
    |     -------- in this macro invocation
@@ -19,7 +19,7 @@ error[E0308]: mismatched types
 LL | fn no_return() -> i32 {}
    |    ---------      ^^^ expected i32, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected type `i32`
               found type `()`
@@ -30,7 +30,7 @@ error[E0308]: mismatched types
 LL | fn bar(x: u32) -> u32 {
    |    ---            ^^^ expected u32, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     x * 2;
    |          - help: consider removing this semicolon
    |
@@ -43,7 +43,7 @@ error[E0308]: mismatched types
 LL | fn baz(x: u64) -> u32 {
    |    ---            ^^^ expected u32, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected type `u32`
               found type `()`
index 541e9fa4a4016491c3d7ba02a146f2a76c35d472..3c8ecdcfbcbe4679a7cf259bfdefe18b5242692f 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn f() -> isize { }
    |    -      ^^^^^ expected isize, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected type `isize`
               found type `()`
index 40f64ec8fd0e2c30682d450c8d8fe8bb887c13ee..3d58b6fba0bafae14fe9ec43880108574cff5f47 100644 (file)
@@ -19,7 +19,7 @@ error[E0308]: mismatched types
 LL | fn f() -> isize { fn f() -> isize {} pub f<
    |                      -      ^^^^^ expected isize, found ()
    |                      |
-   |                      this function implicitly returns `()` as its body has no tail or `return` expression
+   |                      implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected type `isize`
               found type `()`
index 4c872d0c9d367b945e70a9b013def2c290ff57f5..39ce980964b77f8b3349e8238222e459f2a657a4 100644 (file)
@@ -38,7 +38,7 @@ error[E0308]: mismatched types
 LL | fn v() -> isize {
    |    -      ^^^^^ expected isize, found ()
    |    |
-   |    this function implicitly returns `()` as its body has no tail or `return` expression
+   |    implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected type `isize`
               found type `()`
index 3e924f7d161bd05824a5b19b115eeb30ea11969e..2538bbbf8067f6c4c450f808476224356e2883d4 100644 (file)
@@ -202,7 +202,7 @@ LL |         let _: Z = Z::Fn;
    |                    ^^^^^
    |                    |
    |                    expected enum `m::n::Z`, found fn item
-   |                    help: use parentheses to instatiate this tuple variant: `Z::Fn(_)`
+   |                    help: use parentheses to instantiate this tuple variant: `Z::Fn(_)`
    |
    = note: expected type `m::n::Z`
               found type `fn(u8) -> m::n::Z {m::n::Z::Fn}`
@@ -232,7 +232,7 @@ LL |     let _: E = m::E::Fn;
    |                ^^^^^^^^
    |                |
    |                expected enum `m::E`, found fn item
-   |                help: use parentheses to instatiate this tuple variant: `m::E::Fn(_)`
+   |                help: use parentheses to instantiate this tuple variant: `m::E::Fn(_)`
    |
    = note: expected type `m::E`
               found type `fn(u8) -> m::E {m::E::Fn}`
@@ -262,7 +262,7 @@ LL |     let _: E = E::Fn;
    |                ^^^^^
    |                |
    |                expected enum `m::E`, found fn item
-   |                help: use parentheses to instatiate this tuple variant: `E::Fn(_)`
+   |                help: use parentheses to instantiate this tuple variant: `E::Fn(_)`
    |
    = note: expected type `m::E`
               found type `fn(u8) -> m::E {m::E::Fn}`
index e3012144513fd89ab547e8c91db8f4b8a3a47c30..0686b56f97ded5d4a5a9f9707c388b771d6f5dc7 100644 (file)
@@ -32,7 +32,7 @@ LL |     let _: S = S;
    |                ^
    |                |
    |                expected struct `S`, found fn item
-   |                help: use parentheses to instatiate this tuple struct: `S(_, _)`
+   |                help: use parentheses to instantiate this tuple struct: `S(_, _)`
    |
    = note: expected type `S`
               found type `fn(usize, usize) -> S {S}`
@@ -62,7 +62,7 @@ LL |     let _: V = V;
    |                ^
    |                |
    |                expected struct `V`, found fn item
-   |                help: use parentheses to instatiate this tuple struct: `V()`
+   |                help: use parentheses to instantiate this tuple struct: `V()`
    |
    = note: expected type `V`
               found type `fn() -> V {V}`
@@ -107,7 +107,7 @@ LL |     let _: E = E::A;
    |                ^^^^
    |                |
    |                expected enum `E`, found fn item
-   |                help: use parentheses to instatiate this tuple variant: `E::A(_)`
+   |                help: use parentheses to instantiate this tuple variant: `E::A(_)`
    |
    = note: expected type `E`
               found type `fn(usize) -> E {E::A}`