You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--example NAME ... Check that the specified examples compile
--examples Check that all examples compile
but what actually happens when you run cargo test --examples is that the examples are compiled and tested just like any other test, and the binary written to target/debug/examples/$NAME is a test-runner rather than the actual example binary.
This may seem harmless but it causes a surprising difference in behaviour when e.g. running cargo test && target/debug/examples/$NAME vs cargo test --examples && target/debug/examples/$NAME.