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
The new chapter on documentation is great, but in my opinion the documentation tests are still missleading.
When you
create a crate with cargo new --bin mycrate
write a doc test
run cargo test
it will not run this doctest, only if the create was created without the --bin flag. This behaviour is documented in the crates manifest but this should be noted directly in the book. Particularly as I think, most readers of the book will play around with a project with a main.rs but not with a lib.rs.