Is rust UB different from C UB? C UB must be avoided at all costs even if you think you know the actual behavior.

It is not.