3 ms·
You can, but IMO it's not so necessary. The module boundary thing doesn't cause many issues in practice is straightforward to reason about if you're aware of it
by Manishearth 11y ago
You can, but IMO it's not so necessary. The module boundary thing doesn't cause many issues in practice is straightforward to reason about if you're aware of it.
(And if you weren't aware of it you would probably not use `UnsafeField` either, since the compiler can't force you to do that)
- phaylon 11y agoI'm more thinking about the documentation effect of such a wrapper type. Both in the data structure and in the parts of the code that are foced to use unsafe.
- ralfj 11y agoI suggested something kind-of-similar at <https://internals.rust-lang.org/t/pre-rfc-unsafe-types/3073> https://internals.rust-lang.org/t/pre-rfc-unsafe-types/3073>