
30 Sep
2019
30 Sep
'19
10:10 a.m.
On Wed, Sep 25, 2019 at 04:36:16PM +0000, Linus Färnstrand wrote:
Giving an invalid pointer to the safe wrapper types causes undefined behavior when methods are later called on said wrapper
Properly document safety contract of using unsafe constructor ---
Ideally it should not be exposed at all because there already is a method for getting the proper structure. And that method (or those methods) already use ::new() so with this patch it just fails. Tests, examples, etc. Instead of fixing that I would, probably, just not expose them. I don't see a reason for them being public.