You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have #![warn(clippy::pedantic)] in my crate's lib.rs. In CXX bridges, this can lead to warnings about things that are not my business. If you could please use #[allow(clippy::pedantic)] in the relevant, not all-encompassing locations, this would solve these warnings. If you aren't sure where exactly, here's concrete warnings I get:
Without #![allow(clippy::ptr_as_ptr)] in my bridge, I get `as` casting between raw pointers without changing its mutability on non-self parameters in the extern "C++" block that have the pattern &T or Pin<&mut T>, where T is a C++ bridge type. See https://rust-lang.github.io/rust-clippy/master/index.html#ptr_as_ptr.
Not related to #![warn(clippy::pedantic)] is the following kind of warning: Without #![allow(dead_code)] in my bridge, I get associated constant `FOO_BAR` is never used on enums. Is there a better allowable warning possible, something with "unused"? The worst is, I can't use #[allow(dead_code)] on the whole enum, but only on every single currently unused variant, which are many in that large enum. (Hence, I'm temporarily using it on the whole bridge, which works again.)
I have
#![warn(clippy::pedantic)]
in my crate'slib.rs
. In CXX bridges, this can lead to warnings about things that are not my business. If you could please use#[allow(clippy::pedantic)]
in the relevant, not all-encompassing locations, this would solve these warnings. If you aren't sure where exactly, here's concrete warnings I get:#![allow(clippy::ptr_as_ptr)]
in my bridge, I get`as` casting between raw pointers without changing its mutability
on non-self
parameters in theextern "C++"
block that have the pattern&T
orPin<&mut T>
, whereT
is a C++ bridge type. See https://rust-lang.github.io/rust-clippy/master/index.html#ptr_as_ptr.#![allow(clippy::expl_impl_clone_on_copy)]
in my bridge, I getyou are implementing `Clone` explicitly on a `Copy` type
inenum
s that work together with anextern "C++"
type of the same name (in that sense). See https://rust-lang.github.io/rust-clippy/master/index.html#expl_impl_clone_on_copy.Not related to
#![warn(clippy::pedantic)]
is the following kind of warning: Without#![allow(dead_code)]
in my bridge, I getassociated constant `FOO_BAR` is never used
onenum
s. Is there a betterallow
able warning possible, something with "unused"? The worst is, I can't use#[allow(dead_code)]
on the whole enum, but only on every single currently unused variant, which are many in that largeenum
. (Hence, I'm temporarily using it on the whole bridge, which works again.)Related: #1061
The text was updated successfully, but these errors were encountered: