Skip to content
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

Document trybuild cfg option #106

Open
DusterTheFirst opened this issue Jan 9, 2021 · 0 comments
Open

Document trybuild cfg option #106

DusterTheFirst opened this issue Jan 9, 2021 · 0 comments

Comments

@DusterTheFirst
Copy link

DusterTheFirst commented Jan 9, 2021

When running tests under trybuild, it may be useful to disable some parts, especially if they depend on a specific compilation environment that trybuild does not provide. Looking through the source, I can see that the rustflag --cfg trybuild is set, which would allow for such functionality of a macro. This cfg option is not documented anywhere in the README. I would add it to the readme, but I'm not too sure how to document such a thing.

This change could also remove the need for #105 since the macro would be able to detect it is running in an std environment and not have to deal with the eh_personality and panic=abort mess. It would be nice to be able to build/run trybuild tests in a no_std environment, but the standard testing tools run tests in an std environment anyways, so this would stay consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant