-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vis note for no pub reexports glob import
- Loading branch information
Showing
12 changed files
with
118 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// check-pass | ||
// https://github.com/rust-lang/rust/issues/115966 | ||
|
||
mod m { | ||
pub(crate) type A = u8; | ||
} | ||
|
||
#[warn(unused_imports)] //~ NOTE: the lint level is defined here | ||
pub use m::*; | ||
//~^ WARNING: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough | ||
//~| NOTE: the most public imported item is `pub(crate)` | ||
|
||
fn main() { | ||
let _: A; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
warning: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough | ||
--> $DIR/no-pub-reexports-but-used.rs:9:9 | ||
| | ||
LL | pub use m::*; | ||
| ^^^^ | ||
| | ||
note: the most public imported item is `pub(crate)` | ||
--> $DIR/no-pub-reexports-but-used.rs:9:9 | ||
| | ||
LL | pub use m::*; | ||
| ^^^^ | ||
= help: reduce the glob import's visibility or increase visibility of imported items | ||
note: the lint level is defined here | ||
--> $DIR/no-pub-reexports-but-used.rs:8:8 | ||
| | ||
LL | #[warn(unused_imports)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
warning: 1 warning emitted | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters