Compiler unstable options for rustdoc? (any hack is fine)

Any trick/override/inject/hack (in config files, Rust source, Linux env, filesystem/aliases...) so that
cargo +nightly test
would apply an equivalent of RUSTFLAGS="-Znext-solver=globally" to doctests, please?

It's for compile_fail doctests (the crate itself is stable-friendly, but that can be tested with stable separately). Primarily run in GitHub Actions, so I'm happy for any hack.
(I do see rustdoc: allow full set of compiler options to be specified · Issue #43031 · rust-lang/rust · GitHub and it's sad...)

Or: Any way to make the next solver the default one?

Or; Any way to make (parts) of doctests elevated to internal/compiler-like code (if there is any internal attribute that uses the next solver).

Try RUSTDOCFLAGS='-Znext-solver=globally', maybe? Not sure.

No, unfortunately. RUSTDOCFLAGS are only flags specific to rustdoc, not to rustc. And cargo test doesn't apply RUSTFLAGS to doctests either. There is no obvious way, that's why I asked for hacks/tricks...

I thought that cargo test uses rustdoc to run doctests