we disable Android tests entirely (note that Android is a tier 2 platform so 'shouldn't' be getting testing anyway!)
The current status of things is:
the infra team is extremely unlikely to be able to pursue option 1 or 2, hence 3 is the default (as sad as it is)
the issue appears to be related to should_panic tests (hence option 2 above)
to disable should_panic tests, we don't want to scatter cfgs everywhere, so two things need to happen:
https://github.com/rust-lang/rust/pull/58900 shows roughly what needs to happen to disable normal should_panic tests (though that specific PR didn't work so may be misleading )
rustdoc needs altering to allow us to pass a flag to disable should_panic doctests
The timeline for this is around a month - at that point we're expecting to make the final decision on GitHub Actions, which acts as a motivation to solve this issue one way or another.
We have at least 2 teams in Mozilla that rely on Rust on Android, so obviously we are interested in that platform being tested and actually working.
I'll try to see if we can allocate some time and effort on this.
Thanks! I didn't find time to look into this, so I'm more than happy you and Aaron did.
I wonder if a long-term solution would be to also upgrade the Android version Rust targets?
As I understand this might be a solved thing in more recent Android as well.
According to this comment it's API level 9 and as mati865 said: "API level 9 means Android 2.3-2.3.3 released 9 years ago which seems overly conservative."