Expand description
Code that should fail to compile during the post-monomorphization compiler pass.
Due to a limitation with the trybuild
crate, we cannot
use our UI testing framework to test compilation failures that are
encountered after monomorphization has complated. This module has one item
for each such test we would prefer to have as a UI test, with the code in
question appearing as a rustdoc example which is marked with compile_fail
.
This has the effect of causing doctests to fail if any of these examples
compile successfully.
This is very much a hack and not a complete replacement for UI tests - most notably because this only provides a single “compile vs fail” bit of information, but does not allow us to depend upon the specific error that causes compilation to fail.