]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/unreachable_pub.stderr
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / unreachable_pub.stderr
1 warning: unreachable `pub` item
2   --> $DIR/unreachable_pub.rs:8:13
3    |
4 LL |     pub use std::fmt;
5    |     ---     ^^^^^^^^
6    |     |
7    |     help: consider restricting its visibility: `pub(crate)`
8    |
9    = help: or consider exporting it for use by other crates
10 note: the lint level is defined here
11   --> $DIR/unreachable_pub.rs:4:9
12    |
13 LL | #![warn(unreachable_pub)]
14    |         ^^^^^^^^^^^^^^^
15
16 warning: unreachable `pub` item
17   --> $DIR/unreachable_pub.rs:9:24
18    |
19 LL |     pub use std::env::{Args}; // braced-use has different item spans than unbraced
20    |     ---                ^^^^
21    |     |
22    |     help: consider restricting its visibility: `pub(crate)`
23    |
24    = help: or consider exporting it for use by other crates
25
26 warning: unreachable `pub` item
27   --> $DIR/unreachable_pub.rs:12:5
28    |
29 LL |     pub struct Hydrogen {
30    |     ---^^^^^^^^^^^^^^^^
31    |     |
32    |     help: consider restricting its visibility: `pub(crate)`
33    |
34    = help: or consider exporting it for use by other crates
35
36 warning: unreachable `pub` field
37   --> $DIR/unreachable_pub.rs:14:9
38    |
39 LL |         pub neutrons: usize,
40    |         ---^^^^^^^^^^^^^^^^
41    |         |
42    |         help: consider restricting its visibility: `pub(crate)`
43
44 warning: unreachable `pub` item
45   --> $DIR/unreachable_pub.rs:20:9
46    |
47 LL |         pub fn count_neutrons(&self) -> usize { self.neutrons }
48    |         ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49    |         |
50    |         help: consider restricting its visibility: `pub(crate)`
51
52 warning: unreachable `pub` item
53   --> $DIR/unreachable_pub.rs:29:5
54    |
55 LL |     pub enum Helium {}
56    |     ---^^^^^^^^^^^^
57    |     |
58    |     help: consider restricting its visibility: `pub(crate)`
59    |
60    = help: or consider exporting it for use by other crates
61
62 warning: unreachable `pub` item
63   --> $DIR/unreachable_pub.rs:30:5
64    |
65 LL |     pub union Lithium { c1: usize, c2: u8 }
66    |     ---^^^^^^^^^^^^^^
67    |     |
68    |     help: consider restricting its visibility: `pub(crate)`
69    |
70    = help: or consider exporting it for use by other crates
71
72 warning: unreachable `pub` item
73   --> $DIR/unreachable_pub.rs:31:5
74    |
75 LL |     pub fn beryllium() {}
76    |     ---^^^^^^^^^^^^^^^
77    |     |
78    |     help: consider restricting its visibility: `pub(crate)`
79    |
80    = help: or consider exporting it for use by other crates
81
82 warning: unreachable `pub` item
83   --> $DIR/unreachable_pub.rs:32:5
84    |
85 LL |     pub trait Boron {}
86    |     ---^^^^^^^^^^^^
87    |     |
88    |     help: consider restricting its visibility: `pub(crate)`
89    |
90    = help: or consider exporting it for use by other crates
91
92 warning: unreachable `pub` item
93   --> $DIR/unreachable_pub.rs:33:5
94    |
95 LL |     pub const CARBON: usize = 1;
96    |     ---^^^^^^^^^^^^^^^^^^^^
97    |     |
98    |     help: consider restricting its visibility: `pub(crate)`
99    |
100    = help: or consider exporting it for use by other crates
101
102 warning: unreachable `pub` item
103   --> $DIR/unreachable_pub.rs:34:5
104    |
105 LL |     pub static NITROGEN: usize = 2;
106    |     ---^^^^^^^^^^^^^^^^^^^^^^^
107    |     |
108    |     help: consider restricting its visibility: `pub(crate)`
109    |
110    = help: or consider exporting it for use by other crates
111
112 warning: unreachable `pub` item
113   --> $DIR/unreachable_pub.rs:35:5
114    |
115 LL |     pub type Oxygen = bool;
116    |     ---^^^^^^^^^^^^
117    |     |
118    |     help: consider restricting its visibility: `pub(crate)`
119    |
120    = help: or consider exporting it for use by other crates
121
122 warning: unreachable `pub` item
123   --> $DIR/unreachable_pub.rs:38:47
124    |
125 LL |         ($visibility: vis, $name: ident) => { $visibility struct $name {} }
126    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
127 ...
128 LL |     define_empty_struct_with_visibility!(pub, Fluorine);
129    |     ---------------------------------------------------
130    |     |                                    |
131    |     |                                    help: consider restricting its visibility: `pub(crate)`
132    |     in this macro invocation
133    |
134    = help: or consider exporting it for use by other crates
135    = note: this warning originates in the macro `define_empty_struct_with_visibility` (in Nightly builds, run with -Z macro-backtrace for more info)
136
137 warning: unreachable `pub` item
138   --> $DIR/unreachable_pub.rs:44:9
139    |
140 LL |         pub fn catalyze() -> bool;
141    |         ---^^^^^^^^^^^^^^^^^^^^^^
142    |         |
143    |         help: consider restricting its visibility: `pub(crate)`
144    |
145    = help: or consider exporting it for use by other crates
146
147 warning: 14 warnings emitted
148