Fix parse error in constrained-type-missing-check.rs#1040
Fix parse error in constrained-type-missing-check.rs#1040mbrubeck wants to merge 1 commit intorust-lang:masterfrom
Conversation
|
brson explained on IRC that xfail-test will cause the test to be skipped, so it won't raise a flag if the test starts unexpectedly passing. |
|
Just to clarify, this test is designed to fail compilation because of a constrained type violation, but currently expected to compiled successfully because constrained type checking is not yet implemented. The test currently is failing compilation because of a parse error. This patch fixes the parse error, making the test successfully compile. When constrained type checking is implemented, the test will once again fail to compile, and the xfail can then be removed. |
|
Thank you for the patch, but I am not inclined to pull it. As far as I know the syntax in the test is correct. This test just fails in the wrong way because the feature is unimplemented. To really fix this we need to adjust the AST to understand constrained types, fix the parser to accept this syntax then teach the typestate pass to handle constrained types. |
|
No, I don't think that the syntax in this test is correct. It doesn't match the syntax in It looks like the file had the correct syntax when it was first added in bd4aeef but it got mangled by the pretty-printer in df7f21d. Then 6e2a7bf fixed some of the pretty-printer damage but not all; it looks like it missed some of the damage in this file (but fixed similar damage in (I know this doesn't really matter since the feature doesn't work, but I'm just starting to look through the Rust code and this was one bit that I noticed was wrong.) |
|
You are correct. Integrated. Thanks! |
…ift-codegen-4bb5894
I noticed that this test was expected to succeed, but was actually failing to compile with "expecting *, found low".
There's a deeper issue here, which is that "make test" did not catch this problem. I'm guessing this because "// xfail-test" is not processed when parsing fails.