Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Q8: use add_one, not use add-one crate #11

Open
yangwenmai opened this issue Apr 30, 2019 · 2 comments
Open

Q8: use add_one, not use add-one crate #11

yangwenmai opened this issue Apr 30, 2019 · 2 comments
Labels
question Further information is requested

Comments

@yangwenmai
Copy link
Owner

yangwenmai commented Apr 30, 2019

/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
@yangwenmai yangwenmai added the question Further information is requested label Apr 30, 2019
@Gump9
Copy link

Gump9 commented Jul 10, 2023

这是为什么呀,我学到这里也有点儿疑惑,请问您搞清楚了吗

@yangwenmai
Copy link
Owner Author

看文档:https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html

好像没有 add-one 了?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants