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
This commit is contained in:
commit
f01b9f803b
9 changed files with 57 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue