--extern libc=test.rlib
I could not find a test for this particular use case. The closest I got was `tests/ui/imports/issue-37887.rs`, but that is a regression test for a different use case.