dtolnay/trybuild

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

dtolnay opened this issue · 0 comments

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.