The "PartialEq and Eq" slide in the idiomatic course has a code snippet that doesn't compile or run, but is not marked ignore or compile_fail, and mdbook test does not fail.
The issue is that the code snippet is missing a main function, and so fails to compile/run when trying to run it in the slide. But when running tests, it looks like a main function wrapper is implicitly added if the snippet doesn't have its own main. This means that the tests pass, even though the code doesn't work when trying to teach the class.
I think the implicit main behavior is useful and can allow us to write more concise code examples, but we either need to add that behavior when running the code snippets in the slide, or we need to remove this behavior from the tests so that tests can catch when code snippets don't work.
The "PartialEq and Eq" slide in the idiomatic course has a code snippet that doesn't compile or run, but is not marked
ignoreorcompile_fail, andmdbook testdoes not fail.The issue is that the code snippet is missing a
mainfunction, and so fails to compile/run when trying to run it in the slide. But when running tests, it looks like amainfunction wrapper is implicitly added if the snippet doesn't have its ownmain. This means that the tests pass, even though the code doesn't work when trying to teach the class.I think the implicit main behavior is useful and can allow us to write more concise code examples, but we either need to add that behavior when running the code snippets in the slide, or we need to remove this behavior from the tests so that tests can catch when code snippets don't work.