官术网_书友最值得收藏!

Variable mutability

Unlike many other languages, Rust defaults to non-mutability of variables. That means that variable bindings are actually constants if not explicitly defined as mutable. The compiler checks against all variable mutations and refuses to accept mutating non-mutable variable bindings.

If you come from one of the C family of languages, a non-mutable can be considered to be roughly the same as a const type.

主站蜘蛛池模板: 西安市| 柳河县| 凤山市| 怀化市| 女性| 宣武区| 北海市| 天气| 宜城市| 盖州市| 历史| 彭州市| 晋江市| 宝鸡市| 静乐县| 长沙市| 云林县| 西华县| 康平县| 法库县| 沭阳县| 东兴市| 开江县| 恭城| 化德县| 德安县| 泸定县| 黔东| 邢台县| 呼图壁县| 集贤县| 烟台市| 武城县| 邹平县| 陇西县| 安国市| 织金县| 贡嘎县| 桑日县| 固镇县| 孝义市|