Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
error[E0119]: conflicting implementations of trait `num_enum::CannotDeriveBothFromPrimitiveAndTryFromPrimitive` for type `Numbers`
--> tests/try_build/compile_fail/conflicting_derive.rs:1:35
|
1 | #[derive(num_enum::FromPrimitive, num_enum::TryFromPrimitive)]
| ----------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Numbers`
| |
| first implementation here
|
= note: this error originates in the derive macro `num_enum::TryFromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `TryFrom<u8>` for type `Numbers`
--> tests/try_build/compile_fail/conflicting_derive.rs:1:35
|
1 | #[derive(num_enum::FromPrimitive, num_enum::TryFromPrimitive)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<T, U> TryFrom<U> for T
where U: Into<T>;
= note: this error originates in the derive macro `num_enum::TryFromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ error: expected `name` or `constructor`
error: num_enum attribute must have at most one error_type
--> tests/try_build/compile_fail/custom_error_type_parsing.rs:29:76
|
29 | #[num_enum(error_type(name = CustomError, constructor = CustomError::new), error_type(name = CustomError, constructor = CustomError::new))]
29 | #[num_enum(error_type(name = CustomError, constructor = CustomError::new), error_type(name = CustomError, constructor = CustomError:...
| ^^^^^^^^^^

error: num_enum attribute must have at most one error_type
Expand Down
Loading