-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Distribute compiletest binary #12335
Comments
More and more people are writing external syntax extensions, so having |
Now that we have cargo, we could easily distribute |
Compiletest would definitely need a big cleanup to be usable out-of-tree. |
In rust-lang/cargo#1194 (comment) , @alexcrichton wrote:
What if, until we’re ready to stabilize error messages (or possibly error codes, or something), only binary "triggered a build error or not" testing was available to beta and stable release channels? I think it would still be useful. |
Covered by the compiletest-rs crate. |
|
Sorry to resurrect an old issue (I can open a new one if needed), but are there any plans to add support for this type of compile testing in std? It would be really cool to just be able to add When documenting how something doesn't compile, it's convenient to be able to test that it actually never compiles. :) |
I think there's some support for |
Yes, |
Awesome! Thanks! |
@GuillaumeGomez Looks like this only really works on nightly for the moment. I'll have to wait until it hits stable. :) |
It's not in beta? It's been a while that it has been merged now... |
Sorry, I should have been more clear. My code is specifically targeting stable, so I'll have to wait for it to reach there. The feature may already be on beta in addition to nightly. I haven't checked that channel specifically. :) |
Is it going to come for regular tests? Such that I can write |
I've been Googling to ask this very question. It looks like this isn't a thing. I can't tell if there are any plans for that to change? |
I was curious if the feature that would allow annotating the doc tests with a specific error code ever got implemented? Something like this:
|
Oh fun. I was googling to see if this feature ever got added. Only to find a comment from myself from 2019! I'm going to assume this still isn't a feature? I've been using trybuild which works. Except error messages change all the time so maintaining it is a pretty obnoxious burden. |
Now that syntax extensions can be defined by third party code, cfail tests are useful outside of rustc's test suite. It may need to be renamed to something with "rust" in it.
The text was updated successfully, but these errors were encountered: