Code
mod public {
pub struct hi;
}
mod testing {
use super::public::hi;
}
use testing::hi;
Current output
error[E0603]: struct import `hi` is private
--> src/lib.rs:9:14
|
9 | use testing::hi;
| ^^ private struct import
|
note: the struct import `hi` is defined here...
--> src/lib.rs:6:9
|
6 | use super::public::hi;
| ^^^^^^^^^^^^^^^^^
note: ...and refers to the struct `hi` which is defined here
--> src/lib.rs:2:5
|
2 | pub struct hi;
| ^^^^^^^^^^^^^^ you could import this directly
help: import `hi` directly
|
9 - use testing::hi;
9 + use super::public::hi;
|
Desired output
error[E0603]: struct import `hi` is private
--> src/lib.rs:9:14
|
9 | use testing::hi;
| ^^ private struct import
|
note: the struct import `hi` is defined here...
--> src/lib.rs:6:9
|
6 | use super::public::hi;
| ^^^^^^^^^^^^^^^^^
note: ...and refers to the struct `hi` which is defined here
--> src/lib.rs:2:5
|
2 | pub struct hi;
| ^^^^^^^^^^^^^^ you could import this directly
help: import `hi` directly
|
9 - use testing::hi;
9 + use public::hi;
|
Rationale and extra context
super is not correct
Other cases
Rust Version
latest playground nightly
Anything else?
No response
Code
Current output
Desired output
Rationale and extra context
superis not correctOther cases
Rust Version
Anything else?
No response