1 A private item was used outside its scope.
3 Erroneous code example:
7 const PRIVATE: u32 = 0x_a_bad_1dea_u32; // This const is private, so we
8 // can't use it outside of the
9 // `SomeModule` module.
12 println!("const value: {}", SomeModule::PRIVATE); // error: constant `PRIVATE`
16 In order to fix this error, you need to make the item public by using the `pub`
21 pub const PRIVATE: u32 = 0x_a_bad_1dea_u32; // We set it public by using the
25 println!("const value: {}", SomeModule::PRIVATE); // ok!