We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code builds and runs fine:
struct S(i32); static S0: S = S(0); fn main() { let d = S0; println!("{}", match d { S(0) => true, _ => false, }); }
However attempting to match 'd' against 'S0' produces an error at the declaration of S0:
struct S(i32); static S0: S = S(0); fn main() { let d = S0; println!("{}", match d { S0 => true, _ => false, }); }
test.rs:3:16: 3:20 error: unsupported constant expr test.rs:3 static S0: S = S(0); ^~~~
The text was updated successfully, but these errors were encountered:
Duplicate of #6533 (and #13626 and #13731, really).
Sorry, something went wrong.
Thanks for the pointers, I'm closing then.
Thanks for the bug report! I have a plan on how to address this, probably this week.
No branches or pull requests
The following code builds and runs fine:
However attempting to match 'd' against 'S0' produces an error at the declaration of S0:
The text was updated successfully, but these errors were encountered: