Rollup merge of #61374 - VirrageS:master, r=Centril

Explicitly suggest 'type_ascription' feature

Closes: #61325

r? @estebank
This commit is contained in:
Pietro Albini 2019-05-31 13:34:07 +02:00 committed by GitHub
commit e36b90752c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions

View File

@ -858,8 +858,8 @@ impl<'a> Parser<'a> {
Applicability::MaybeIncorrect,
);
} else {
err.note("type ascription is a nightly-only feature that lets \
you annotate an expression with a type: `<expr>: <type>`")
err.note("#![feature(type_ascription)] lets you annotate an \
expression with a type: `<expr>: <type>`")
.span_note(
lhs_span,
"this expression expects an ascribed type after the colon",

View File

@ -89,7 +89,7 @@ error: expected type, found `4`
LL | println!("{}", a: &mut 4);
| ^ expecting a type here because of type ascription
|
= note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
= 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/issue-22644.rs:34:20
|

View File

@ -4,7 +4,7 @@ error: expected type, found `42`
LL | Test::Drill(field: 42);
| ^^ expecting a type here because of type ascription
|
= note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
= 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/issue-34255-1.rs:8:17
|

View File

@ -14,7 +14,7 @@ error: expected type, found keyword `loop`
LL | loop { break 'label: loop { break 'label 42; }; }
| ^^^^ expecting a type here because of type ascription
|
= note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
= 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
|

View File

@ -4,7 +4,7 @@ error: expected type, found `3`
LL | let x = Enum::Foo(a: 3, b: 4);
| ^ expecting a type here because of type ascription
|
= note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
= 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/recover-from-bad-variant.rs:7:23
|

View File

@ -12,7 +12,7 @@ error: expected type, found `0`
LL | println!("test"): 0;
| ^ expecting a type here because of type ascription
|
= note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
= 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/type-ascription-instead-of-statement-end.rs:9:5
|