|
| 1 | +error[E0449]: visibility qualifiers are not permitted here |
| 2 | + --> $DIR/suggest-pub-type_const.rs:38:9 |
| 3 | + | |
| 4 | +LL | pub const PUBLIC: usize; |
| 5 | + | ^^^ help: remove the qualifier |
| 6 | + | |
| 7 | + = note: trait items always share the visibility of their trait |
| 8 | + |
| 9 | +error[E0449]: visibility qualifiers are not permitted here |
| 10 | + --> $DIR/suggest-pub-type_const.rs:40:9 |
| 11 | + | |
| 12 | +LL | pub(crate) const RESTRICTED: usize; |
| 13 | + | ^^^^^^^^^^ help: remove the qualifier |
| 14 | + | |
| 15 | + = note: trait items always share the visibility of their trait |
| 16 | + |
| 17 | +error: use of `const` in the type system not defined as `type const` |
| 18 | + --> $DIR/suggest-pub-type_const.rs:15:26 |
| 19 | + | |
| 20 | +LL | pub struct Foo1([u8; Bar::PUBLIC]); |
| 21 | + | ^^^^^^^^^^^ |
| 22 | + | |
| 23 | +help: add `type` before `const` for `impl_item::Bar::PUBLIC` |
| 24 | + | |
| 25 | +LL | pub type const PUBLIC: usize = 1; |
| 26 | + | ++++ |
| 27 | + |
| 28 | +error: use of `const` in the type system not defined as `type const` |
| 29 | + --> $DIR/suggest-pub-type_const.rs:17:26 |
| 30 | + | |
| 31 | +LL | pub struct Foo2([u8; Bar::RESTRICTED]); |
| 32 | + | ^^^^^^^^^^^^^^^ |
| 33 | + | |
| 34 | +help: add `type` before `const` for `impl_item::Bar::RESTRICTED` |
| 35 | + | |
| 36 | +LL | pub(crate) type const RESTRICTED: usize = 1; |
| 37 | + | ++++ |
| 38 | + |
| 39 | +error: use of `const` in the type system not defined as `type const` |
| 40 | + --> $DIR/suggest-pub-type_const.rs:19:26 |
| 41 | + | |
| 42 | +LL | pub struct Foo3([u8; Bar::PRIVATE]); |
| 43 | + | ^^^^^^^^^^^^ |
| 44 | + | |
| 45 | +help: add `type` before `const` for `impl_item::Bar::PRIVATE` |
| 46 | + | |
| 47 | +LL | type const PRIVATE: usize = 1; |
| 48 | + | ++++ |
| 49 | + |
| 50 | +error: use of `const` in the type system not defined as `type const` |
| 51 | + --> $DIR/suggest-pub-type_const.rs:28:26 |
| 52 | + | |
| 53 | +LL | pub struct Foo1([u8; PUBLIC]); |
| 54 | + | ^^^^^^ |
| 55 | + | |
| 56 | +help: add `type` before `const` for `PUBLIC` |
| 57 | + | |
| 58 | +LL | pub type const PUBLIC: usize = 1; |
| 59 | + | ++++ |
| 60 | + |
| 61 | +error: use of `const` in the type system not defined as `type const` |
| 62 | + --> $DIR/suggest-pub-type_const.rs:30:26 |
| 63 | + | |
| 64 | +LL | pub struct Foo2([u8; RESTRICTED]); |
| 65 | + | ^^^^^^^^^^ |
| 66 | + | |
| 67 | +help: add `type` before `const` for `RESTRICTED` |
| 68 | + | |
| 69 | +LL | pub(crate) type const RESTRICTED: usize = 1; |
| 70 | + | ++++ |
| 71 | + |
| 72 | +error: use of `const` in the type system not defined as `type const` |
| 73 | + --> $DIR/suggest-pub-type_const.rs:32:26 |
| 74 | + | |
| 75 | +LL | pub struct Foo3([u8; PRIVATE]); |
| 76 | + | ^^^^^^^ |
| 77 | + | |
| 78 | +help: add `type` before `const` for `PRIVATE` |
| 79 | + | |
| 80 | +LL | type const PRIVATE: usize = 1; |
| 81 | + | ++++ |
| 82 | + |
| 83 | +error: use of `const` in the type system not defined as `type const` |
| 84 | + --> $DIR/suggest-pub-type_const.rs:45:33 |
| 85 | + | |
| 86 | +LL | pub struct Bar<T: Foo>([u8; T::PUBLIC]); |
| 87 | + | ^^^^^^^^^ |
| 88 | + | |
| 89 | +help: add `type` before `const` for `Foo::PUBLIC` |
| 90 | + | |
| 91 | +LL | type pub const PUBLIC: usize; |
| 92 | + | ++++ |
| 93 | + |
| 94 | +error: use of `const` in the type system not defined as `type const` |
| 95 | + --> $DIR/suggest-pub-type_const.rs:47:34 |
| 96 | + | |
| 97 | +LL | pub struct Bar2<T: Foo>([u8; T::RESTRICTED]); |
| 98 | + | ^^^^^^^^^^^^^ |
| 99 | + | |
| 100 | +help: add `type` before `const` for `Foo::RESTRICTED` |
| 101 | + | |
| 102 | +LL | type pub(crate) const RESTRICTED: usize; |
| 103 | + | ++++ |
| 104 | + |
| 105 | +error: use of `const` in the type system not defined as `type const` |
| 106 | + --> $DIR/suggest-pub-type_const.rs:49:34 |
| 107 | + | |
| 108 | +LL | pub struct Bar3<T: Foo>([u8; T::PRIVATE]); |
| 109 | + | ^^^^^^^^^^ |
| 110 | + | |
| 111 | +help: add `type` before `const` for `Foo::PRIVATE` |
| 112 | + | |
| 113 | +LL | type const PRIVATE: usize; |
| 114 | + | ++++ |
| 115 | + |
| 116 | +error: aborting due to 11 previous errors |
| 117 | + |
| 118 | +For more information about this error, try `rustc --explain E0449`. |
0 commit comments