Support checking for Rust test functions.

Without the --test flag, functions marked as #[test] are not checked for
errors.
Merge pull request #373 from tomjakubowski/rust-test

Support checking for Rust test functions