可变性
变量绑定默认是不可变的,但可以使用 mut
修饰符来改变这一行为。
编译器会对可变性错误给出详细的诊断信息。
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
变量绑定默认是不可变的,但可以使用 mut
修饰符来改变这一行为。
编译器会对可变性错误给出详细的诊断信息。