The test-miri flag changes whether -Zalways-encode-mir is passed to rustc, causing all metadata beyond stage 0 to include MIR of all functions, even private monomorphic ones. Instead, what we can do is to have miri tests first run cargo miri setup to generate that special libstd in CI in addition to the regular libstd. Then tests can be run with special libstd.
cc @RalfJung
The
test-miriflag changes whether-Zalways-encode-miris passed to rustc, causing all metadata beyond stage 0 to include MIR of all functions, even private monomorphic ones. Instead, what we can do is to have miri tests first runcargo miri setupto generate that speciallibstdin CI in addition to the regularlibstd. Then tests can be run with speciallibstd.cc @RalfJung