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 enough --> src/main.rs:6:13 | 5 | let x = 5; 207/562Rust 程序设计语言 简体中文版 | - binding `x` declared here 6 | r = &x; | ^^ borrowed value does not live long enough --> src/main.rs:6:44 | 5 | let string2 = String::from("xyz"); | ------- binding `string2` declared here 6 | result = longest(string1.as_str(), string2.as_str()); |0 码力 | 562 页 | 3.23 MB | 9 天前3
共 1 条
- 1