about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-04 16:19:04 +0000
committerbors <bors@rust-lang.org>2019-08-04 16:19:04 +0000
commitf01b9f803b59f170f5dabaaa8aedc96abe45bfea (patch)
treee7388497c7f95770a07c90e2a67edbc0aa9851f4 /src/test
parent460072ebeed5a2463109894592ac172b47cdfb74 (diff)
parentc82e1f2d0e0b7fec9265eac851b2ac8b500ec4cc (diff)
downloadrust-f01b9f803b59f170f5dabaaa8aedc96abe45bfea.tar.gz
rust-f01b9f803b59f170f5dabaaa8aedc96abe45bfea.zip
Auto merge of #62816 - estebank:type-ascription-macros, r=petrochenkov
Point at type ascription before macro invocation on expansion parse error

Fix https://github.com/rust-lang/rust/issues/47666. Follow up to https://github.com/rust-lang/rust/pull/62791.

r? @petrochenkov
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/type/ascription/issue-47666.stderr11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/test/ui/type/ascription/issue-47666.stderr b/src/test/ui/type/ascription/issue-47666.stderr
index 7aa899f795c..965bbe5ea41 100644
--- a/src/test/ui/type/ascription/issue-47666.stderr
+++ b/src/test/ui/type/ascription/issue-47666.stderr
@@ -2,11 +2,14 @@ error: expected type, found reserved keyword `box`
   --> $DIR/issue-47666.rs:2:25
    |
 LL |     let _ = Option:Some(vec![0, 1]);
-   |                         ^^^^^^^^^^
-   |                         |
-   |                         expected type
-   |                         in this macro invocation
+   |                   -     ^^^^^^^^^^
+   |                   |     |
+   |                   |     expected type
+   |                   |     in this macro invocation
+   |                   help: maybe write a path separator here: `::`
    |
+   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
+   = note: for more information, see https://github.com/rust-lang/rust/issues/23416
    = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: aborting due to previous error