Conflicting implementations of trait Clone for type <type> #479

Open
opened 2026-03-21 08:52:18 -05:00 by FalkRaft · 3 comments
FalkRaft commented 2026-03-21 08:52:18 -05:00 (Migrated from github.com)

Description
When I tried to build a project that requires bitflags, it kept on failing to build if the version of bitflags was specifically v2.11.0. For whatever reason, this version is tie culprit for the build errors.

Additional Context

  • OS: macOS Tahoe 26.3.1
  • rustc: 1.94.0 (4a4ef493e 2026-03-02)
  • rustup: rustup 1.28.2 (e4f3ad6f8 2025-04-28)

Examples
Tauri:

**Logs**
Build Log:

error[E0119]: conflicting implementations of trait `Clone` for type `ModifiersState`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tao-0.34.6/src/keyboard.rs:105:1
    |
105 | / bitflags! {
106 | |     /// Represents the current state of the keyboard modifiers
107 | |     ///
108 | |     /// Each flag represents a modifier and is set if this modifier is active.
109 | |     #[derive(Clone, Copy, Default, Debug, PartialEq)]
    | |              ----- first implementation here
...   |
130 | | }
    | |_^ conflicting implementation for `ModifiersState`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

`cargo tree -i bitflags`:

error: There are multiple `bitflags` packages in your project, and the specification `bitflags` is ambiguous.
Please re-run this command with one of the following specifications:
  bitflags@1.3.2
  bitflags@2.11.0

RT Game Engine (from the WebGPU website):

   Compiling spirv v0.3.0+sdk-1.3.268.0
   Compiling gpu-descriptor-types v0.2.0
   Compiling gpu-alloc-types v0.3.0
   Compiling metal v0.31.0
   Compiling wgpu-types v25.0.0
   Compiling png v0.18.1
   Compiling rapier3d v0.23.1
error[E0119]: conflicting implementations of trait `Clone` for type `ImageOperands`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:10:1
   |
10 | bitflags! { # [doc = "SPIR-V operand kind: [ImageOpe... const NONTEMPORAL = 16384u32 ; const OFFSETS = 65536u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                                |
   | |                                                                                                                                                                                first implementation here
   | conflicting implementation for `ImageOperands`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `DescriptorPoolCreateFlags`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gpu-descriptor-types-0.2.0/src/types.rs:1:1
   |
 1 | / bitflags::bitflags! {
 2 | |     /// Flags to augment descriptor pool creation.
 3 | |     ///
 4 | |     /// Match corresponding bits in Vulkan.
 5 | |     #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
   | |              ----- first implementation here
...  |
13 | | }
   | |_^ conflicting implementation for `DescriptorPoolCreateFlags`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `AllocationFlags`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gpu-alloc-types-0.3.0/src/device.rs:67:1
   |
67 | / bitflags::bitflags! {
68 | |     /// Allocation flags
69 | |     #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
70 | |     #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
   | |              ----- first implementation here
...  |
76 | | }
   | |_^ conflicting implementation for `AllocationFlags`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `FPFastMathMode`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:11:1
   |
11 | bitflags! { # [doc = "SPIR-V operand kind: [FPFastMa...INTEL = 65536u32 ; const ALLOW_REASSOC_INTEL = 131072u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                                       |
   | |                                                                                                                                                                                       first implementation here
   | conflicting implementation for `FPFastMathMode`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `MemoryPropertyFlags`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gpu-alloc-types-0.3.0/src/types.rs:1:1
   |
 1 | / bitflags::bitflags! {
 2 | |     /// Memory properties type.
 3 | |     #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
 4 | |     #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
   | |              ----- first implementation here
...  |
38 | | }
   | |_^ conflicting implementation for `MemoryPropertyFlags`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `SelectionControl`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:12:1
   |
12 | bitflags! { # [doc = "SPIR-V operand kind: [Selectio... 0u32 ; const FLATTEN = 1u32 ; const DONT_FLATTEN = 2u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                                         |
   | |                                                                                                                                                                                         first implementation here
   | conflicting implementation for `SelectionControl`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `LoopControl`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:13:1
   |
13 | bitflags! { # [doc = "SPIR-V operand kind: [LoopCont...16u32 ; const MAX_REINVOCATION_DELAY_INTEL = 33554432u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                          |
   | |                                                                                                                                                                          first implementation here
   | conflicting implementation for `LoopControl`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `FunctionControl`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:14:1
   |
14 | bitflags! { # [doc = "SPIR-V operand kind: [Function...2 ; const CONST = 8u32 ; const OPT_NONE_INTEL = 65536u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                                      |
   | |                                                                                                                                                                                      first implementation here
   | conflicting implementation for `FunctionControl`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `MemorySemantics`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:15:1
   |
15 | bitflags! { # [doc = "SPIR-V operand kind: [MemorySe... MAKE_VISIBLE_KHR = 16384u32 ; const VOLATILE = 32768u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                                      |
   | |                                                                                                                                                                                      first implementation here
   | conflicting implementation for `MemorySemantics`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `MemoryAccess`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:16:1
   |
16 | bitflags! { # [doc = "SPIR-V operand kind: [MemoryAc..._MASK = 65536u32 ; const NO_ALIAS_INTEL_MASK = 131072u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                             |
   | |                                                                                                                                                                             first implementation here
   | conflicting implementation for `MemoryAccess`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `KernelProfilingInfo`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:17:1
   |
17 | bitflags! { # [doc = "SPIR-V operand kind: [KernelPr...o : u32 { const NONE = 0u32 ; const CMD_EXEC_TIME = 1u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                                                    |
   | |                                                                                                                                                                                                    first implementation here
   | conflicting implementation for `KernelProfilingInfo`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `RayFlags`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:18:1
   |
18 | bitflags! { # [doc = "SPIR-V operand kind: [RayFlags...2u32 ; const FORCE_OPACITY_MICROMAP2_STATE_EXT = 1024u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                 |
   | |                                                                                                                                                                 first implementation here
   | conflicting implementation for `RayFlags`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `FragmentShadingRate`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:19:1
   |
19 | bitflags! { # [doc = "SPIR-V operand kind: [Fragment...IZONTAL2_PIXELS = 4u32 ; const HORIZONTAL4_PIXELS = 8u32 ; } }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |                                                                                                                                                                                                    |
   | |                                                                                                                                                                                                    first implementation here
   | conflicting implementation for `FragmentShadingRate`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `CooperativeMatrixOperands`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:2830:1
     |
2830 | bitflags! { # [doc = "SPIR-V operand kind: [Cooper...NTS_KHR = 8u32 ; const SATURATING_ACCUMULATION_KHR = 16u32 ; } }
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     | |                                                                                                                                                                                                                      |
     | |                                                                                                                                                                                                                      first implementation here
     | conflicting implementation for `CooperativeMatrixOperands`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `common::Transformations`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/png-0.18.1/src/common.rs:858:1
    |
858 | / bitflags::bitflags! {
859 | |     /// Output transformations
860 | |     ///
861 | |     /// Many flags from libpng are not yet supported. A PR discussing/adding them would be nice.
...   |
894 | |     #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
    | |              ----- first implementation here
...   |
907 | | }
    | |_^ conflicting implementation for `common::Transformations`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0119`.
error: could not compile `gpu-descriptor-types` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `gpu-alloc-types` (lib) due to 2 previous errors
error[E0119]: conflicting implementations of trait `Clone` for type `FeaturesWGPU`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/features.rs:132:13
     |
 132 | /             bitflags::bitflags! {
 133 | |                 $(#[$bit_outer])*
 134 | |                 $vis struct $inner_name: $T {
 135 | |                     $(
...    |
 140 | |             }
     | |_____________^ conflicting implementation for `FeaturesWGPU`
...
 514 | / bitflags_array! {
 515 | |     /// Features that are not guaranteed to be supported.
 516 | |     ///
 517 | |     /// These are either part of the webgpu standard, or are extension features supported by
...    |
 543 | |     #[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Hash)]
     | |                                    ----- first implementation here
...    |
1415 | | }
     | |_- in this macro invocation
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags_array` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `FeaturesWebGPU`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/features.rs:132:13
     |
 132 | /             bitflags::bitflags! {
 133 | |                 $(#[$bit_outer])*
 134 | |                 $vis struct $inner_name: $T {
 135 | |                     $(
...    |
 140 | |             }
     | |_____________^ conflicting implementation for `FeaturesWebGPU`
...
 514 | / bitflags_array! {
 515 | |     /// Features that are not guaranteed to be supported.
 516 | |     ///
 517 | |     /// These are either part of the webgpu standard, or are extension features supported by
...    |
1211 | |     #[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Hash)]
     | |                                    ----- first implementation here
...    |
1415 | | }
     | |_- in this macro invocation
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags_array` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `InstanceFlags`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/instance.rs:56:1
    |
 56 | / bitflags::bitflags! {
 57 | |     /// Instance debugging flags.
 58 | |     ///
 59 | |     /// These are not part of the WebGPU standard.
...   |
 63 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
    | |                           ----- first implementation here
...   |
119 | | }
    | |_^ conflicting implementation for `InstanceFlags`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `Backends`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:216:1
    |
216 | / bitflags::bitflags! {
217 | |     /// Represents the backends that wgpu will use.
218 | |     #[repr(transparent)]
219 | |     #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
220 | |     #[cfg_attr(feature = "serde", serde(transparent))]
221 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
    | |                           ----- first implementation here
...   |
269 | | }
    | |_^ conflicting implementation for `Backends`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `DownlevelFlags`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:946:1
     |
 946 | / bitflags::bitflags! {
 947 | |     /// Binary flags listing features that may or may not be present on downlevel adapters.
 948 | |     ///
 949 | |     /// A downlevel adapter is a GPU adapter that WGPU supports, but with potentially limited
...    |
 959 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
     | |                           ----- first implementation here
...    |
1111 | | }
     | |_^ conflicting implementation for `DownlevelFlags`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `ShaderStages`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:1290:1
     |
1290 | / bitflags::bitflags! {
1291 | |     /// Describes the shader stages that a binding will be visible from.
1292 | |     ///
1293 | |     /// These can be combined so something that is visible from both vertex and fragment shaders can be defined as:
...    |
1302 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     | |                           ----- first implementation here
...    |
1319 | | }
     | |_^ conflicting implementation for `ShaderStages`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `TextureFormatFeatureFlags`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:1773:1
     |
1773 | / bitflags::bitflags! {
1774 | |     /// Feature flags for a texture format.
1775 | |     #[repr(transparent)]
1776 | |     #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1777 | |     #[cfg_attr(feature = "serde", serde(transparent))]
1778 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     | |                           ----- first implementation here
...    |
1809 | | }
     | |_^ conflicting implementation for `TextureFormatFeatureFlags`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `BufferUsages`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:4951:1
     |
4951 | / bitflags::bitflags! {
4952 | |     /// Different ways that you can use a buffer.
4953 | |     ///
4954 | |     /// The usages determine what kind of memory the buffer is allocated from and what
...    |
4962 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     | |                           ----- first implementation here
...    |
4999 | | }
     | |_^ conflicting implementation for `BufferUsages`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `BufferUses`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:5001:1
     |
5001 | / bitflags::bitflags! {
5002 | |     /// Similar to `BufferUsages`, but used only for `CommandEncoder::transition_resources`.
5003 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     | |                           ----- first implementation here
5004 | |     pub struct BufferUses: u16 {
...    |
5050 | | }
     | |_^ conflicting implementation for `BufferUses`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `TextureUsages`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:5256:1
     |
5256 | / bitflags::bitflags! {
5257 | |     /// Different ways that you can use a texture.
5258 | |     ///
5259 | |     /// The usages determine what kind of memory the texture is allocated from and what
...    |
5267 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     | |                           ----- first implementation here
...    |
5295 | | }
     | |_^ conflicting implementation for `TextureUsages`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `TextureUses`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:5297:1
     |
5297 | / bitflags::bitflags! {
5298 | |     /// Similar to `TextureUsages`, but used only for `CommandEncoder::transition_resources`.
5299 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     | |                           ----- first implementation here
5300 | |     pub struct TextureUses: u16 {
...    |
5349 | | }
     | |_^ conflicting implementation for `TextureUses`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `PipelineStatisticsTypes`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:7223:1
     |
7223 | / bitflags::bitflags! {
7224 | |     /// Flags for which pipeline data should be recorded in a query.
7225 | |     ///
7226 | |     /// Used in [`QueryType`].
...    |
7240 | |     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     | |                           ----- first implementation here
...    |
7260 | | }
     | |_^ conflicting implementation for `PipelineStatisticsTypes`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `AccelerationStructureFlags`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:7499:1
     |
7499 | / bitflags::bitflags!(
7500 | |     /// Flags for acceleration structures
7501 | |     #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7502 | |     #[cfg_attr(feature = "serde", serde(transparent))]
7503 | |     #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
     | |              ----- first implementation here
...    |
7525 | | );
     | |_^ conflicting implementation for `AccelerationStructureFlags`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `AccelerationStructureGeometryFlags`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:7527:1
     |
7527 | / bitflags::bitflags!(
7528 | |     /// Flags for acceleration structure geometries
7529 | |     #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7530 | |     #[cfg_attr(feature = "serde", serde(transparent))]
7531 | |     #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
     | |              ----- first implementation here
...    |
7545 | | );
     | |_^ conflicting implementation for `AccelerationStructureGeometryFlags`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `spirv` (lib) due to 11 previous errors
error[E0119]: conflicting implementations of trait `Clone` for type `MTLAccelerationStructureInstanceOptions`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/acceleration_structure.rs:10:1
   |
10 | / bitflags::bitflags! {
11 | |     #[derive(Copy, Clone, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)]
   | |                    ----- first implementation here
12 | |     pub struct MTLAccelerationStructureInstanceOptions: u32 {
13 | |         const None = 0;
...  |
19 | | }
   | |_^ conflicting implementation for `MTLAccelerationStructureInstanceOptions`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `PixelFormatCapabilities`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/device.rs:96:1
    |
 96 | / bitflags::bitflags! {
 97 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
    | |                    ----- first implementation here
 98 | |     pub struct PixelFormatCapabilities: u32 {
 99 | |         const Filter = 1 << 0;
...   |
106 | | }
    | |_^ conflicting implementation for `PixelFormatCapabilities`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `MTLPipelineOption`
    --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/device.rs:1434:1
     |
1434 | / bitflags::bitflags! {
1435 | |     /// Options that determine how Metal prepares the pipeline.
1436 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
     | |                    ----- first implementation here
1437 | |     pub struct MTLPipelineOption: NSUInteger {
...    |
1450 | | }
     | |_^ conflicting implementation for `MTLPipelineOption`
     |
     = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `MTLBlitOption`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/encoder.rs:77:1
   |
77 | / bitflags::bitflags! {
78 | |     /// https://developer.apple.com/documentation/metal/mtlblitoption
79 | |     #[allow(non_upper_case_globals)]
80 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
   | |                    ----- first implementation here
...  |
91 | | }
   | |_^ conflicting implementation for `MTLBlitOption`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `MTLIndirectCommandType`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/indirect_encoder.rs:3:1
   |
 3 | / bitflags::bitflags! {
 4 | |     /// See <https://developer.apple.com/documentation/metal/mtlindirectcommandtype/>
 5 | |     #[allow(non_upper_case_globals)]
 6 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
   | |                    ----- first implementation here
...  |
15 | | }
   | |_^ conflicting implementation for `MTLIndirectCommandType`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `MTLFunctionOptions`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/library.rs:151:1
    |
151 | / bitflags::bitflags! {
152 | |     /// Only available on (macos(11.0), ios(14.0))
153 | |     ///
154 | |     /// See <https://developer.apple.com/documentation/metal/mtlfunctionoptions/>
155 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
    | |                    ----- first implementation here
...   |
160 | | }
    | |_^ conflicting implementation for `MTLFunctionOptions`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `MTLColorWriteMask`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/pipeline/render.rs:50:1
   |
50 | / bitflags::bitflags! {
51 | |     /// See <https://developer.apple.com/documentation/metal/mtlcolorwritemask>
52 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
   | |                    ----- first implementation here
53 | |     pub struct MTLColorWriteMask: NSUInteger {
...  |
61 | | }
   | |_^ conflicting implementation for `MTLColorWriteMask`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `resource::MTLResourceOptions`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/resource.rs:58:1
   |
58 | / bitflags::bitflags! {
59 | |     /// See <https://developer.apple.com/documentation/metal/mtlresourceoptions>
60 | |     #[allow(non_upper_case_globals)]
61 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
   | |                    ----- first implementation here
...  |
78 | | }
   | |_^ conflicting implementation for `resource::MTLResourceOptions`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `resource::MTLResourceUsage`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/resource.rs:80:1
   |
80 | / bitflags::bitflags! {
81 | |     /// Options that describe how a graphics or compute function uses an argument buffer’s resource.
82 | |     ///
83 | |     /// Enabling certain options for certain resources determines whether the Metal driver should
...  |
87 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
   | |                    ----- first implementation here
...  |
98 | | }
   | |_^ conflicting implementation for `resource::MTLResourceUsage`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `sync::MTLRenderStages`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/sync.rs:139:1
    |
139 | / bitflags::bitflags! {
140 | |     /// The render stages at which a synchronization command is triggered.
141 | |     ///
142 | |     /// Render stages provide finer control for specifying when synchronization must occur,
...   |
146 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
    | |                    ----- first implementation here
...   |
155 | | }
    | |_^ conflicting implementation for `sync::MTLRenderStages`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `MTLTextureUsage`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/texture.rs:36:1
   |
36 | / bitflags::bitflags! {
37 | |     /// See <https://developer.apple.com/documentation/metal/mtltextureusage>
38 | |     #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
   | |                    ----- first implementation here
39 | |     pub struct MTLTextureUsage: NSUInteger {
...  |
47 | | }
   | |_^ conflicting implementation for `MTLTextureUsage`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `png` (lib) due to 1 previous error
error[E0119]: conflicting implementations of trait `Clone` for type `generic_joint::JointAxesMask`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/dynamics/joint/generic_joint.rs:12:1
   |
12 | / bitflags::bitflags! {
13 | |     /// A bit mask identifying multiple degrees of freedom of a joint.
14 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
15 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug)]
   | |                    ----- first implementation here
...  |
50 | | }
   | |_^ conflicting implementation for `generic_joint::JointAxesMask`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `rigid_body_components::RigidBodyChanges`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/dynamics/rigid_body_components.rs:103:1
    |
103 | / bitflags::bitflags! {
104 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
105 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug)]
    | |                    ----- first implementation here
106 | |     /// Flags describing how the rigid-body has been modified by the user.
...   |
125 | | }
    | |_^ conflicting implementation for `rigid_body_components::RigidBodyChanges`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `rigid_body_components::AxesMask`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/dynamics/rigid_body_components.rs:227:1
    |
227 | / bitflags::bitflags! {
228 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
229 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug)]
    | |                    ----- first implementation here
230 | |     /// Flags affecting the behavior of the constraints solver for a given contact manifold.
...   |
248 | | }
    | |_^ conflicting implementation for `rigid_body_components::AxesMask`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `rigid_body_components::LockedAxes`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/dynamics/rigid_body_components.rs:256:1
    |
256 | / bitflags::bitflags! {
257 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
258 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug)]
    | |                    ----- first implementation here
259 | |     /// Flags affecting the behavior of the constraints solver for a given contact manifold.
...   |
278 | | }
    | |_^ conflicting implementation for `rigid_body_components::LockedAxes`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `geometry::CollisionEventFlags`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/mod.rs:59:1
   |
59 | / bitflags::bitflags! {
60 | |     /// Flags providing more information regarding a collision event.
61 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
62 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
   | |                    ----- first implementation here
...  |
71 | | }
   | |_^ conflicting implementation for `geometry::CollisionEventFlags`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `collider_components::ColliderChanges`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/collider_components.rs:44:1
   |
44 | / bitflags::bitflags! {
45 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
46 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug)]
   | |                    ----- first implementation here
47 | |     /// Flags describing how the collider has been modified by the user.
...  |
71 | | }
   | |_^ conflicting implementation for `collider_components::ColliderChanges`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `collider_components::ActiveCollisionTypes`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/collider_components.rs:303:1
    |
303 | / bitflags::bitflags! {
304 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
305 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
    | |                    ----- first implementation here
306 | |     /// Flags affecting whether or not collision-detection happens between two colliders
...   |
331 | | }
    | |_^ conflicting implementation for `collider_components::ActiveCollisionTypes`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `SolverFlags`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/contact_pair.rs:13:1
   |
13 | / bitflags::bitflags! {
14 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
15 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug)]
   | |                    ----- first implementation here
16 | |     /// Flags affecting the behavior of the constraints solver for a given contact manifold.
...  |
22 | | }
   | |_^ conflicting implementation for `SolverFlags`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `Group`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/interaction_groups.rs:81:1
    |
 81 | / bitflags::bitflags! {
 82 | |     /// A bit mask identifying groups for interaction.
 83 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
 84 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
    | |                    ----- first implementation here
...   |
156 | | }
    | |_^ conflicting implementation for `Group`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `event_handler::ActiveEvents`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/pipeline/event_handler.rs:6:1
   |
 6 | / bitflags::bitflags! {
 7 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
 8 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
   | |                    ----- first implementation here
 9 | |     /// Flags affecting the events generated for this collider.
...  |
18 | | }
   | |_^ conflicting implementation for `event_handler::ActiveEvents`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `ActiveHooks`
   --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/pipeline/physics_hooks.rs:119:1
    |
119 | / bitflags::bitflags! {
120 | |     #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
121 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
    | |                    ----- first implementation here
122 | |     /// Flags affecting the behavior of the constraints solver for a given contact manifold.
...   |
131 | | }
    | |_^ conflicting implementation for `ActiveHooks`
    |
    = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Clone` for type `QueryFilterFlags`
  --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/pipeline/query_pipeline/mod.rs:45:1
   |
45 | / bitflags::bitflags! {
46 | |     #[derive(Copy, Clone, PartialEq, Eq, Debug, Default)]
   | |                    ----- first implementation here
47 | |     /// Flags for excluding whole sets of colliders from a scene query.
48 | |     pub struct QueryFilterFlags: u32 {
...  |
67 | | }
   | |_^ conflicting implementation for `QueryFilterFlags`
   |
   = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `wgpu-types` (lib) due to 14 previous errors
error: could not compile `metal` (lib) due to 11 previous errors
error: could not compile `rapier3d` (lib) due to 12 previous errors
**Description** When I tried to build a project that requires bitflags, it kept on failing to build if the version of bitflags was specifically v2.11.0. For whatever reason, this version is tie culprit for the build errors. **Additional Context** - OS: macOS Tahoe 26.3.1 - rustc: 1.94.0 (4a4ef493e 2026-03-02) - rustup: rustup 1.28.2 (e4f3ad6f8 2025-04-28) **Examples** Tauri: ``` **Logs** Build Log: error[E0119]: conflicting implementations of trait `Clone` for type `ModifiersState` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tao-0.34.6/src/keyboard.rs:105:1 | 105 | / bitflags! { 106 | | /// Represents the current state of the keyboard modifiers 107 | | /// 108 | | /// Each flag represents a modifier and is set if this modifier is active. 109 | | #[derive(Clone, Copy, Default, Debug, PartialEq)] | | ----- first implementation here ... | 130 | | } | |_^ conflicting implementation for `ModifiersState` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) `cargo tree -i bitflags`: error: There are multiple `bitflags` packages in your project, and the specification `bitflags` is ambiguous. Please re-run this command with one of the following specifications: bitflags@1.3.2 bitflags@2.11.0 ``` RT Game Engine (from the WebGPU website): ``` Compiling spirv v0.3.0+sdk-1.3.268.0 Compiling gpu-descriptor-types v0.2.0 Compiling gpu-alloc-types v0.3.0 Compiling metal v0.31.0 Compiling wgpu-types v25.0.0 Compiling png v0.18.1 Compiling rapier3d v0.23.1 error[E0119]: conflicting implementations of trait `Clone` for type `ImageOperands` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:10:1 | 10 | bitflags! { # [doc = "SPIR-V operand kind: [ImageOpe... const NONTEMPORAL = 16384u32 ; const OFFSETS = 65536u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `ImageOperands` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `DescriptorPoolCreateFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gpu-descriptor-types-0.2.0/src/types.rs:1:1 | 1 | / bitflags::bitflags! { 2 | | /// Flags to augment descriptor pool creation. 3 | | /// 4 | | /// Match corresponding bits in Vulkan. 5 | | #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] | | ----- first implementation here ... | 13 | | } | |_^ conflicting implementation for `DescriptorPoolCreateFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `AllocationFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gpu-alloc-types-0.3.0/src/device.rs:67:1 | 67 | / bitflags::bitflags! { 68 | | /// Allocation flags 69 | | #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 70 | | #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] | | ----- first implementation here ... | 76 | | } | |_^ conflicting implementation for `AllocationFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `FPFastMathMode` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:11:1 | 11 | bitflags! { # [doc = "SPIR-V operand kind: [FPFastMa...INTEL = 65536u32 ; const ALLOW_REASSOC_INTEL = 131072u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `FPFastMathMode` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `MemoryPropertyFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gpu-alloc-types-0.3.0/src/types.rs:1:1 | 1 | / bitflags::bitflags! { 2 | | /// Memory properties type. 3 | | #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 4 | | #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] | | ----- first implementation here ... | 38 | | } | |_^ conflicting implementation for `MemoryPropertyFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `SelectionControl` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:12:1 | 12 | bitflags! { # [doc = "SPIR-V operand kind: [Selectio... 0u32 ; const FLATTEN = 1u32 ; const DONT_FLATTEN = 2u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `SelectionControl` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `LoopControl` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:13:1 | 13 | bitflags! { # [doc = "SPIR-V operand kind: [LoopCont...16u32 ; const MAX_REINVOCATION_DELAY_INTEL = 33554432u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `LoopControl` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `FunctionControl` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:14:1 | 14 | bitflags! { # [doc = "SPIR-V operand kind: [Function...2 ; const CONST = 8u32 ; const OPT_NONE_INTEL = 65536u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `FunctionControl` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `MemorySemantics` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:15:1 | 15 | bitflags! { # [doc = "SPIR-V operand kind: [MemorySe... MAKE_VISIBLE_KHR = 16384u32 ; const VOLATILE = 32768u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `MemorySemantics` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `MemoryAccess` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:16:1 | 16 | bitflags! { # [doc = "SPIR-V operand kind: [MemoryAc..._MASK = 65536u32 ; const NO_ALIAS_INTEL_MASK = 131072u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `MemoryAccess` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `KernelProfilingInfo` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:17:1 | 17 | bitflags! { # [doc = "SPIR-V operand kind: [KernelPr...o : u32 { const NONE = 0u32 ; const CMD_EXEC_TIME = 1u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `KernelProfilingInfo` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `RayFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:18:1 | 18 | bitflags! { # [doc = "SPIR-V operand kind: [RayFlags...2u32 ; const FORCE_OPACITY_MICROMAP2_STATE_EXT = 1024u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `RayFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `FragmentShadingRate` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:19:1 | 19 | bitflags! { # [doc = "SPIR-V operand kind: [Fragment...IZONTAL2_PIXELS = 4u32 ; const HORIZONTAL4_PIXELS = 8u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `FragmentShadingRate` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `CooperativeMatrixOperands` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-0.3.0+sdk-1.3.268.0/autogen_spirv.rs:2830:1 | 2830 | bitflags! { # [doc = "SPIR-V operand kind: [Cooper...NTS_KHR = 8u32 ; const SATURATING_ACCUMULATION_KHR = 16u32 ; } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | first implementation here | conflicting implementation for `CooperativeMatrixOperands` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `common::Transformations` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/png-0.18.1/src/common.rs:858:1 | 858 | / bitflags::bitflags! { 859 | | /// Output transformations 860 | | /// 861 | | /// Many flags from libpng are not yet supported. A PR discussing/adding them would be nice. ... | 894 | | #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] | | ----- first implementation here ... | 907 | | } | |_^ conflicting implementation for `common::Transformations` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) For more information about this error, try `rustc --explain E0119`. error: could not compile `gpu-descriptor-types` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish... error: could not compile `gpu-alloc-types` (lib) due to 2 previous errors error[E0119]: conflicting implementations of trait `Clone` for type `FeaturesWGPU` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/features.rs:132:13 | 132 | / bitflags::bitflags! { 133 | | $(#[$bit_outer])* 134 | | $vis struct $inner_name: $T { 135 | | $( ... | 140 | | } | |_____________^ conflicting implementation for `FeaturesWGPU` ... 514 | / bitflags_array! { 515 | | /// Features that are not guaranteed to be supported. 516 | | /// 517 | | /// These are either part of the webgpu standard, or are extension features supported by ... | 543 | | #[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 1415 | | } | |_- in this macro invocation | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags_array` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `FeaturesWebGPU` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/features.rs:132:13 | 132 | / bitflags::bitflags! { 133 | | $(#[$bit_outer])* 134 | | $vis struct $inner_name: $T { 135 | | $( ... | 140 | | } | |_____________^ conflicting implementation for `FeaturesWebGPU` ... 514 | / bitflags_array! { 515 | | /// Features that are not guaranteed to be supported. 516 | | /// 517 | | /// These are either part of the webgpu standard, or are extension features supported by ... | 1211 | | #[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 1415 | | } | |_- in this macro invocation | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags_array` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `InstanceFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/instance.rs:56:1 | 56 | / bitflags::bitflags! { 57 | | /// Instance debugging flags. 58 | | /// 59 | | /// These are not part of the WebGPU standard. ... | 63 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 119 | | } | |_^ conflicting implementation for `InstanceFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `Backends` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:216:1 | 216 | / bitflags::bitflags! { 217 | | /// Represents the backends that wgpu will use. 218 | | #[repr(transparent)] 219 | | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 220 | | #[cfg_attr(feature = "serde", serde(transparent))] 221 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 269 | | } | |_^ conflicting implementation for `Backends` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `DownlevelFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:946:1 | 946 | / bitflags::bitflags! { 947 | | /// Binary flags listing features that may or may not be present on downlevel adapters. 948 | | /// 949 | | /// A downlevel adapter is a GPU adapter that WGPU supports, but with potentially limited ... | 959 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] | | ----- first implementation here ... | 1111 | | } | |_^ conflicting implementation for `DownlevelFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `ShaderStages` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:1290:1 | 1290 | / bitflags::bitflags! { 1291 | | /// Describes the shader stages that a binding will be visible from. 1292 | | /// 1293 | | /// These can be combined so something that is visible from both vertex and fragment shaders can be defined as: ... | 1302 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 1319 | | } | |_^ conflicting implementation for `ShaderStages` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `TextureFormatFeatureFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:1773:1 | 1773 | / bitflags::bitflags! { 1774 | | /// Feature flags for a texture format. 1775 | | #[repr(transparent)] 1776 | | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 1777 | | #[cfg_attr(feature = "serde", serde(transparent))] 1778 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 1809 | | } | |_^ conflicting implementation for `TextureFormatFeatureFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `BufferUsages` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:4951:1 | 4951 | / bitflags::bitflags! { 4952 | | /// Different ways that you can use a buffer. 4953 | | /// 4954 | | /// The usages determine what kind of memory the buffer is allocated from and what ... | 4962 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 4999 | | } | |_^ conflicting implementation for `BufferUsages` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `BufferUses` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:5001:1 | 5001 | / bitflags::bitflags! { 5002 | | /// Similar to `BufferUsages`, but used only for `CommandEncoder::transition_resources`. 5003 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here 5004 | | pub struct BufferUses: u16 { ... | 5050 | | } | |_^ conflicting implementation for `BufferUses` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `TextureUsages` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:5256:1 | 5256 | / bitflags::bitflags! { 5257 | | /// Different ways that you can use a texture. 5258 | | /// 5259 | | /// The usages determine what kind of memory the texture is allocated from and what ... | 5267 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 5295 | | } | |_^ conflicting implementation for `TextureUsages` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `TextureUses` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:5297:1 | 5297 | / bitflags::bitflags! { 5298 | | /// Similar to `TextureUsages`, but used only for `CommandEncoder::transition_resources`. 5299 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here 5300 | | pub struct TextureUses: u16 { ... | 5349 | | } | |_^ conflicting implementation for `TextureUses` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `PipelineStatisticsTypes` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:7223:1 | 7223 | / bitflags::bitflags! { 7224 | | /// Flags for which pipeline data should be recorded in a query. 7225 | | /// 7226 | | /// Used in [`QueryType`]. ... | 7240 | | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 7260 | | } | |_^ conflicting implementation for `PipelineStatisticsTypes` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `AccelerationStructureFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:7499:1 | 7499 | / bitflags::bitflags!( 7500 | | /// Flags for acceleration structures 7501 | | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 7502 | | #[cfg_attr(feature = "serde", serde(transparent))] 7503 | | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 7525 | | ); | |_^ conflicting implementation for `AccelerationStructureFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `AccelerationStructureGeometryFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-types-25.0.0/src/lib.rs:7527:1 | 7527 | / bitflags::bitflags!( 7528 | | /// Flags for acceleration structure geometries 7529 | | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 7530 | | #[cfg_attr(feature = "serde", serde(transparent))] 7531 | | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | | ----- first implementation here ... | 7545 | | ); | |_^ conflicting implementation for `AccelerationStructureGeometryFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error: could not compile `spirv` (lib) due to 11 previous errors error[E0119]: conflicting implementations of trait `Clone` for type `MTLAccelerationStructureInstanceOptions` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/acceleration_structure.rs:10:1 | 10 | / bitflags::bitflags! { 11 | | #[derive(Copy, Clone, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here 12 | | pub struct MTLAccelerationStructureInstanceOptions: u32 { 13 | | const None = 0; ... | 19 | | } | |_^ conflicting implementation for `MTLAccelerationStructureInstanceOptions` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `PixelFormatCapabilities` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/device.rs:96:1 | 96 | / bitflags::bitflags! { 97 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here 98 | | pub struct PixelFormatCapabilities: u32 { 99 | | const Filter = 1 << 0; ... | 106 | | } | |_^ conflicting implementation for `PixelFormatCapabilities` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `MTLPipelineOption` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/device.rs:1434:1 | 1434 | / bitflags::bitflags! { 1435 | | /// Options that determine how Metal prepares the pipeline. 1436 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here 1437 | | pub struct MTLPipelineOption: NSUInteger { ... | 1450 | | } | |_^ conflicting implementation for `MTLPipelineOption` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `MTLBlitOption` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/encoder.rs:77:1 | 77 | / bitflags::bitflags! { 78 | | /// https://developer.apple.com/documentation/metal/mtlblitoption 79 | | #[allow(non_upper_case_globals)] 80 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here ... | 91 | | } | |_^ conflicting implementation for `MTLBlitOption` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `MTLIndirectCommandType` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/indirect_encoder.rs:3:1 | 3 | / bitflags::bitflags! { 4 | | /// See <https://developer.apple.com/documentation/metal/mtlindirectcommandtype/> 5 | | #[allow(non_upper_case_globals)] 6 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here ... | 15 | | } | |_^ conflicting implementation for `MTLIndirectCommandType` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `MTLFunctionOptions` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/library.rs:151:1 | 151 | / bitflags::bitflags! { 152 | | /// Only available on (macos(11.0), ios(14.0)) 153 | | /// 154 | | /// See <https://developer.apple.com/documentation/metal/mtlfunctionoptions/> 155 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here ... | 160 | | } | |_^ conflicting implementation for `MTLFunctionOptions` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `MTLColorWriteMask` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/pipeline/render.rs:50:1 | 50 | / bitflags::bitflags! { 51 | | /// See <https://developer.apple.com/documentation/metal/mtlcolorwritemask> 52 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here 53 | | pub struct MTLColorWriteMask: NSUInteger { ... | 61 | | } | |_^ conflicting implementation for `MTLColorWriteMask` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `resource::MTLResourceOptions` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/resource.rs:58:1 | 58 | / bitflags::bitflags! { 59 | | /// See <https://developer.apple.com/documentation/metal/mtlresourceoptions> 60 | | #[allow(non_upper_case_globals)] 61 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here ... | 78 | | } | |_^ conflicting implementation for `resource::MTLResourceOptions` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `resource::MTLResourceUsage` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/resource.rs:80:1 | 80 | / bitflags::bitflags! { 81 | | /// Options that describe how a graphics or compute function uses an argument buffer’s resource. 82 | | /// 83 | | /// Enabling certain options for certain resources determines whether the Metal driver should ... | 87 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here ... | 98 | | } | |_^ conflicting implementation for `resource::MTLResourceUsage` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `sync::MTLRenderStages` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/sync.rs:139:1 | 139 | / bitflags::bitflags! { 140 | | /// The render stages at which a synchronization command is triggered. 141 | | /// 142 | | /// Render stages provide finer control for specifying when synchronization must occur, ... | 146 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here ... | 155 | | } | |_^ conflicting implementation for `sync::MTLRenderStages` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `MTLTextureUsage` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/metal-0.31.0/src/texture.rs:36:1 | 36 | / bitflags::bitflags! { 37 | | /// See <https://developer.apple.com/documentation/metal/mtltextureusage> 38 | | #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] | | ----- first implementation here 39 | | pub struct MTLTextureUsage: NSUInteger { ... | 47 | | } | |_^ conflicting implementation for `MTLTextureUsage` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error: could not compile `png` (lib) due to 1 previous error error[E0119]: conflicting implementations of trait `Clone` for type `generic_joint::JointAxesMask` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/dynamics/joint/generic_joint.rs:12:1 | 12 | / bitflags::bitflags! { 13 | | /// A bit mask identifying multiple degrees of freedom of a joint. 14 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 15 | | #[derive(Copy, Clone, PartialEq, Eq, Debug)] | | ----- first implementation here ... | 50 | | } | |_^ conflicting implementation for `generic_joint::JointAxesMask` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `rigid_body_components::RigidBodyChanges` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/dynamics/rigid_body_components.rs:103:1 | 103 | / bitflags::bitflags! { 104 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 105 | | #[derive(Copy, Clone, PartialEq, Eq, Debug)] | | ----- first implementation here 106 | | /// Flags describing how the rigid-body has been modified by the user. ... | 125 | | } | |_^ conflicting implementation for `rigid_body_components::RigidBodyChanges` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `rigid_body_components::AxesMask` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/dynamics/rigid_body_components.rs:227:1 | 227 | / bitflags::bitflags! { 228 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 229 | | #[derive(Copy, Clone, PartialEq, Eq, Debug)] | | ----- first implementation here 230 | | /// Flags affecting the behavior of the constraints solver for a given contact manifold. ... | 248 | | } | |_^ conflicting implementation for `rigid_body_components::AxesMask` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `rigid_body_components::LockedAxes` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/dynamics/rigid_body_components.rs:256:1 | 256 | / bitflags::bitflags! { 257 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 258 | | #[derive(Copy, Clone, PartialEq, Eq, Debug)] | | ----- first implementation here 259 | | /// Flags affecting the behavior of the constraints solver for a given contact manifold. ... | 278 | | } | |_^ conflicting implementation for `rigid_body_components::LockedAxes` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `geometry::CollisionEventFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/mod.rs:59:1 | 59 | / bitflags::bitflags! { 60 | | /// Flags providing more information regarding a collision event. 61 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 62 | | #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] | | ----- first implementation here ... | 71 | | } | |_^ conflicting implementation for `geometry::CollisionEventFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `collider_components::ColliderChanges` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/collider_components.rs:44:1 | 44 | / bitflags::bitflags! { 45 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 46 | | #[derive(Copy, Clone, PartialEq, Eq, Debug)] | | ----- first implementation here 47 | | /// Flags describing how the collider has been modified by the user. ... | 71 | | } | |_^ conflicting implementation for `collider_components::ColliderChanges` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `collider_components::ActiveCollisionTypes` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/collider_components.rs:303:1 | 303 | / bitflags::bitflags! { 304 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 305 | | #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] | | ----- first implementation here 306 | | /// Flags affecting whether or not collision-detection happens between two colliders ... | 331 | | } | |_^ conflicting implementation for `collider_components::ActiveCollisionTypes` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `SolverFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/contact_pair.rs:13:1 | 13 | / bitflags::bitflags! { 14 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 15 | | #[derive(Copy, Clone, PartialEq, Eq, Debug)] | | ----- first implementation here 16 | | /// Flags affecting the behavior of the constraints solver for a given contact manifold. ... | 22 | | } | |_^ conflicting implementation for `SolverFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `Group` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/geometry/interaction_groups.rs:81:1 | 81 | / bitflags::bitflags! { 82 | | /// A bit mask identifying groups for interaction. 83 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 84 | | #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] | | ----- first implementation here ... | 156 | | } | |_^ conflicting implementation for `Group` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `event_handler::ActiveEvents` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/pipeline/event_handler.rs:6:1 | 6 | / bitflags::bitflags! { 7 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 8 | | #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] | | ----- first implementation here 9 | | /// Flags affecting the events generated for this collider. ... | 18 | | } | |_^ conflicting implementation for `event_handler::ActiveEvents` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `ActiveHooks` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/pipeline/physics_hooks.rs:119:1 | 119 | / bitflags::bitflags! { 120 | | #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] 121 | | #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] | | ----- first implementation here 122 | | /// Flags affecting the behavior of the constraints solver for a given contact manifold. ... | 131 | | } | |_^ conflicting implementation for `ActiveHooks` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `Clone` for type `QueryFilterFlags` --> /Users/kubik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rapier3d-0.23.1/src/pipeline/query_pipeline/mod.rs:45:1 | 45 | / bitflags::bitflags! { 46 | | #[derive(Copy, Clone, PartialEq, Eq, Debug, Default)] | | ----- first implementation here 47 | | /// Flags for excluding whole sets of colliders from a scene query. 48 | | pub struct QueryFilterFlags: u32 { ... | 67 | | } | |_^ conflicting implementation for `QueryFilterFlags` | = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) error: could not compile `wgpu-types` (lib) due to 14 previous errors error: could not compile `metal` (lib) due to 11 previous errors error: could not compile `rapier3d` (lib) due to 12 previous errors ```
KodrAus commented 2026-03-21 16:19:33 -05:00 (Migrated from github.com)

Hi @FalkRaft 👋

I’m on vacation right now so can’t dig in fully, but the issue appears to be here:

error: There are multiple `bitflags` packages in your project, and the specification `bitflags` is ambiguous.
Please re-run this command with one of the following specifications:
  bitflags@1.3.2
  bitflags@2.11.0

The 1.x version of bitflags would derive Clone for you, but the 2.x version requires you derive it yourself. If we can track down through cargo tree who depends on 1.x we can try get them updated.

It’s odd that your dependencies would be failing to build there though, are you specifying bitflags as a patch dependency in your Cargo.toml?

Hi @FalkRaft 👋 I’m on vacation right now so can’t dig in fully, but the issue appears to be here: ``` error: There are multiple `bitflags` packages in your project, and the specification `bitflags` is ambiguous. Please re-run this command with one of the following specifications: bitflags@1.3.2 bitflags@2.11.0 ``` The `1.x` version of `bitflags` would derive `Clone` for you, but the `2.x` version requires you derive it yourself. If we can track down through `cargo tree` who depends on `1.x` we can try get them updated. It’s odd that your dependencies would be failing to build there though, are you specifying `bitflags` as a patch dependency in your `Cargo.toml`?
FalkRaft commented 2026-03-21 17:31:15 -05:00 (Migrated from github.com)

It’s odd that your dependencies would be failing to build there though, are you specifying bitflags as a patch dependency in your Cargo.toml?

I wasn't specifying it as a patch dependency in my Cargo.toml file, in fact, some dependencies have bitflags as a sub-dependency.

> It’s odd that your dependencies would be failing to build there though, are you specifying `bitflags` as a patch dependency in your `Cargo.toml`? I wasn't specifying it as a patch dependency in my `Cargo.toml` file, in fact, some dependencies have bitflags as a sub-dependency.
KodrAus commented 2026-05-28 19:35:56 -05:00 (Migrated from github.com)

Just checking back in here; did you end up working around this or is it still an issue @FalkRaft?

Just checking back in here; did you end up working around this or is it still an issue @FalkRaft?
Sign in to join this conversation.
No labels
bug
good first issue
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-bitflags/bitflags#479
No description provided.