diff --git a/src/libsyntax/parse/diagnostics.rs b/src/libsyntax/parse/diagnostics.rs index b3d49524d7668..2e4d4c091398e 100644 --- a/src/libsyntax/parse/diagnostics.rs +++ b/src/libsyntax/parse/diagnostics.rs @@ -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: `: `") + err.note("#![feature(type_ascription)] lets you annotate an \ + expression with a type: `: `") .span_note( lhs_span, "this expression expects an ascribed type after the colon", diff --git a/src/test/ui/issues/issue-22644.stderr b/src/test/ui/issues/issue-22644.stderr index a28ea0d09f8f0..cf36953546549 100644 --- a/src/test/ui/issues/issue-22644.stderr +++ b/src/test/ui/issues/issue-22644.stderr @@ -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: `: ` + = note: #![feature(type_ascription)] lets you annotate an expression with a type: `: ` note: this expression expects an ascribed type after the colon --> $DIR/issue-22644.rs:34:20 | diff --git a/src/test/ui/issues/issue-34255-1.stderr b/src/test/ui/issues/issue-34255-1.stderr index 7899c8d30f1dd..01f3953777017 100644 --- a/src/test/ui/issues/issue-34255-1.stderr +++ b/src/test/ui/issues/issue-34255-1.stderr @@ -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: `: ` + = note: #![feature(type_ascription)] lets you annotate an expression with a type: `: ` note: this expression expects an ascribed type after the colon --> $DIR/issue-34255-1.rs:8:17 | diff --git a/src/test/ui/lifetime_starts_expressions.stderr b/src/test/ui/lifetime_starts_expressions.stderr index cb5a52a3e081a..8ae8018c2ff25 100644 --- a/src/test/ui/lifetime_starts_expressions.stderr +++ b/src/test/ui/lifetime_starts_expressions.stderr @@ -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: `: ` + = note: #![feature(type_ascription)] lets you annotate an expression with a type: `: ` note: this expression expects an ascribed type after the colon --> $DIR/lifetime_starts_expressions.rs:6:12 | diff --git a/src/test/ui/parser/recover-from-bad-variant.stderr b/src/test/ui/parser/recover-from-bad-variant.stderr index 1eba6d7d52877..150d74f07428d 100644 --- a/src/test/ui/parser/recover-from-bad-variant.stderr +++ b/src/test/ui/parser/recover-from-bad-variant.stderr @@ -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: `: ` + = note: #![feature(type_ascription)] lets you annotate an expression with a type: `: ` note: this expression expects an ascribed type after the colon --> $DIR/recover-from-bad-variant.rs:7:23 | diff --git a/src/test/ui/type/type-ascription-instead-of-statement-end.stderr b/src/test/ui/type/type-ascription-instead-of-statement-end.stderr index 2084cbcce4f62..4929922c83fe6 100644 --- a/src/test/ui/type/type-ascription-instead-of-statement-end.stderr +++ b/src/test/ui/type/type-ascription-instead-of-statement-end.stderr @@ -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: `: ` + = note: #![feature(type_ascription)] lets you annotate an expression with a type: `: ` note: this expression expects an ascribed type after the colon --> $DIR/type-ascription-instead-of-statement-end.rs:9:5 |