@@ -14,7 +14,15 @@ LL | #![warn(unreachable_pub)]
14
14
= help: or consider exporting it for use by other crates
15
15
16
16
warning: unreachable `pub` item
17
- --> $DIR/unreachable_pub-pub_crate.rs:28:5
17
+ --> $DIR/unreachable_pub-pub_crate.rs:27:24
18
+ |
19
+ LL | pub use std::env::{Args}; // braced-use has different item spans than unbraced
20
+ | ^^^^ help: consider restricting its visibility: `pub(crate)`
21
+ |
22
+ = help: or consider exporting it for use by other crates
23
+
24
+ warning: unreachable `pub` item
25
+ --> $DIR/unreachable_pub-pub_crate.rs:29:5
18
26
|
19
27
LL | pub struct Hydrogen {
20
28
| ---^^^^^^^^^^^^^^^^
@@ -24,23 +32,23 @@ LL | pub struct Hydrogen {
24
32
= help: or consider exporting it for use by other crates
25
33
26
34
warning: unreachable `pub` field
27
- --> $DIR/unreachable_pub-pub_crate.rs:30 :9
35
+ --> $DIR/unreachable_pub-pub_crate.rs:31 :9
28
36
|
29
37
LL | pub neutrons: usize,
30
38
| ---^^^^^^^^^^^^^^^^
31
39
| |
32
40
| help: consider restricting its visibility: `pub(crate)`
33
41
34
42
warning: unreachable `pub` item
35
- --> $DIR/unreachable_pub-pub_crate.rs:36 :9
43
+ --> $DIR/unreachable_pub-pub_crate.rs:37 :9
36
44
|
37
45
LL | pub fn count_neutrons(&self) -> usize { self.neutrons }
38
46
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
47
| |
40
48
| help: consider restricting its visibility: `pub(crate)`
41
49
42
50
warning: unreachable `pub` item
43
- --> $DIR/unreachable_pub-pub_crate.rs:40 :5
51
+ --> $DIR/unreachable_pub-pub_crate.rs:41 :5
44
52
|
45
53
LL | pub enum Helium {}
46
54
| ---^^^^^^^^^^^^
@@ -50,7 +58,7 @@ LL | pub enum Helium {}
50
58
= help: or consider exporting it for use by other crates
51
59
52
60
warning: unreachable `pub` item
53
- --> $DIR/unreachable_pub-pub_crate.rs:41 :5
61
+ --> $DIR/unreachable_pub-pub_crate.rs:42 :5
54
62
|
55
63
LL | pub union Lithium { c1: usize, c2: u8 }
56
64
| ---^^^^^^^^^^^^^^
@@ -60,7 +68,7 @@ LL | pub union Lithium { c1: usize, c2: u8 }
60
68
= help: or consider exporting it for use by other crates
61
69
62
70
warning: unreachable `pub` item
63
- --> $DIR/unreachable_pub-pub_crate.rs:42 :5
71
+ --> $DIR/unreachable_pub-pub_crate.rs:43 :5
64
72
|
65
73
LL | pub fn beryllium() {}
66
74
| ---^^^^^^^^^^^^^^^
@@ -70,7 +78,7 @@ LL | pub fn beryllium() {}
70
78
= help: or consider exporting it for use by other crates
71
79
72
80
warning: unreachable `pub` item
73
- --> $DIR/unreachable_pub-pub_crate.rs:43 :5
81
+ --> $DIR/unreachable_pub-pub_crate.rs:44 :5
74
82
|
75
83
LL | pub trait Boron {}
76
84
| ---^^^^^^^^^^^^
@@ -80,7 +88,7 @@ LL | pub trait Boron {}
80
88
= help: or consider exporting it for use by other crates
81
89
82
90
warning: unreachable `pub` item
83
- --> $DIR/unreachable_pub-pub_crate.rs:44 :5
91
+ --> $DIR/unreachable_pub-pub_crate.rs:45 :5
84
92
|
85
93
LL | pub const CARBON: usize = 1;
86
94
| ---^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -90,7 +98,7 @@ LL | pub const CARBON: usize = 1;
90
98
= help: or consider exporting it for use by other crates
91
99
92
100
warning: unreachable `pub` item
93
- --> $DIR/unreachable_pub-pub_crate.rs:45 :5
101
+ --> $DIR/unreachable_pub-pub_crate.rs:46 :5
94
102
|
95
103
LL | pub static NITROGEN: usize = 2;
96
104
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -100,7 +108,7 @@ LL | pub static NITROGEN: usize = 2;
100
108
= help: or consider exporting it for use by other crates
101
109
102
110
warning: unreachable `pub` item
103
- --> $DIR/unreachable_pub-pub_crate.rs:46 :5
111
+ --> $DIR/unreachable_pub-pub_crate.rs:47 :5
104
112
|
105
113
LL | pub type Oxygen = bool;
106
114
| ---^^^^^^^^^^^^^^^^^^^^
@@ -110,7 +118,7 @@ LL | pub type Oxygen = bool;
110
118
= help: or consider exporting it for use by other crates
111
119
112
120
warning: unreachable `pub` item
113
- --> $DIR/unreachable_pub-pub_crate.rs:49 :47
121
+ --> $DIR/unreachable_pub-pub_crate.rs:50 :47
114
122
|
115
123
LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} }
116
124
| -----------^^^^^^^^^^^^^
@@ -123,7 +131,7 @@ LL | define_empty_struct_with_visibility!(pub, Fluorine);
123
131
= help: or consider exporting it for use by other crates
124
132
125
133
warning: unreachable `pub` item
126
- --> $DIR/unreachable_pub-pub_crate.rs:54 :9
134
+ --> $DIR/unreachable_pub-pub_crate.rs:55 :9
127
135
|
128
136
LL | pub fn catalyze() -> bool;
129
137
| ---^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments