mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 14:24:08 +00:00
Rollup merge of #61374 - VirrageS:master, r=Centril
Explicitly suggest 'type_ascription' feature Closes: #61325 r? @estebank
This commit is contained in:
commit
e36b90752c
@ -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",
|
||||
|
@ -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
|
||||
|
|
||||
|
@ -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
|
||||
|
|
||||
|
@ -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
|
||||
|
|
||||
|
@ -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
|
||||
|
|
||||
|
@ -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
|
||||
|
|
||||
|
Loading…
Reference in New Issue
Block a user