gtk-rs / gir

Tool to generate rust bindings and user API for glib-based libraries
https://gtk-rs.org/gir/book/
MIT License
225 stars 98 forks source link

Spurious clippy warning about unused import #1555

Closed philn closed 3 months ago

philn commented 3 months ago

From https://gitlab.freedesktop.org/philn/gstreamer-rs/-/jobs/56594614

cargo clippy --locked --color=always --manifest-path gstreamer-mpegts/Cargo.toml --features=v1_24 --all-targets -- -D warnings -W unknown-lints
...
error: unused import: `self::section::Section`
  --> gstreamer-mpegts/src/auto/mod.rs:11:9
   |
11 | pub use self::section::Section;
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_imports)]`
error: could not compile `gstreamer-mpegts` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
philn commented 3 months ago

That import should be needed when v1_20 is enabled.

bilelmoussaoui commented 3 months ago

That is not an import, it is re-export. So something is wrong somewhere else :)

philn commented 3 months ago

ccing @sdroege who asked me to fill this issue ;)

sdroege commented 3 months ago

Yes, it was simply all wrong :) https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1414