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

Better error message when using ~ in statics #10487

Closed
emberian opened this issue Nov 14, 2013 · 0 comments
Closed

Better error message when using ~ in statics #10487

emberian opened this issue Nov 14, 2013 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@emberian
Copy link
Member

static x: ~[int] = ~[123, 456];

fn main() {}
foo.rs:1:19: 1:30 error: constant contains unimplemented expression type
foo.rs:1 static x: ~[int] = ~[123, 456];
                            ^~~~~~~~~~~
error: aborting due to previous error

While not inaccurate, it should explain that ~ is not supported in statics and won't be, not that it's just unimplemented.

@ghost ghost assigned emberian Nov 14, 2013
@emberian emberian removed their assignment Jun 16, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 6, 2023
Gramar, and spelin kleanup

A few minor cleanups in various markdown files, mostly focusing on spelling and ignoring non-compilable codeblocks. Also a few markdown tables, etc.

P.S. I'm no grammar expert, do take with a grain of salt.

changelog: none
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
Projects
None yet
Development

No branches or pull requests

1 participant