Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfortunate error when typoing : for :: #47666

Closed
jorendorff opened this issue Jan 22, 2018 · 0 comments · Fixed by #62816
Closed

Unfortunate error when typoing : for :: #47666

jorendorff opened this issue Jan 22, 2018 · 0 comments · Fixed by #62816
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-feature-request Category: A feature request, i.e: not implemented / a PR.

Comments

@jorendorff
Copy link
Contributor

fn main() {
    let _ = Option:Some(vec![0, 1]);
}

The compiler output for this is:

   Compiling playground v0.0.1 (file:///playground)
error: expected type, found keyword `box`
 --> src/main.rs:2:25
  |
2 |     let _ = Option:Some(vec![0, 1]);
  |                         ^^^^^^^^^^
  |
  = note: this error originates in a macro outside of the current crate

Of course this is just me being dumb :) but by the time I noticed that, I had already tried rustup update nightly and tried the stable version and tried -Z external-macro-backtrace and scratched my head a bit and figured it had to be a compiler bug and minimized a test case. So I might as well file it!

@bluss bluss added C-feature-request Category: A feature request, i.e: not implemented / a PR. A-diagnostics Area: Messages for errors, warnings, and lints labels Jan 22, 2018
Centril added a commit to Centril/rust that referenced this issue Mar 26, 2019
Centril added a commit to Centril/rust that referenced this issue Mar 26, 2019
Centril added a commit to Centril/rust that referenced this issue Mar 26, 2019
Centril added a commit to Centril/rust that referenced this issue Jul 21, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jul 23, 2019
bors added a commit that referenced this issue Aug 4, 2019
Point at type ascription before macro invocation on expansion parse error

Fix #47666. Follow up to #62791.

r? @petrochenkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-feature-request Category: A feature request, i.e: not implemented / a PR.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants