Hacker News new | past | comments | ask | show | jobs | submit login

It does not.

I think your parent must have been doing something strange; if you have a *const T, one that's null will still be a Some. It's &T, which cannot be null by definition, that uses the null value as None, since it cannot be null.




I was actually using mut/const and got this bug, I don't think I used &T since I was handling raw memory addresses.


Hm, then I don't know what happened, as I just checked and it's definitely not doing the optimization, as it shouldn't!

If you can reproduce you should file a bug.


It might help to know that I was writing an UEFI application, so basically kernel mode.

Otherwise, I've redesigned the affected subsystem so I'm not sure I could reproduce the behaviour




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: