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

Update expected error messages #49

Merged
merged 1 commit into from Jul 10, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions num_enum/tests/try_build/compile_fail/conflicting_derive.stderr
@@ -1,4 +1,4 @@
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<u8>` for type `Numbers`:
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<u8>` for type `Numbers`
--> $DIR/conflicting_derive.rs:1:35
|
1 | #[derive(num_enum::FromPrimitive, num_enum::TryFromPrimitive)]
Expand All @@ -9,12 +9,12 @@ error[E0119]: conflicting implementations of trait `std::convert::TryFrom<u8>` f
where U: Into<T>;
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `num_enum::TryFromPrimitive` for type `Numbers`:
--> $DIR/conflicting_derive.rs:1:10
error[E0119]: conflicting implementations of trait `num_enum::TryFromPrimitive` for type `Numbers`
--> $DIR/conflicting_derive.rs:1:35
|
1 | #[derive(num_enum::FromPrimitive, num_enum::TryFromPrimitive)]
| ^^^^^^^^^^^^^^^^^^^^^^^ -------------------------- first implementation here
| ----------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Numbers`
| |
| conflicting implementation for `Numbers`
| first implementation here
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
Expand Up @@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `std::convert::TryFrom<u8>` f
= note: conflicting implementation in crate `core`:
- impl<T, U> TryFrom<U> for T
where U: Into<T>;
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
= 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 `num_enum::TryFromPrimitive` for type `Numbers`
--> $DIR/conflicting_derive.rs:1:35
Expand All @@ -17,4 +17,4 @@ error[E0119]: conflicting implementations of trait `num_enum::TryFromPrimitive`
| |
| first implementation here
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the derive macro `num_enum::TryFromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -0,0 +1,7 @@
error: #[derive(FromPrimitive)] requires a variant marked with `#[num_enum(default)]`
--> $DIR/exhaustive_enum.rs:1:10
|
1 | #[derive(num_enum::FromPrimitive)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `num_enum::FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -0,0 +1,7 @@
error: #[derive(FromPrimitive)] requires a variant marked with `#[num_enum(default)]`
--> $DIR/missing_default.rs:1:10
|
1 | #[derive(num_enum::FromPrimitive)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `num_enum::FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -0,0 +1,7 @@
error: Missing `#[repr({Integer})]` attribute
--> $DIR/missing_repr.rs:1:10
|
1 | #[derive(num_enum::IntoPrimitive)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `num_enum::IntoPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -0,0 +1,12 @@
error: unreachable pattern
--> $DIR/unreachable_patterns.rs:7:5
|
7 | Two = 2,
| ^^^
|
note: the lint level is defined here
--> $DIR/unreachable_patterns.rs:1:10
|
1 | #[derive(num_enum::TryFromPrimitive)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the derive macro `num_enum::TryFromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)