Closed hvenev closed 3 years ago
@hvenev could you try this again with #![feature(const_cell_refs)]
(https://github.com/rust-lang/rust/issues/79703)? That enables a more precise way to check what happens with references to interior mutable types.
Sorry, I meant const_refs_to_cell
, tracked at https://github.com/rust-lang/rust/issues/80384.
Yes, it appears to work on nightly: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=bccaaea7e859e843018cc66e01880ed7
Great, thanks for testing. :)
Playground containing an extract of the code from the current master (d3f5f23483dc3b61746f041da4fc422e24316c96)
Building this fails with the following error:
Note that there is no error if
Foo::a
isusize
instead.