Skip to content

12.6 Visibility and Privacy Example Bug? #1039

@davyzhu

Description

@davyzhu

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions