-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vis note for no pub reexports glob import #115993
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Minimized reproduction: mod m {
pub(crate) type A = u8;
}
pub use m::*; // warning: glob import doesn't reexport anything because no candidate is public enough
fn main() {
let _: A;
} This warning uses a wrong model of glob import's behavior. |
Sigh, turns out this was the right model of glob import's behavior, and for globs we produced the same error as for single imports in the same case. |
On closer look, the lint currently works as expected, the change in this PR is not correct. The only problem is that it is not really an unused imports lint.
=>
Let me check if there's any more appropriate category for lint than |
Yeah, besides introducing a new lint name, which I'm hesitant to do, the only plausible candidates are Let's keep it |
We cannot obtain concrete information (such as |
Printing whatever is available from |
This comment was marked as resolved.
This comment was marked as resolved.
report `unused_import` for empty reexports even it is pub Fixes rust-lang#116032 An easy fix. r? `@petrochenkov` (Discovered this issue while reviewing rust-lang#115993.)
report `unused_import` for empty reexports even it is pub Fixes rust-lang#116032 An easy fix. r? `@petrochenkov` (Discovered this issue while reviewing rust-lang#115993.)
report `unused_import` for empty reexports even it is pub Fixes rust-lang#116032 An easy fix. r? `@petrochenkov` (Discovered this issue while reviewing rust-lang#115993.)
report `unused_import` for empty reexports even it is pub Fixes rust-lang#116032 An easy fix. r? `@petrochenkov` (Discovered this issue while reviewing rust-lang#115993.)
report `unused_import` for empty reexports even it is pub Fixes rust-lang#116032 An easy fix. r? `@petrochenkov` (Discovered this issue while reviewing rust-lang#115993.)
I have postponed this lint report until the privacy check in order to print the maximum visibility information. |
report `unused_import` for empty reexports even it is pub Fixes rust-lang#116032 An easy fix. r? `@petrochenkov` (Discovered this issue while reviewing rust-lang#115993.)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
96e0a95
to
6521251
Compare
3f52b4c
to
244dd83
Compare
ci is green. @rustbot ready |
This comment has been minimized.
This comment has been minimized.
@rustbot ready |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (64d7e0d): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 672.331s -> 672.427s (0.01%) |
report `unused_import` for empty reexports even it is pub Fixes rust-lang#116032 An easy fix. r? `@petrochenkov` (Discovered this issue while reviewing rust-lang#115993.)
Fixes #115966
Only trigger the
unused_import
lint when it's not being used.r? @petrochenkov