Remix.run Logo
bigstrat2003 2 hours ago

Restricting unwrap to unsafe blocks adds negative value to the language. It won't prevent unwrap mistakes (people who play fast and loose with it today will just switch to "foo = unsafe { bar.unwrap() };" instead). And it'll muddy the purpose of unsafe by adding in a use that has nothing to do with memory safety. It's not a good idea.

echelon 2 hours ago | parent [-]

> And it'll muddy the purpose of unsafe by adding in a use that has nothing to do with memory safety.

Then we need more safety semantics around panic behavior. A panic label or annotation that infects every call.

Moreover, I want a way of statically guaranteeing none of my dependencies do this.