Where is rust test log file generated?

I'm not a rustc developer, but AFAICT x.py / src/bootstrap/bootstrap.py calls cargo test under the hood, which doesn't generate any logfiles by default.

However, if you desire logfiles that look something like this:

ok src/vec/mod.rs - vec::Vec<T>::with_capacity (line 454)
ok src/vec/mod.rs - vec::Vec<[T;N],A>::into_flattened (line 2452)
ok src/vec/mod.rs - vec::[T;N]::try_from (line 3269)
ok src/vec/mod.rs - vec::[T;N]::try_from (line 3282)
ok src/vec/splice.rs - vec::splice::Splice (line 14)

you can create them with libtest using the --logfile argument. So creating such logfiles can be done by running tests with Cargo directly as: cargo test -- --logfile path.

Checking x.py test -h shows that there's the --test-args argument that can be used to forward arguments to libtest and indeed, when running

python3 x.py test library/core library/alloc --test-args "--logfile test.txt"

it will generate two logfiles library/core/test.txt and library/alloc/test.txt.