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
This type checks (tag-disr-val-shape.rs):
tag-disr-val-shape.rs
enum color { red = 0; green = 1; blue = 2; black = 3; white = 4; } fn main() { assert uint::to_str(red as uint, 10u) == #fmt["%?", red]; assert uint::to_str(green as uint, 10u) == #fmt["%?", green]; assert uint::to_str(white as uint, 10u) == #fmt["%?", white]; }
but this does not (tag-auto-disr-val-shape.rs):
tag-auto-disr-val-shape.rs
enum color { red; green; blue; black; white; } fn main() { assert (uint::to_str(red as uint, 10) == #fmt["%?", red]); assert (uint::to_str(green as uint, 10) == #fmt["%?", green]); assert (uint::to_str(white as uint, 10) == #fmt["%?", white]); }
However, the two programs are equivalent but for the fact that in one case the discriminants were automatically assigned.
When fixing this bug, please remove the xfail-test directives from those two test files!
xfail-test
The text was updated successfully, but these errors were encountered:
xfail the tests for now, pending #1511 being fixed
4a34a71
You have a bug in tag-auto-disr-val-shape.rs, change the 10 to 10u and it should compile.
Let me know if it doesn't work for you.
Sorry, something went wrong.
never mind, the bug is in the pretty printer, which sometimes prints out 10u as 10
10u
10
Successfully merging a pull request may close this issue.
This type checks (
tag-disr-val-shape.rs
):but this does not (
tag-auto-disr-val-shape.rs
):However, the two programs are equivalent but for the fact that in one case the discriminants were automatically assigned.
When fixing this bug, please remove the
xfail-test
directives from those two test files!The text was updated successfully, but these errors were encountered: