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
Forgive my ignorance, but should it not be the case that &mut references (and *mut pointers?) are mapped in C as restrict-pointers, not regular ol' pointers? Rust assumes &mut references are noalias, and at least used to generate LLVM IR to indicate that (though at various points that has introduced bugs). It seems, then, that the correct mapping for Rust mut things is restrict. Of course this somewhat begs the question of what the equivalent of a non-restrict-pointer is in Rust, but my understanding is no such thing exists.
The text was updated successfully, but these errors were encountered:
Yeah, we could do that potentially, though AIUI rustc still doesn't make mutable references noalias... I don't think it'd be controversial to put this behind a flag if wanted.
A non-restrict pointer in rust is just a *mut T pointer :)
Forgive my ignorance, but should it not be the case that &mut references (and *mut pointers?) are mapped in C as restrict-pointers, not regular ol' pointers? Rust assumes &mut references are noalias, and at least used to generate LLVM IR to indicate that (though at various points that has introduced bugs). It seems, then, that the correct mapping for Rust
mut
things is restrict. Of course this somewhat begs the question of what the equivalent of a non-restrict-pointer is in Rust, but my understanding is no such thing exists.The text was updated successfully, but these errors were encountered: