在 /office/rust/book/more-about-cargo/ch14-03-cargo-workspaces.html(link: https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html) 中提到:use add_one; 但是之前命名的是 add-one ,为什么引用的时候,是用下划线呢?
使用 use add-one 报错:
error: expected one of `::`, `;`, or `as`, found `-`
--> adder/src/main.rs:1:8
|
1 | use add-one;
| ^ expected one of `::`, `;`, or `as` here
在
/office/rust/book/more-about-cargo/ch14-03-cargo-workspaces.html(link: https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html) 中提到:use add_one;但是之前命名的是add-one,为什么引用的时候,是用下划线呢?使用
use add-one报错: