There does exist a crate that allows you to turn it off. Unfortunately the compiler will still compiler your code assuming the same exclusive access rules imposed by the borrow checker, so any time you break the borrow checker rules you’re basically guaranteed to segfault.
The rust compiler always assumes mutable pointers are exclusive. This is the crux of your issue with the borrow checker. If you don’t make this assumption, then you can’t automatically drop variables when they fall out of scope, thus the programmer would have to manually allocate memory.
You may prefer even then to allocate memory yourself, but if I was you I would just trust the rust compiler in its assumption that it can optimize programs much better when all pointers are exclusive, and learn to program in a compliant manner
There does exist a crate that allows you to turn it off. Unfortunately the compiler will still compiler your code assuming the same exclusive access rules imposed by the borrow checker, so any time you break the borrow checker rules you’re basically guaranteed to segfault.
The rust compiler always assumes mutable pointers are exclusive. This is the crux of your issue with the borrow checker. If you don’t make this assumption, then you can’t automatically drop variables when they fall out of scope, thus the programmer would have to manually allocate memory.
You may prefer even then to allocate memory yourself, but if I was you I would just trust the rust compiler in its assumption that it can optimize programs much better when all pointers are exclusive, and learn to program in a compliant manner