#[test] fns is not type checked when not testing #1748
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
A-type-system
Area: Type system
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
If you are not running --test, then #[test] functions are stripped out of the source. This is good, in one sense, but bad in another---the functions are not type checked! It is very easy for them to bitrot this way. I think they ought to stick around but not be translated; we can ensure that #[test] functions are not referenced from other functions in
check_fn_usage
, or whatever that pass is called.The text was updated successfully, but these errors were encountered: