Rust 程序设计语言 简体中文版 1.85.0
x = 6; | ^^^^^ cannot assign twice to immutable variable | help: consider making this binding mutable | 2 | let mut x = 5; | +++ For more information about this error, try `rustc error 现在我们已经了解了变量如何工作,让我们看看变量可以拥有的更多数据类型。 42/562Rust 程序设计语言 简体中文版 数据类型 在 Rust 中,每一个值都有一个特定 数据类型(data type),这告诉 Rust 它被指定为何种数 据,以便明确数据处理方式。我们将看到两类数据类型子集:标量(scalar)和复合 (compound)。 记住,Rust 是 静态类型(statically some_string.push_str(", world"); | ^^^^^^^^^^^ `some_string` is a `&` reference, so the data it refers to cannot be borrowed as mutable | help: consider changing this to be a mutable reference0 码力 | 562 页 | 3.23 MB | 9 天前3
共 1 条
- 1