251 lines
7.4 KiB
Plaintext
251 lines
7.4 KiB
Plaintext
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:10:13
|
|
|
|
|
LL | pub use std::fmt;
|
|
| --- ^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
note: the lint level is defined here
|
|
--> $DIR/unreachable_pub.rs:6:9
|
|
|
|
|
LL | #![warn(unreachable_pub)]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:11:24
|
|
|
|
|
LL | pub use std::env::{Args}; // braced-use has different item spans than unbraced
|
|
| --- ^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:15:5
|
|
|
|
|
LL | pub struct Hydrogen {
|
|
| ---^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:26:9
|
|
|
|
|
LL | pub fn count_neutrons(&self) -> usize { self.neutrons }
|
|
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:35:5
|
|
|
|
|
LL | pub enum Helium {}
|
|
| ---^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:36:5
|
|
|
|
|
LL | pub union Lithium { c1: usize, c2: u8 }
|
|
| ---^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:37:5
|
|
|
|
|
LL | pub fn beryllium() {}
|
|
| ---^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:38:5
|
|
|
|
|
LL | pub trait Boron {}
|
|
| ---^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:39:5
|
|
|
|
|
LL | pub const CARBON: usize = 1;
|
|
| ---^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:40:5
|
|
|
|
|
LL | pub static NITROGEN: usize = 2;
|
|
| ---^^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:41:5
|
|
|
|
|
LL | pub type Oxygen = bool;
|
|
| ---^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:44:47
|
|
|
|
|
LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
...
|
|
LL | define_empty_struct_with_visibility!(pub, Fluorine);
|
|
| ---------------------------------------------------
|
|
| | |
|
|
| | help: consider restricting its visibility: `pub(crate)`
|
|
| in this macro invocation
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
= note: this warning originates in the macro `define_empty_struct_with_visibility` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:50:9
|
|
|
|
|
LL | pub fn catalyze() -> bool;
|
|
| ---^^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:62:5
|
|
|
|
|
LL | pub mod pub_in_private {
|
|
| ---^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:68:13
|
|
|
|
|
LL | pub struct Foo;
|
|
| ---^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:74:13
|
|
|
|
|
LL | pub struct Foo;
|
|
| ---^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:86:13
|
|
|
|
|
LL | pub use fpu_precision::set_precision;
|
|
| --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:54:9
|
|
|
|
|
LL | pub enum Helium {}
|
|
| ---^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(super)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:55:9
|
|
|
|
|
LL | pub fn beryllium() {}
|
|
| ---^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(super)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:59:9
|
|
|
|
|
LL | pub const CARBON: usize = 1;
|
|
| ---^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:63:9
|
|
|
|
|
LL | pub static NITROGEN: usize = 2;
|
|
| ---^^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:77:17
|
|
|
|
|
LL | pub struct Bar;
|
|
| ---^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:89:9
|
|
|
|
|
LL | pub fn set_precision<T>() {}
|
|
| ---^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(crate)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: unreachable `pub` item
|
|
--> $DIR/unreachable_pub.rs:90:9
|
|
|
|
|
LL | pub fn set_micro_precision<T>() {}
|
|
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: consider restricting its visibility: `pub(super)`
|
|
|
|
|
= help: or consider exporting it for use by other crates
|
|
|
|
warning: 24 warnings emitted
|
|
|