You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An unsafe operation is an operation that may result in undefined behavior that is not diagnosed as a static error.
Someone may argue that safe operations can also "result" in UB (due to some unsoundness in an abstraction or a broken contract), thus many more operations are unsafe than the ones stated in the list. Perhaps some clarification on "result" would help, or a different way to express the idea.
The text was updated successfully, but these errors were encountered:
I don't speak English well, but my two cents: An unsafe operation is an operation that has preconditions that are currently not expressed in the Rust language.
Someone may argue that safe operations can also "result" in UB
I'd argue against that. If some contract was broken (or unsoundness was already incurred, which tbf is UB in itself), you have effectively invoked UB at that point already, the safe code wreaking havoc is just an after effect of that but the true culprit is still the unsafe code doing undefined things.
The new unsafety definition (after #395) is:
Someone may argue that safe operations can also "result" in UB (due to some unsoundness in an abstraction or a broken contract), thus many more operations are unsafe than the ones stated in the list. Perhaps some clarification on "result" would help, or a different way to express the idea.
The text was updated successfully, but these errors were encountered: