Closed oli-obk closed 2 years ago
Ah! Thanks for the heads up. I'll look into this soon.
@oli-obk: I've pushed what I believe is a fix to master in commit dafa0b69f87d006154d29ef17bd8b84293927611. If you could try building it with https://github.com/rust-lang/rust/pull/94075 and let me know if it's actually fixed, I'd really appreciate it! Then I can cut a new Ropey release with the fix.
You can try this out locally by using https://crates.io/crates/rustup-toolchain-install-master to install the toolchain with hash 419e70b02dc61a51433bb55fe5a482c6ab6f7da5
Ah, thanks! That's convenient. I assumed I would have to build the whole thing myself, which... sounded quite daunting, especially just to test it out.
Looks like it's fixed. Thanks!
I'll leave this issue open until I cut a release with the fix.
Published in Ropey 1.5.0.
https://github.com/rust-lang/rust/pull/94075 optimizes
repr(Rust)
enums better, making them smaller in many cases. This breaks ropey (see https://crater-reports.s3.amazonaws.com/pr-94075/try%23419e70b02dc61a51433bb55fe5a482c6ab6f7da5/gh/cessen.led/log.txt for an example). I'm not sure when this change gets merged and will hit stable, but relying on the exact size ofrepr(Rust)
types is suboptimal. The easy fix is to userepr(C)
for the affected enums, which will disable any such optimizations.If you have opinions on this topic, please don't hesitate to let me know here or post on the PR.