Skip to content

12.6 Visibility and Privacy Example Bug? #1039

New issue

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

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

Already on GitHub? Sign in to your account

Closed
davyzhu opened this issue Jun 4, 2021 · 2 comments · Fixed by #1041
Closed

12.6 Visibility and Privacy Example Bug? #1039

davyzhu opened this issue Jun 4, 2021 · 2 comments · Fixed by #1041

Comments

@davyzhu
Copy link

davyzhu commented Jun 4, 2021

First Example in https://doc.rust-lang.org/reference/visibility-and-privacy.html
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=215908aa41200a4e9ce3841cff3dd978

   Compiling playground v0.0.1 (/playground)
error[E0432]: unresolved import `crate_helper_module`
  --> src/lib.rs:22:9
   |
22 |     use crate_helper_module;
   |         ^^^^^^^^^^^^^^^^^^^ no external crate `crate_helper_module`

This line should be changed to

use crate::crate_helper_module;
@bjorn3
Copy link
Member

bjorn3 commented Jun 4, 2021

It is currect for the 2015 edition.

@ehuss
Copy link
Contributor

ehuss commented Jun 4, 2021

I posted #1041 to change things to default to 2018 to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants