Why is there no standard way of removing the mutability property from a reference?
Lets say I have a mutable object that I way to perform some operations on, then continue using this object only as a reference.
Is there a good reason for not having a built in function/trait that lets me drop the mutability property within a scope? I know that some rust programmers define a smaller scope where the mutable reference is created and dropped, but to a novice like me it feels like we could equally signal to the compiler with a function/trait?