]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/lifetime_starts_expressions.stderr
Add test for issue-57200
[rust.git] / src / test / ui / lifetime_starts_expressions.stderr
index 84e4c87ebc4daa215f691aeb408debbc5188d2e8..0d7980d60d62cc18242bdbc9e45400bdda0853fa 100644 (file)
@@ -3,6 +3,7 @@ error: expected identifier, found keyword `loop`
    |
 LL |     loop { break 'label: loop { break 'label 42; }; }
    |                          ^^^^ expected identifier, found keyword
+   |
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     loop { break 'label: r#loop { break 'label 42; }; }
@@ -12,15 +13,12 @@ error: expected type, found keyword `loop`
   --> $DIR/lifetime_starts_expressions.rs:6:26
    |
 LL |     loop { break 'label: loop { break 'label 42; }; }
-   |                          ^^^^ expecting a type here because of type ascription
+   |                        - ^^^^ expected type
+   |                        |
+   |                        tried to parse a type due to this type ascription
    |
    = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
-note: this expression expects an ascribed type after the colon
-  --> $DIR/lifetime_starts_expressions.rs:6:12
-   |
-LL |     loop { break 'label: loop { break 'label 42; }; }
-   |            ^^^^^^^^^^^^
-   = help: this might be indicative of a syntax error elsewhere
+   = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
 
 error: aborting due to 2 previous errors