Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error when running tests on 0.7.0 (master) #305

Open
josephg opened this issue Oct 17, 2024 · 1 comment
Open

Compilation error when running tests on 0.7.0 (master) #305

josephg opened this issue Oct 17, 2024 · 1 comment

Comments

@josephg
Copy link

josephg commented Oct 17, 2024

I'm getting compilation errors when trying to run cargo test on a clean checkout (current master a2fed13):

~/3rdparty/io-uring:master ✓ $ cargo test 
error[E0369]: binary operation `==` cannot be applied to type `types::AsyncCancelFlags`
   --> src/types.rs:685:9
    |
685 |         assert_eq!(cb.flags, AsyncCancelFlags::ANY);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         types::AsyncCancelFlags
    |         types::AsyncCancelFlags

cargo build works fine.

Full compilation error below:

~/3rdparty/io-uring:master ✓ $ cargo test 
   Compiling io-uring v0.7.0 (/home/seph/3rdparty/io-uring)
error[E0369]: binary operation `==` cannot be applied to type `types::AsyncCancelFlags`
   --> src/types.rs:685:9
    |
685 |         assert_eq!(cb.flags, AsyncCancelFlags::ANY);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         types::AsyncCancelFlags
    |         types::AsyncCancelFlags
    |
note: an implementation of `PartialEq` might be missing for `types::AsyncCancelFlags`
   --> src/types.rs:113:1
    |
113 | / bitflags! {
114 | |     /// Options for [`AsyncCancel`](super::AsyncCancel) and
115 | |     /// [`Submitter::register_sync_cancel`](super::Submitter::register_sync_cancel).
116 | |     #[derive(Debug, Clone, Copy)]
...   |
142 | |     }
143 | | }
    | |_^ must implement `PartialEq`
    = note: this error originates in the macro `assert_eq` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `types::AsyncCancelFlags` with `#[derive(PartialEq)]`
   --> /home/seph/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/public.rs:17:9
    |
17  +         #[derive(PartialEq)]
18  |         $vis struct $PublicBitFlags(<$PublicBitFlags as $crate::__private::PublicFlags>::Internal);
    |

error[E0369]: binary operation `==` cannot be applied to type `types::AsyncCancelFlags`
   --> src/types.rs:688:9
    |
688 |         assert_eq!(cb.flags, AsyncCancelFlags::empty());
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         types::AsyncCancelFlags
    |         types::AsyncCancelFlags
    |
note: an implementation of `PartialEq` might be missing for `types::AsyncCancelFlags`
   --> src/types.rs:113:1
    |
113 | / bitflags! {
114 | |     /// Options for [`AsyncCancel`](super::AsyncCancel) and
115 | |     /// [`Submitter::register_sync_cancel`](super::Submitter::register_sync_cancel).
116 | |     #[derive(Debug, Clone, Copy)]
...   |
142 | |     }
143 | | }
    | |_^ must implement `PartialEq`
    = note: this error originates in the macro `assert_eq` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `types::AsyncCancelFlags` with `#[derive(PartialEq)]`
   --> /home/seph/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/public.rs:17:9
    |
17  +         #[derive(PartialEq)]
18  |         $vis struct $PublicBitFlags(<$PublicBitFlags as $crate::__private::PublicFlags>::Internal);
    |

error[E0369]: binary operation `==` cannot be applied to type `types::AsyncCancelFlags`
   --> src/types.rs:692:9
    |
692 |         assert_eq!(cb.flags, AsyncCancelFlags::ALL);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         types::AsyncCancelFlags
    |         types::AsyncCancelFlags
    |
note: an implementation of `PartialEq` might be missing for `types::AsyncCancelFlags`
   --> src/types.rs:113:1
    |
113 | / bitflags! {
114 | |     /// Options for [`AsyncCancel`](super::AsyncCancel) and
115 | |     /// [`Submitter::register_sync_cancel`](super::Submitter::register_sync_cancel).
116 | |     #[derive(Debug, Clone, Copy)]
...   |
142 | |     }
143 | | }
    | |_^ must implement `PartialEq`
    = note: this error originates in the macro `assert_eq` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `types::AsyncCancelFlags` with `#[derive(PartialEq)]`
   --> /home/seph/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/public.rs:17:9
    |
17  +         #[derive(PartialEq)]
18  |         $vis struct $PublicBitFlags(<$PublicBitFlags as $crate::__private::PublicFlags>::Internal);
    |

error[E0369]: binary operation `==` cannot be applied to type `types::AsyncCancelFlags`
   --> src/types.rs:695:9
    |
695 |         assert_eq!(cb.flags, AsyncCancelFlags::FD);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         types::AsyncCancelFlags
    |         types::AsyncCancelFlags
    |
note: an implementation of `PartialEq` might be missing for `types::AsyncCancelFlags`
   --> src/types.rs:113:1
    |
113 | / bitflags! {
114 | |     /// Options for [`AsyncCancel`](super::AsyncCancel) and
115 | |     /// [`Submitter::register_sync_cancel`](super::Submitter::register_sync_cancel).
116 | |     #[derive(Debug, Clone, Copy)]
...   |
142 | |     }
143 | | }
    | |_^ must implement `PartialEq`
    = note: this error originates in the macro `assert_eq` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `types::AsyncCancelFlags` with `#[derive(PartialEq)]`
   --> /home/seph/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/public.rs:17:9
    |
17  +         #[derive(PartialEq)]
18  |         $vis struct $PublicBitFlags(<$PublicBitFlags as $crate::__private::PublicFlags>::Internal);
    |

error[E0369]: binary operation `==` cannot be applied to type `types::AsyncCancelFlags`
   --> src/types.rs:699:9
    |
699 |         assert_eq!(cb.flags, AsyncCancelFlags::FD | AsyncCancelFlags::ALL);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         types::AsyncCancelFlags
    |         types::AsyncCancelFlags
    |
note: an implementation of `PartialEq` might be missing for `types::AsyncCancelFlags`
   --> src/types.rs:113:1
    |
113 | / bitflags! {
114 | |     /// Options for [`AsyncCancel`](super::AsyncCancel) and
115 | |     /// [`Submitter::register_sync_cancel`](super::Submitter::register_sync_cancel).
116 | |     #[derive(Debug, Clone, Copy)]
...   |
142 | |     }
143 | | }
    | |_^ must implement `PartialEq`
    = note: this error originates in the macro `assert_eq` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `types::AsyncCancelFlags` with `#[derive(PartialEq)]`
   --> /home/seph/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/public.rs:17:9
    |
17  +         #[derive(PartialEq)]
18  |         $vis struct $PublicBitFlags(<$PublicBitFlags as $crate::__private::PublicFlags>::Internal);
    |

error[E0369]: binary operation `==` cannot be applied to type `types::AsyncCancelFlags`
   --> src/types.rs:702:9
    |
702 |         assert_eq!(cb.flags, AsyncCancelFlags::FD | AsyncCancelFlags::FD_FIXED);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         types::AsyncCancelFlags
    |         types::AsyncCancelFlags
    |
note: an implementation of `PartialEq` might be missing for `types::AsyncCancelFlags`
   --> src/types.rs:113:1
    |
113 | / bitflags! {
114 | |     /// Options for [`AsyncCancel`](super::AsyncCancel) and
115 | |     /// [`Submitter::register_sync_cancel`](super::Submitter::register_sync_cancel).
116 | |     #[derive(Debug, Clone, Copy)]
...   |
142 | |     }
143 | | }
    | |_^ must implement `PartialEq`
    = note: this error originates in the macro `assert_eq` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `types::AsyncCancelFlags` with `#[derive(PartialEq)]`
   --> /home/seph/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/public.rs:17:9
    |
17  +         #[derive(PartialEq)]
18  |         $vis struct $PublicBitFlags(<$PublicBitFlags as $crate::__private::PublicFlags>::Internal);
    |

error[E0369]: binary operation `==` cannot be applied to type `types::AsyncCancelFlags`
   --> src/types.rs:706:9
    |
706 | /         assert_eq!(
707 | |             cb.flags,
708 | |             AsyncCancelFlags::FD | AsyncCancelFlags::FD_FIXED | AsyncCancelFlags::ALL
709 | |         );
    | |         ^
    | |_________|
    | |_________types::AsyncCancelFlags
    |           types::AsyncCancelFlags
    |
note: an implementation of `PartialEq` might be missing for `types::AsyncCancelFlags`
   --> src/types.rs:113:1
    |
113 | / bitflags! {
114 | |     /// Options for [`AsyncCancel`](super::AsyncCancel) and
115 | |     /// [`Submitter::register_sync_cancel`](super::Submitter::register_sync_cancel).
116 | |     #[derive(Debug, Clone, Copy)]
...   |
142 | |     }
143 | | }
    | |_^ must implement `PartialEq`
    = note: this error originates in the macro `assert_eq` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `types::AsyncCancelFlags` with `#[derive(PartialEq)]`
   --> /home/seph/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/public.rs:17:9
    |
17  +         #[derive(PartialEq)]
18  |         $vis struct $PublicBitFlags(<$PublicBitFlags as $crate::__private::PublicFlags>::Internal);
    |

For more information about this error, try `rustc --explain E0369`.
error: could not compile `io-uring` (lib test) due to 7 previous errors
$ rustc --version
rustc 1.81.0 (eeb90cda1 2024-09-04)
@josephg josephg changed the title Compilation error with 0.7.0 master Compilation error when running tests on 0.7.0 (master) Oct 17, 2024
@quininer
Copy link
Member

thank your report, fixed by 5b93270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants