stdarch
stdarch copied to clipboard
cleanup: Move cfg(tests) modules to its own files
The tests mod in stdarch is really big. We should split them into their own files instead of inline them into other mods.
This has been discussed for libstd in https://github.com/rust-lang/compiler-team/issues/344. Also see some other tricks in https://matklad.github.io/2021/02/27/delete-cargo-integration-tests.html.
Potentially interesting: having them in integration tests would mean we wouldn't have to update the test code when migrating away from #[rustc_args_required_const] as described in #1022. They'd be in another crate, and rustc would rewrite the calls via #[rustc_legacy_const_generics].