That can be achieved by linux dropping support for architectures not supported by rust :D
I'm joking of course, but the platform support list of rust is pretty good looking at [1].
I'm pretty sure people developing for arm5 aren't building the linux kernel on arm5.
[1] https://doc.rust-lang.org/nightly/rustc/platform-support.htm...