4 ms·
enum Void shouldn't be used for opaque types. See these: https://internals.rust-lang.org/t/recent-change-to-make-exhaustiveness-and-uninhabited-types-play-ni
by nalllar 8y ago
enum Void shouldn't be used for opaque types.
See these:
https://internals.rust-lang.org/t/recent-change-to-make-exhaustiveness-and-uninhabited-types-play-nicer-together/4602 https://internals.rust-lang.org/t/recent-change-to-make-exha...
https://github.com/rust-lang-nursery/nomicon/issues/29 https://github.com/rust-lang-nursery/nomicon/issues/29
https://github.com/briansmith/ring/issues/416 https://github.com/briansmith/ring/issues/416
- ChrisSD 8y agoOh wow, I didn't know this. At one time at least it was recommended, which was why I did it.
- bjz_ 8y agoYeah, IIRC many years ago I added it in a document as a pattern for C APIs (I can't remember where though). Either other people were doing the same thing, or were influenced by that. Anyway, you should use `*const libc::void` these days! Sorry for the confusion.