dtolnay/no-panic

no-panic currently cannot be used in doctests

untitaker opened this issue · 0 comments

Attempting to use no-panic in a library requires the library to be used somehow, somewhere. The obvious answer to that is tests. For that, tests need to be compiled with opt-level=1 (as per README's dev profile). However, when the tests are run, it seems that while the regular integration tests do pass, the doctests fail with a linker error.

This is an artifact of rust-lang/cargo#4251

I think no-panic README should point this out at least, but IMO ideally it would also not even suggest to tweak the dev-profile but only suggest the optional dependency solution, as everything else seems to be a dead end.