Skip to content

(391): Avoid undefined behavior casting opaque pointers to empty enums

Jordan Petridis requested to merge alatiera/librsvg:ub-enums into master

Looks like enums had been the recommended way to do this kind of thing, in the rustbooks itself, but it can lead to UB and it was changed recently to reflect this.

The new recommendation is a repr(c) struct with a single private field.

Close #391 (closed)

Merge request reports