After upgrading to the latest nightly build of rust, my existing code fails to compile. It quotes a lifetime mismatch between
What is suspicious is it then quotes a struct called
DestructorScopeData, which is part of
rustc internals. I initially though it was an ICE, but now I think its just an unfortunate side affect of some of the changes to traits as of late.
I’ve looked through the contents of https://github.com/rust-lang/rust/issues/27579, and I see a few changes that might be the culprit but I don’t have enough knowledge about
rustc internals to understand what is going on.
I’ve made a playground to demonstrate the issue. It compiles fine on stable and beta channels but on nightly it breaks:
I suppose I’m asking if this is my problem of
rustc's problem, and if its my code then what can I do to fix it!