-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add compile-fail tests #2385
Comments
@nikomatsakis and @alexcrichton were talking about Cargo support for compile-fail tests, and many others expressed support for that approach. |
cc rust-lang/rust#12335 and rust-lang/cargo#521 The rust issue is likely what's necessary to make progress on the cargo issue, which is in turn needed to make progress on this issue! |
@jdm said he had a cfail test branch for Servo; does it still work? I'm getting nervous about the lack of testing for our increasingly sophisticated custom static checking. |
I just copied and pasted the Rust compile-fail harness. |
This was done. |
As an example,
js.rs
provides a guarantee that JS-managed objects are rooted when we use them from Rust. The test suite should try to compile some invalid uses of this code and make sure they're rejected. This guards against language changes, compiler bugs, etc.The same goes for anywhere else in Servo that we attempt to provide static safety guarantees.
The text was updated successfully, but these errors were encountered: