-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Description
My code apparently used to rely (accidentally) on a soundness bug on the borrow checker. Compile this on 1.26.1 (and 1.26) and it runs; compile on a nightly newer than 524ad9b9e 2018-05-30
and it errors. It's a good thing that this got fixed, but I couldn't find the commit that fixed it right away. Is this a known fix for a known problem?
A minimized example: https://play.rust-lang.org/?gist=30a66d680ee0b69bbadb2c83f7ccb27f&version=stable&mode=debug
I was able to create a segfault on 1.26.1 by mutating the borrowed value: https://play.rust-lang.org/?gist=02f748c8c4fd56af77f77961eae11d48&version=stable&mode=debug
(The original code was something like this)
https://play.rust-lang.org/?gist=d0b21febdd80775ebe280fb6e7bd5f30&version=stable&mode=debug