Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Conversation

jonas-schievink
Copy link
Contributor

I only added 2 tests I found in tests.rs, it would be nice to gather more. If anyone finds something unsafe that we should test against, please leave a comment.

@jonas-schievink
Copy link
Contributor Author

Oh yeah, Travis fails since this only works on nightly. Give me a second.

@jonas-schievink
Copy link
Contributor Author

jonas-schievink commented Sep 16, 2017

Dev-dependencies are not allowed to be optional

UGH. Why isn't there a more elegant and usable solution for compile-fail tests? They're pretty important for all sorts of crates...

@kyren
Copy link
Contributor

kyren commented Feb 10, 2018

I ended up working off of what you had and managed to get compiletests_rs working on travis as of 1426bdb. I didn't put compiletest_rs in [dev-dependencies], but it is optional?

I'm not sure if I have it set up in the most optimal way.

@jonas-schievink
Copy link
Contributor Author

@kyren Very nice! The only issue with making compiletest a regular dependency is that downstream crates can now request the compiletest_rs feature to be enabled, too. I don't think that's too big of a deal, though.

Eventually I'll revisit my plans to make compile-fail tests more accessible, probably after rust-lang/cargo#4734 lands or rust-lang/rfcs#2318 is accepted and implemented.

Also closing, since this is implemented now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants