> Having simultaneous mutable references to an object is UB in Rust
This is correct.
> because the memory manager cannot detect use-after-free errors.
... this is not. It is UB because the language declares it UB. It is absolutely to the core of the design of the language itself. All Rust code relies on this property to work. Something that breaks it is in fact broken, regardless of any other aspect of the program.
This is correct.
> because the memory manager cannot detect use-after-free errors.
... this is not. It is UB because the language declares it UB. It is absolutely to the core of the design of the language itself. All Rust code relies on this property to work. Something that breaks it is in fact broken, regardless of any other aspect of the program.