For global variable example, I tried to modify the s and it cannot be compiled.
Since s is considered immutable, so s is shared. However the member is mutable so it becomes like that. I think the only way to do it is to keep separation between mutable and immutable variable. That's why we can know for sure that immutable can always be shared while mutable always be copied (by default)