mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
27 lines
885 B
Plaintext
27 lines
885 B
Plaintext
error: struct `PubStruct` is reachable but cannot be named
|
|
--> $DIR/unnameable_types.rs:4:5
|
|
|
|
|
LL | pub struct PubStruct(pub i32);
|
|
| ^^^^^^^^^^^^^^^^^^^^ reachable at visibility `pub`, but can only be named at visibility `pub(crate)`
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/unnameable_types.rs:1:9
|
|
|
|
|
LL | #![deny(unnameable_types)]
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: enum `PubE` is reachable but cannot be named
|
|
--> $DIR/unnameable_types.rs:6:5
|
|
|
|
|
LL | pub enum PubE {
|
|
| ^^^^^^^^^^^^^ reachable at visibility `pub`, but can only be named at visibility `pub(crate)`
|
|
|
|
error: trait `PubTr` is reachable but cannot be named
|
|
--> $DIR/unnameable_types.rs:10:5
|
|
|
|
|
LL | pub trait PubTr {
|
|
| ^^^^^^^^^^^^^^^ reachable at visibility `pub`, but can only be named at visibility `pub(crate)`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|