rust/tests/ui/lint/unreachable_pub.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

141 lines
4.2 KiB
Plaintext
Raw Normal View History

warning: unreachable `pub` item
2022-07-23 07:42:54 -05:00
--> $DIR/unreachable_pub.rs:8:13
|
2018-02-22 18:42:32 -06:00
LL | pub use std::fmt;
2022-07-23 07:42:54 -05:00
| --- ^^^^^^^^
| |
| help: consider restricting its visibility: `pub(crate)`
|
2022-09-18 10:55:36 -05:00
= help: or consider exporting it for use by other crates
2020-01-22 17:57:38 -06:00
note: the lint level is defined here
--> $DIR/unreachable_pub.rs:4:9
|
2018-02-22 18:42:32 -06:00
LL | #![warn(unreachable_pub)]
| ^^^^^^^^^^^^^^^
warning: unreachable `pub` item
--> $DIR/unreachable_pub.rs:9: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:13:5
|
2018-02-22 18:42:32 -06:00
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:24:9
|
2018-02-22 18:42:32 -06:00
LL | pub fn count_neutrons(&self) -> usize { self.neutrons }
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: consider restricting its visibility: `pub(crate)`
warning: unreachable `pub` item
--> $DIR/unreachable_pub.rs:33:5
|
2018-02-22 18:42:32 -06:00
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:34:5
|
2018-02-22 18:42:32 -06:00
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:35:5
|
2018-02-22 18:42:32 -06:00
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:36:5
|
2018-02-22 18:42:32 -06:00
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:37:5
|
2018-02-22 18:42:32 -06:00
LL | pub const CARBON: usize = 1;
2022-07-23 07:42:54 -05:00
| ---^^^^^^^^^^^^^^^^^^^^
| |
| 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
|
2018-02-22 18:42:32 -06:00
LL | pub static NITROGEN: usize = 2;
2022-07-23 07:42:54 -05:00
| ---^^^^^^^^^^^^^^^^^^^^^^^
| |
| 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
|
2018-02-22 18:42:32 -06:00
LL | pub type Oxygen = bool;
2022-07-23 07:42:54 -05:00
| ---^^^^^^^^^^^^
| |
| 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:42:47
|
2018-02-22 18:42:32 -06:00
LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} }
2022-07-23 07:42:54 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
2018-02-22 18:42:32 -06:00
LL | define_empty_struct_with_visibility!(pub, Fluorine);
2021-10-14 13:28:28 -05:00
| ---------------------------------------------------
| | |
| | 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:48:9
|
2018-02-22 18:42:32 -06:00
LL | pub fn catalyze() -> bool;
| ---^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: consider restricting its visibility: `pub(crate)`
|
= help: or consider exporting it for use by other crates
warning: 13 warnings emitted