Description
Summary
Some changes to Rust require synchronized changes to the library and compiler together. #135881 is an example.
This used to be possible by judicious use of #[cfg(bootstrap)]
, but I rebased that PR on top of master
and there no longer seems to be a way to get the miri
build to work.
This seems to be because the miri
build is now using a newer compiler, but an older version of the library (possibly from stage0).
Reproduction
Check out 7f74340, the older version of #135881, which was based on master from Feb 6th. (If you need to fetch that from github, it can be found here).
./x.py build miri
works.
Now check out 632fd28, which is exactly the same PR based on master from yesterday. The same command does not work, emitting lots of errors about methods not being found.
Diagnosis
This seems to be because the miri
build can no longer find the blanket implementation of Receiver
for T: Deref
. I think this is because it's using stage0 stdlib.
Bisecting this has been hard for various fiddly reasons, but a recent change has been from x.py
reporting:
Building tool miri (stage1 -> stage2, aarch64-apple-darwin)
to instead reporting
Building tool miri (stage0 -> stage1, aarch64-apple-darwin)
I'm reasonably confident (but not certain) that this is the change that has altered behavior here. The commits which made these changes were 8e011e5 or 72e67e8. Before that, we see the stage1 -> stage2
behavior, and afterwards, we see stage0 -> stage1
.
That said, even after those two commits, it's still possible to get the PR to build, so there's some other factor involved in the 1000+ subsequent commits. As noted, bisecting this has been enormously painful and I haven't nailed it down yet. Nevertheless I feel this is highly likely to be related so I'm hoping @onur-ozkan can help investigate.