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

Calling process::exit(1) from a proc macro looks successful to trybuild, but failure to cargo #229

Open
dtolnay opened this issue Mar 26, 2023 · 0 comments

Comments

@dtolnay
Copy link
Owner

dtolnay commented Mar 26, 2023

test tests/ui/error.rs ... error
Expected test case to fail to compile, but it succeeded.

Even though, compiling the same macro invocation directly using cargo, cargo sees that it failed and exits nonzero.

$ cargo check
    Checking repro v0.0.0
error: could not compile `repro` (bin "repro")

$ echo $?
101

Not sure whether there is any way to discern this from cargo's --message-format=json representation.

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