You said, and I quote:
> needs to be upheld both at compile time and run time for Rust code to function.
That is not correct, in general, even if in some cases, it causes a crash via panic or segfault.
A program that fails under some circumstances is a buggy program. The fact that it doesn't crash under some circumstances is no redeeming quality at all.
I don't know what you are trying to argue here. This thread is already too deep. Ownership rules are not optional. Sorry?
You said, and I quote:
> needs to be upheld both at compile time and run time for Rust code to function.
That is not correct, in general, even if in some cases, it causes a crash via panic or segfault.
/shrug
If you want to argue a different point with someone, do it with someone else.
I’m simply pointing out that you are categorically wrong in your statement.
I've explained and I've linked references, your last two comments say "not correct". If you don't want to argue don't, if you do please present arguments.
You are not "pointing out" anything, you are stating against evidence.
As per your comparison to C, you are mistaken, this would do whatever C does when it has incorrect `restrict` qualifiers.
See how the book phrases it for yourself: https://doc.rust-lang.org/book/ch15-05-interior-mutability.h... The way RefCell works is not described as a similar but different set of rules or invariants, but as enforcing the same rules.
Please do not ignore the compiler's assumptions in your own programs...