The crate that gets compiled by trybuild is given the same dependencies in its Cargo.toml as the outer crate has. But it may have an old Cargo.lock left over from a previous cargo test run that causes it to use a different set of patch versions of those dependencies compared to what is used currently by the outer crate whose tests we are running. To avoid this, trybuild should somehow write a Cargo.lock (or failing that, use a sequence of cargo update --precise commands) to keep the resolved set of dependencies in sync.
The crate that gets compiled by trybuild is given the same dependencies in its Cargo.toml as the outer crate has. But it may have an old Cargo.lock left over from a previous
cargo testrun that causes it to use a different set of patch versions of those dependencies compared to what is used currently by the outer crate whose tests we are running. To avoid this, trybuild should somehow write a Cargo.lock (or failing that, use a sequence ofcargo update --precisecommands) to keep the resolved set of dependencies in sync.