r/cpp
•
u/steveklabnik1
•
Oct 24 '24
•
1
Why Safety Profiles Failed
https://www.circle-lang.org/draft-profiles.html
180
Upvotes
View all comments
Show parent comment
5
u/[deleted] Oct 25 '24
Why would rust have any limitation? Rust can use a function's signature without its body for type/borrow checking. But, this case doesn't even need signature, because rust aliasing rules require that you can only have one mutable reference at any time.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=fd7821845e4fb280c18d9345edab086d
posting error from playground: